SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
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.