Hello.
I am working on Xamarin Android project with C#. Since having a legend within the chart causes problems with too many axis’ (no scrolling is available thus selecting different series in a legend becomes unavailable) and having a legend outside of chart area, anywhere we desire, would be of a preference, is there a tutorial on how could I achieve such a thing? Our project needs this functionality for both Android and iOS.
Would be grateful if anyone could help out with this issue.
Thank you in advance!
- pauzu asked 5 years ago
- You must login to post comments
Hi Pauzu,
You can take a look on example with pie chart where we place legend outside chart. It’s pretty simple – first of all you need to declare SciChartLegend in your XML with layout or create in code and and into layout, then need to create a LegendModifier and pass legend instance via constructor with UseAutoPlacement = false:
LegendModifier modifier = new LegendModifier(legend, new SeriesInfoLegendAdapter(), false);
Then use modifier by adding into ChartModifiers collection of chart. Is this suitable for your needs?
Best regards,
Yura
- Yura Khariton answered 5 years ago
-
Thank you Yura! This was exactly what I needed and much easier than what I had in mind.
- You must login to post comments