SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
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.