Web example
Just the code in the example of the web page is wrong, doesn´t add data to the pie chart (Gradle example)
@XV02 Please, can you provide the link to the wrong example? Do you mean Android library code snippets?
No, just the first simple example, it´s a little one, but I think that is the main that the people use to test, so maybe you'll need to fix it.
The 'data' isn't asigned to 'Pie' and if someone use it, doesn't work.
https://www.anychart.com/es/technical-integrations/samples/android-charts/ [image: Captura.PNG]
El dom., 5 may. 2019 a las 21:18, Alexander Shestacov (< [email protected]>) escribió:
@XV02 https://github.com/XV02 Please, can you provide the link to the wrong example? Do you mean Android library code snippets?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AnyChart/AnyChart/issues/79#issuecomment-489485189, or mute the thread https://github.com/notifications/unsubscribe-auth/AHBXL2O7N4JGDOGN5UBY4DLPT6IO7ANCNFSM4HK4UCIA .
@XV02 Thank you for your report! There's a line missing from the code snippet. The snippet code should be the following:
Pie pie = AnyChart.pie();
List<DataEntry> data = new ArrayList<>();
data.add(new ValueDataEntry("John", 10000));
data.add(new ValueDataEntry("Jake", 12000));
data.add(new ValueDataEntry("Peter", 18000));
pie.setData(data);
AnyChartView anyChartView = (AnyChartView) findViewById(R.id.any_chart_view);
anyChartView.setChart(pie);
We will correct the article as soon as possible!