Home Forums Chart Support Draw an arrow.

Draw an arrow.

Viewing 8 posts - 1 through 8 (of 8 total)
  • #43174

    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?

    #43181

    @kinokatsu,

    You can show an arrow over the last datapoint, by drawing out an arrow over the chart canvas with id .canvasjs-chart-canvas.

    Please check this JSFiddle for a working example.

    Drawing arrow over last datapoint


    Thangaraj Raman
    Team CanvasJS

    #43188

    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

    #43218

    @kinokatsu,

    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.

    Kindly take a look at this JSFiddle for an example on the same.


    Adithya Menon
    Team CanvasJS

    #43226

    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.

    #43228

    Sorry.
    I misspelled your name.

    #43242

    @kinokatsu,

    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.


    Adithya Menon
    Team CanvasJS

    #43247

    Hi Adithya Menon.
    Thanks for your reply.

    Thanks for your suggestion.
    We will consider the two methods you suggested.

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

You must be logged in to reply to this topic.