Home Forums StockChart Support stockcharts addTo “data” Reply To: stockcharts addTo “data”

#41996

@mcigorli,

data is an element of chart and not stockchart. Passing it in chart should work fine in your case. Kindly take a look at the code-snippet below,

stockChartA.charts[0].addTo("data", {
	type: "line", 
	axisYType: "secondary",
	markerType: "none",
	lineDashType: "solid",
	color:"red",
	lineThickness: 1,
	toolTipContent: null,
	//markerSize: 1,
	dataPoints: [
	    { x: 1000, y: 970, markerType: "circle" },
	    { x: 1050, y: 970 }
        ]
});

If you are still facing issue, can you kindly create JSFiddle reproducing the issue you are facing & share it with us so that we can look into the code / chart-options being used, understand the scenario better and help you resolve?


Adithya Menon
Team CanvasJS