SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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.
I’m not quite sure what you mean? Do you mean is it possible to fetch data from a web service and load to an Android Chart instead of storing values in the app?
If so, of course! SciChart for Android doesn’t care where you get data from. We simply demonstrate that you can append data to the SciChartSurface by using our DataSeries API.
Take a look at our Android Line Chart Example. To get data into the chart, you simply need to create a new XyDataSeries and append data to it. Like this:
// Create a SciChartBuilder instance SciChartBuilder sciChartBuilder = new SciChartBuilder(getContext()); // Create a new DataSeries IXyDataSeries<Double, Double> dataSeries = sciChartBuilder.newXyDataSeries(Double.class, Double.class).build(); // xValues, yValues can be any data that you choose dataSeries.append(xValues, yValues); // create a new RenderableSeries which draws the data final FastLineRenderableSeries rs1 = sciChartBuilder.newLineSeries() .withDataSeries(dataSeries) .withStrokeStyle(ColorUtil.argb(0xFF, 0x27, 0x9B, 0x27)) .build(); // Set the RenderableSeries on the chart sciChartSurface.getRenderableSeries().add(rs1);
Now, if you want to create a chart with no data, simply skip the dataSeries.append step.
You can later use dataSeries.append, dataSeries.Insert, dataSeries.Update, dataSeries.Remove and dataSeries.clear to change the data, and SciChart will automatically redraw the chart.
I hope that answers your question! If you have more questions please ask.
Please login first to submit.