Charts: How to set the position of the values top on BarChartView?

Created on 29 Aug 2017  路  3Comments  路  Source: danielgindi/Charts

Today,our company has required me to change the position of the values top on BarChartView?And now I have no idea ,how to get it....

Most helpful comment

in the file

capture d ecran 2017-08-29 a 17 03 48

modify the line 439

capture d ecran 2017-08-29 a 17 04 06

and in your controller

    chartView.drawValueAboveBarEnabled = true

capture d ecran 2017-08-29 a 17 04 49

All 3 comments

in the file

capture d ecran 2017-08-29 a 17 03 48

modify the line 439

capture d ecran 2017-08-29 a 17 04 06

and in your controller

    chartView.drawValueAboveBarEnabled = true

capture d ecran 2017-08-29 a 17 04 49

@thierryH91200 nice job for pointing in the right direction

@guanyanlin you can also subclass BarChartRenderer and copy the function that contains the posOffset into your subclass and override it there, that way you won't modify the original source code and any future updates in Charts won't wipe out your modifications.

great people are helping :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coop44483 picture coop44483  路  3Comments

kirti0525 picture kirti0525  路  3Comments

PrashantKT picture PrashantKT  路  3Comments

shayneptorres picture shayneptorres  路  4Comments

JW00332 picture JW00332  路  4Comments