Home Forums Chart Support How to add buttons or labels on Chart?

How to add buttons or labels on Chart?

Viewing 12 posts - 1 through 12 (of 12 total)
  • #11758

    Hi,

    This time, I wanna add some interactions to my chart.
    And I want to make a chart that when you click some button or click the legend of the line, and it will shows the corresponding data, not display all the datapoints array in the same chart, so what should I do?Or do you guys have any examples?

    Thanks!

    #11760

    Are you looking for this?
    Multiseries Line Chart with Legend


    Sanjoy

    #11767

    Hi,
    That’s exactly what I need, but how can I make it animated that each time I click the legend and switch to another chart?

    Thanks!

    #11768

    I like this, if i want to show all legend again, so what should I do?Or do you guys have any examples?

    #11769

    @quocnamvnn-vnn,

    You can hide / unhide dataSeries based on click of legends. Please refer to this documentation page for step-to-step tutorial on the same.
    Hide / Unhide dataseries by legend click.


    Vishwas R
    Team CanvasJS

    #11851

    Hi,
    i am making chart with x and y axes. Both axes  are arrays, but the y-axis string that occurs after calculating function in which the user enters parameters After that calculation I do not know how to use that array. If someone could help I’d be very grateful ??
    Sorry for my bad english.

    Thank you!

    #11903

    Hi,

    If i understood your requirement properly, you can use the labelFormatter for axisY as shown in the given fiddle.
    Axis label formatter
    In case this is not what you are looking for, could you please try to elaborate a little more and create a jsfiddle so that we can get better understanding of your requirement.

    #11910

    Hi,
    Here is my code https://jsfiddle.net/milan1889/o3gu3rex/. First I have to calculate the value of a array of y-axis, and then draw graf. If anyone can help, please help, I need this code.

    • This reply was modified 7 years, 6 months ago by milan1889.
    #11981

    Hi,

    We have copied and modified your fiddle. Here is the updated fiddle. In the updated fiddle, after pressing the calculate button, you get the famname array for the values of Y-axis and vrijed array for the value of x-axis. Using vrijed and famname arrays, you can store and pass these values to the dataPoints property of the CanvasJS object, in the format required by CanvasJS.

    #12007

    Hi again,
    at the beginning of the first thanks to the last project. Now I need help with a new project. Here is the problem, but I do not know where.Here is the link http://jsfiddle.net/3qy9beq1/4/

    • This reply was modified 7 years, 6 months ago by milan1889.
    #12080

    Hi Sanjoy,

    Is there any idea that we can make these buttons for bar charts, i mean dots in the line graph in the fiddle you have provided . I’ve a requirement to highlight if we have zero value on the axis it was completely hiding but still i need to click on that.

    #12093

    Eshwar,

    toolTip, click events are applied even to dataPoint with zero y-value. Here is the updated fiddle.

    toolTip and click event for zero y-value dataPoint


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.