Create Pie Chart in Android Studio | Tutorial

Stevdza-San · 33K views · 2019 · 9:56

Open on YouTube

Software (other)Data visualization & information designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about getting AnyChart pie charts working in an Android app, including null object reference errors.

Recommended by 1 people across 1 different months, 2019 to 2021.

What it is

A short Android Studio tutorial by Stevdza-San that shows how to build a pie chart with the AnyChart library. It walks through adding the dependency, enabling MultiDex and wiring up the chart view in an activity.

What people said

Recommends Mohammed Abid Nafi · 2021-03 · Stack Overflow · on “Having Multiple WebViews or Importing Java Libraries”

I guess importing libraries are much better for performance because those are you know stored locally whereas mostly web-views are very slow and unresponsive but if you don't have technical skills to work with library you can go with webview but in future try to use any library or you can take help of youtube there are lots of videos which teach you how to do Maybe video like this [this video]

Cites Mac122 · 2019-11 · Stack Overflow · on “Why is AnyChart returning Null Object Reference exception?”

I've been trying several tutorials for creating a simple pie chart using AnyChart and MPAndroidChart: Android Chart Example APP using MPAndroidChart [LINK] Pie-Chart-Tutorial [LINK] MPAndroidChart - all pieces of the pie chart are the same colour [LINK] AnyChart Android Charts [LINK] However, when I run all the examples above I get an exception: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.anychart.AnyChartView$JsListener com.anychart.AnyChartView.getJsListener()' on a null object reference at com.anychart.APIlib.addJSLine(APIlib.java:27) at com.anychart.charts.Pie.<init>(Pie.java:34) at com.anychart.AnyChart.pie(AnyChart.java:130) at com.mpereira.savingst

Cites Chirag garg · 2020-08 · Stack Overflow · on “Why is AnyChart returning Null Object Reference exception?”

According to this [this video] ) no need to add cast AnyChart View @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.d(TAG, "onCreate: starting to create chart"); anyChartView = findViewById(R.id.any_chart_view); setupPieChart(); }