SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Closed
0
0

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!

Version
2.5.0.946
  • You must to post comments
1
0

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

  • pauzu
    Thank you Yura! This was exactly what I needed and much easier than what I had in mind.
  • You must to post comments
Showing 1 result