You must be logged in to post your query.
Home › Forums › StockChart Support › stockcharts addTo “data”
Tagged: stockcharts addTo
document.getElementById("submitup").addEventListener("click", function() { stockChartA.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 } ] }); });
Why the code above works on “chart” and when used in “stockchart” writes: “Property “data” doesn’t exist. Please check for typo.” ?
@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
Good job!
You must be logged in to reply to this topic. Login/Register