You must be logged in to post your query.
Home › Forums › Chart Support › Draw an arrow.
Tagged: arrow
Hi. I want to draw an arrow to end of data in a scatter plot.
The number of data is two, and I want to draw an arrow to end of data. How can I do this?
@kinokatsu,
You can show an arrow over the last datapoint, by drawing out an arrow over the chart canvas with id .canvasjs-chart-canvas.
.canvasjs-chart-canvas
Please check this JSFiddle for a working example.
— Thangaraj Raman Team CanvasJS
Hi Thangaraj. Thanks for your reply.
I’m sorry. My explanation was wrong. I want to draw an arrow from the start point to the end point on a line graph, like this JSFiddle(This draws an arrow in the data for confirmation).
Please check this JSFiddle
To achieve your requirement, you can use the same line chart type and disable the markers and toolTip by setting the markerType property to none and the toolTipContent property to null.
none
null
Kindly take a look at this JSFiddle for an example on the same.
— Adithya Menon Team CanvasJS
Hi dithya Menon Thanks for your reply.
I wanted to convey the image I had in mind for drawing the arrows by plotting the data. I would prefer to choose a different method if possible.
I would like to eliminate the calculation of plotting data for the arrows because of the large number of data.
Sorry. I misspelled your name.
To eliminate the calculation of plotting data, you can get the canvas context of the chart and draw a line directly on the canvas. Kindly take a look at this JSFiddle for an example on the same.
Hi Adithya Menon. Thanks for your reply.
Thanks for your suggestion. We will consider the two methods you suggested.
You must be logged in to reply to this topic. Login/Register