Pre loader

Xamarin.iOS LegendModifier show legend data for specific axis.

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


We’re trying to make multiple legends on the screen, for example, 1 for the left axis and its data series, 1 for the right axis and its data series. I can see it’s possible in the WPF documentation, but in the iOS documentation it says “Coming soon!”. Do we need to wait for a future release of the Xamarin.iOS library or is it possible somehow now?

By the way, I’m not a trial user. We’ve just purchased a license today.

Lazar Nikolov

  • You must to post comments
Best Answer

Hell Lazar,

Thanks for writing to us. Sure it’s possible, all you need is to create custom dataSource for your legend and fill if with appropriate seriesInfos. Please see the code below:

// create hitTestInfo to be aboe to get seriesInfo from renderableSeries;
var info = new SCIHitTestInfo();

// assuming that legend1 coming from your xib layout.
// if it's created in code, you need to place it on the view programmatically. 
SCIChartLegend legend1;

// create custom dataSource for the above legend. 
var dataSource1 = new SCISeriesInfoLegendDataSource(legend1);

// fill dataSet of your dataSourse with seriesInfo's you need.

// set custom dataSource to be dataSource of your legend.
legend1.DataSource = dataSource1;

Hope that helps.

Best Regards,
Nazar R.

  • Nazar Rudnyk
    you should use the ctor which takes legend as a parameter.
  • Nazar Rudnyk
    you can use legend independently from legendModifier and place it wherever you want
  • Lazar Nikolov
    How would I do that? I tried wrapping it in a Legend Modifier and adding the legend modifier to the Graph Surface but it didn’t display 4 legends, but 2 legends with the data merged.
  • Lazar Nikolov
    I tried adding it as a subview to the view, but that didn’t work as well. I’m checking the Frame of the legends, it does have Width and Height and the X and Y coordinates of the view are correct, but it still doesn’t show up.
  • Nazar Rudnyk
    at this point, i would ask you to provide some code, so we can reproduce your issue on our side. Thanks in advance
Showing 1 result
Your Answer

Please first to submit.