Home Forums Chart Support Show legend text in a specific order

Show legend text in a specific order

Viewing 4 posts - 1 through 4 (of 4 total)
  • #27001

    Hi, does anyone know how to display the legend text in a specific order? I have an area chart which is displaying the legend as

    3-6% 6-9% <3%

    Or to display a custom legend in its place.

    #27009

    @smithfx,

    Legends are displayed in the same order in which dataSeries are passed to the chart options. Passing dataSeries to the chart options in the same order as you want in legends should work fine in this case.

    If you are still facing the issue in achieving your requirements kindly share JSFiddle with sample data so that we can look into the code, understand the scenario better and help you out.


    Shashi Ranjan
    Team CanvasJS

    #27011

    Hi Shashi,

    Thanks for the reply. I cannot rearrange the order, that is the problem.

    Climb profile

    Because the chart is showing by distance and the first slope is between 3 and 6%, and the next slope is 3%, I cannot just rearrange things because the mountain isn’t built that way (I wish it was so simple).

    I guess the only way is to construct a custom legend outside the chart.

    #27039

    @smithfx,

    Sorry, the custom legend is not available as of now.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.