Charts are not displaying
Charts are not displaying at all. Only the watermark is shown at the bottom of the screen. Below is my code Activity.xml
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".AnalyticsFragment">
<com.anychart.AnyChartView
android:id="@+id/pie_chart"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
AnalyticsFragment.java public class AnalyticsFragment extends Fragment {
ArrayList pieEntries;
public AnalyticsFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_analytics2, container, false);
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.data(data);
AnyChartView anyChartView = (AnyChartView) view.findViewById(R.id.pie_chart);
anyChartView.setChart(pie);
return view; }
@SheroXee Unforutnately, we do not support Fragment. The only available approach to layout the Pie chart is described in the snippet.
Hey @Shestac92 even I'm facing the same issue. The graphs are not shown, only the watermark. In my case, there are no fragments, only activities. I also tried to directly copy paste code from provided code snippets. Even that does not work.
I'm using v1.1.4
@Shestac92 Any updates?
I am having the same issue, with any of the Anychart's. I had it working temporarily, after installing Android Studio Flamingo, but unfortunately the issue returned upon updates to patch 1 and other updates to Android Studio.
@Shestac92 @aeharake @ZeeshanCoding13 @venusaim23
Any solution?
any update i have same problem chart not displaying
Any updates? @Shestac92 @aeharake @aeharake @venusaim23 @Alfie920
@abora97 @Shestac92 @aeharake @venusaim23 I was able to correct the issues.
Documented on Stackoverflow.com here: https://stackoverflow.com/questions/75988346/i-am-getting-errors-implementing-a-heatmap-chart-using-anychart-via-android-stud/76111541#76111541Anychart charts not drawing
I hope it helps you all.
no still don't work