AnyChart / AnyChart-Android

AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
2.29k stars 369 forks source link

how to get values and sum that in bar chart #224

Closed zeylevruntime closed 2 years ago

zeylevruntime commented 3 years ago

stc i want to sum data value in b1+b2+b3=result and write result in b3.labels(). How to ?? here is my code d1 d2

Shestac92 commented 3 years ago

@zeylevruntime You can achieve that using a special string token for the b3 labels. Try the line below:

b3.labels().enabled(true).format("{%categoryYSum}");
zeylevruntime commented 3 years ago

how about if just b1+b2??

Shestac92 commented 3 years ago

Unfortunately, string tokens don't provide this possibility.