Home forums Using CanvasJS 2 queries: label placement and click function

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 1 year, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8147

    amr125
    Participant

    Hi there,

    First, I was looking for some graphic tools for a personal project, and I found this amazing library. Congratulations and keep it up!

    First query:
    Doing a line chart I added two labels (‘Start’ and ‘End’) on two data points, but I don’t know how to place the labels in a way that do not overlap the graph. The method (indexLabelPlacement: “outside”) seems to don’t make it. Here is my code.

    Second query:
    I wonder if there is any option to make the line Chart to be activated with a click function. For instance in my Chart I plotted the line with three separated charts (colored as blue, red and purple), so I would like them to be sequentially shown with a mouse-click.

    Many thanks in advance

    #8190

    Sunil Urs
    Keymaster

    amr125,

    First Query:
    Please download the latest version(v1.6.1). It improves the placement of indexLabels but it is not possible to totally avoid overlapping of labels. You can improve the readability in these cases by changing the indexLabel’s color though.

    Second Query:
    Please refer to this example.


    Sunil Urs

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

You must be logged in to reply to this topic.