Charts: Unable to hide Y values

Created on 9 Apr 2015  路  8Comments  路  Source: danielgindi/Charts

I am implementing a Pie chart and I am unable to hide Y values.
I tried setting dataSet.drawValuesEnabled = NO but this hid both X and Y labels.
On the contrary I am able to hide X labels by [_chartView setDrawSliceTextEnabled:NO]

Most helpful comment

Try

[pieChartDataSet setDrawValues: NO];

on your PieChartDataSet or PieChartData object.

All 8 comments

Try

[pieChartDataSet setDrawValues: NO];

on your PieChartDataSet or PieChartData object.

Only PieChartData declares the setDrawValues method. I tried it and it hides both X and Y.

Sorry, my bad. The field you need to set to NO is called "drawValuesEnabled", it's public.

There's a setter for "drawSliceTextEnabled" but I think that's for X values

@PhilJay Are we implementing a property to exclusively hide Y values?

Yes, this already exists in Andriod and can be done via calling setDrawValues(...) on any DataSet object.

It is now fixed - there was a bug in the iOS version, that were fixed a few days ago in the Android version

I confirm the fix. dataSet.drawValuesEnabled = NO; did the trick

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sjdevlin picture sjdevlin  路  3Comments

Shunshine07 picture Shunshine07  路  3Comments

Bharati555 picture Bharati555  路  4Comments

Aungbandlab picture Aungbandlab  路  4Comments

valeIT picture valeIT  路  3Comments