How to change a legend in the Superset Chart
Asked Answered
F

2

5

I have a line graph like this but I couldn't figure out how to change the legend here. I tried to modify the metadata and couldn't make it work:

enter image description here

Flagstone answered 1/10, 2018 at 23:27 Comment(0)
C
4

If Count(*) is a metric name, you need to go to your datasource >edit>list metrics and add a verbose_name with the kind of name you want to see on the legend and save. That should affect what is displayed on the legend. Please note that this true only if the legend is metric.When it's grouped, the legend is dictated by the group by field data.

Cismontane answered 5/10, 2018 at 14:27 Comment(2)
if count(*) is a metric name, what if it is not?Malaria
The likely scenario is that it would be a list item from a group by field which means you would need to rename your list name to reflect the appropriate name.Cismontane
A
15

You can click the pencil icon next to My Metric and you can enter the new name you’d like to display.

Edit names of metrics

Assizes answered 1/4, 2019 at 18:5 Comment(0)
C
4

If Count(*) is a metric name, you need to go to your datasource >edit>list metrics and add a verbose_name with the kind of name you want to see on the legend and save. That should affect what is displayed on the legend. Please note that this true only if the legend is metric.When it's grouped, the legend is dictated by the group by field data.

Cismontane answered 5/10, 2018 at 14:27 Comment(2)
if count(*) is a metric name, what if it is not?Malaria
The likely scenario is that it would be a list item from a group by field which means you would need to rename your list name to reflect the appropriate name.Cismontane

© 2022 - 2024 — McMap. All rights reserved.