|
Legends for Gauge/Meters? |
Posted by Dylan on Sep-15-2016 22:46 |
|
Hi There,
I'm using ChartDirector 5.1. According to the docs the BaseMeter class has the addLegend method, but it doesn't appear to work. I suppose this is because there's no name/label assigned to the pointer(s) on my gauge - but I don't see any way to do this.
Can we actually add a legend to gauges/meters?
Thanks,
Dylan |
Re: Legends for Gauge/Meters? |
Posted by Peter Kwan on Sep-15-2016 23:24 |
|
Hi Dylan,
Yes, you can use BaseChart.addLegend to add the legend box, then use LegendBox.addKey to add any legend key you like.
For XYChart objects, if the data set has a name, by default it will be added to the legend box automatically. Similarly, for PolarChart objects, if the layer has a name, it will be added to the legend box automatically. For many other chart types, there is no automatic legend entry, but you can always add legend entries using LegendBox.addKey.
Hope this can help.
Regards
Peter Kwan |
Re: Legends for Gauge/Meters? |
Posted by Dylan on Sep-15-2016 23:27 |
|
Ah, I thought I was missing something. Thank you, Peter! |
|