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.
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. dataSource1.DataSet.Add(rs1.ToSeriesInfoWithHitTest(info)); dataSource1.DataSet.Add(rs2.ToSeriesInfoWithHitTest(info)); // set custom dataSource to be dataSource of your legend. legend1.DataSource = dataSource1;
Hope that helps.
Please login first to submit.