jQuery UI Widgets Forums Chart Click Legend

This topic contains 5 replies, has 3 voices, and was last updated by  Dimitar 10 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Click Legend Posts
  • Click Legend #62097

    simcon94
    Participant

    Hi,
    when i “clicked” the legend, i can show or hide the bar or line and so on.
    Is it possible, when i load the chart, some lines hide default?

    Click Legend #62116

    Dimitar
    Participant

    Hello simcon94,

    This can be achieved by calling the method hideSerie for the bars or lines you wish to hide.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Click Legend #62134

    rayh34
    Participant

    O tried this but could not get it to work. How would you hide the “Swimming” series in the following chart:

    http://jsfiddle.net/jqwidgets/dScZf/

    Tried several options in cluding; $(‘#jqxChart’).jqxChart(‘hideSerie’, 1);

    Click Legend #62147

    Dimitar
    Participant

    Hi rayh34,

    It should actually be:

    $('#jqxChart').jqxChart('hideSerie', 0, 1);

    The first parameter is the series group index (0) and the second one – the index of the series itself (1).

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Click Legend #62332

    rayh34
    Participant

    Thanks Dimitar, that worked. Is there a way to hide more then one series?

    Click Legend #62347

    Dimitar
    Participant

    Hi rayh34,

    You would have to call the method multiple times to hide more series.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.