You must be logged in to post your query.
Home › Forums › Chart Support › index label not displayed in line chart
Tagged: index label line chart
Hi ALl, i am trying to display a index label in line chart along with marker colour and marker type. but the chart when rendered has a discontinuity at the exact datapoint where i want the index label to be displayed. nor there is any marker colour or type. for (var i = 1; i < datapoints4length; i++) { { if(chart2.options.data[2].dataPoints[i].y>chart2.options.data[2].dataPoints[i-1].y) if(chart2.options.data[2].dataPoints[i-1].y<100000) if(chart2.options.data[2].dataPoints[i].y>=100000) { chart2.data[2].addTo(“dataPoints”,{indexlabel:”BUY”,markerColor: “red”, markerType: “triangle”},i); } } } chart2.render(); }
could someone help plz,
@rajupradeep,
Can you kindly create JSFiddle reproducing the issue you are facing and share it with us so that we can look into the code, understand the scenario better and help you out?
— Vishwas R Team CanvasJS
could you plz see the fiddle
https://jsfiddle.net/0trgL6mx/
addTo method is used to add new element(datapoint) to the specified array(dataseries). Updating the marker properties of existing datapoint and re-rendering should work fine in your case. Please take a look at this updated JSFiddle.
thanks Vishwas, it worked.
You must be logged in to reply to this topic. Login/Register