Search code examples
androidmpandroidchartno-data

How to force no data label display in case of empty DataSet


I need to redraw my charts and sometimes some data sets can be empty.

Using an empty DataSet (in PieChart and BarChart) displays an empty chart instead of the no data labels.

How can I force the label display?

Thank you and great work! I really appreciate your work!


Solution

  • Found the solution in the library code.

    just call clear function on the chart object

    chart.clear();