Forum Replies Created by Luis

Viewing 4 posts - 1 through 4 (of 4 total)
  • I need to use the cross hair on multi-series chart, and the chart number is a variable .
    the code is follow:

    <? for ($i=0;$i<count($selItem);$i++) { ?>

    <script type=”text/javascript”>
    $(function () {
    var chart = new CanvasJS.Chart(“chartContainer<? echo $i ?>”, {

    //width: 100%,
    zoomEnabled: true,
    animationEnabled: true,
    //exportEnabled: true,

    title: {
    text: “<? echo $selMsgName[$i] ?>”
    },
    toolTip:{
    shared: true
    },
    axisX:{
    crosshair : {
    enabled: true,
    color: “orange”,
    labelFontColor: “#F8F8F8”}
    },

    axisY:{
    margin: 30,
    interval: 1,
    labelFormatter: function (e) {
    return customLabel<? echo $i ?>(e.value);
    },
    crosshair : {
    enabled: true,
    color: “orange”,
    labelFontColor: “#F8F8F8”},

    },

    data: [
    {
    type: “stepLine”,
    connectNullData: true,
    markerSize: 5,
    dataPoints: [<? echo $data[$i] ?>]
    }
    ]
    });
    chart.render();
    });
    </script>

    <? } ?>

    how can i do?

    in reply to: multi-series within multi-chart and together control zoom. #19899

    Hi; Indranil,

    about 1. is ok, but when the mouse on second chart,the first chart is not work.
    about 2. my mean is to calculate the difference by selecting the two dataPoints.

    Luis

    Hi Suyash,

    Thank you for your help.
    I’ve last two question.
    1.Can i active crosshair axisX on each chart at same time?
    null
    2.Can i get the value of different between axis X two point ?
    null

    Luis Pang

    in reply to: multi-series within multi-chart and together control zoom. #18874

    Sample Charts

    The simulation results as picture.

Viewing 4 posts - 1 through 4 (of 4 total)