Mekko chart legend sorting to match the order of the data in the chart

279 views
0

In mekko chart the legend shows the categories  so that the category that I have in the chart at the bottom is at the top on the legend. Is there a way to reverse just the legend order without changing the order in the chart itself?

Answered question
0

Hello,

Currently, we do not have an option in the visual to reverse the legend but this can be achieved using the custom API within the visual. 

  1. Please turn on the custom API option in the visual.

   2. Click on the advanced editor option in the top right corner of the visual and select the custom API tab

  3. Paste the below Json in the Input section, choose the template as ‘custom’ and click on ‘Submit’.

{
“legend”: {
“reversed”: true,
“verticalAlign”: “top”
}
}

  4. Your legend order will now be reversed.

Regards,

Dharani

Answered question