Home Forums Chart Support multiple data-points sources

multiple data-points sources

Viewing 3 posts - 1 through 3 (of 3 total)
  • #4903

    HI ,
    i want to draw one dynamic real time chart with multiple data-points sources is that possible?i just want to see one chart and switch between them. i mean that.

    data: [{ 
    				// dataSeries1
    				type: "line",
    				xValueType: "dateTime",
    				showInLegend: true,
    				name: "Company A",
    				dataPoints: dataPointsi1
    			},
    			{				
    				// dataSeries2
    				type: "line",
    				xValueType: "dateTime",
    				showInLegend: true,
    				name: "Company B" ,
    				dataPoints: dataPointsi2
    			} ,
    			{				
    				// dataSeries3
    				type: "line",
    				xValueType: "dateTime",
    				showInLegend: true,
    				name: "Company C" ,
    				dataPoints: dataPointsi3
    			}]
                        
    if(ii==1) // ii variable take 0 or 1
    			{    
    		 dataPointsi1 = dataPoints1;
    		 dataPointsi2 = dataPoints2;
             dataPointsi3 = dataPoints3;}
    		 else if(ii==0) 
    		 { 
    		 dataPointsi1 = dataPoints4;
    		 dataPointsi2 = dataPoints5;
             dataPointsi3 = dataPoints6;}

    thank you.

    #4916

    You can do something like

    chart.options.data[0].dataPoints = dataPoints1; //assign dataPoints2 to switch to another one.

    #4920

    thank you very much

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

You must be logged in to reply to this topic.