You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an HorizontalBarChart with 3 BarChartDataSets and I'm close to the result I want: every bar showing a formatted value label for each data set.
In the following screenshot, for instance, the second bar (14/01/17) shows 11192 as label for the first BarChartDataSet value, 8.25 for the second (which is actually 8250, but formatted according to my needs) and 1 for the third BarChartDataSet (which will often have very small values comparing to the other datasets, so usually its actual bar won't be visible, and only the label will be shown... which is fine for me).
My problem, or better my goal, is to have all three value labels aligned at the beginning of the bar, on the left, inside the bar. Like this (sorry for the quick and dirty photoshopping):
Currently I have barChartView.drawValueAboveBarEnabled = true, but setting it false only brings the label inside the bars, but on the right side, which actually causes an even worse positioning for the label of the third BarChartDataSet, the one with small values, since that label overlaps with the dates.
Is there a way to have the value labels drawn at the beginning (left) of the bars that I am missing?
Thanks in advance for your help!
Cesare
The text was updated successfully, but these errors were encountered:
you can override drawValues() to draw at your desired position. And you are welcome to file a pull request to make it better if you think it's useful :) Just follow the code style
Hi and thanks for this amazing project!
I have an HorizontalBarChart with 3 BarChartDataSets and I'm close to the result I want: every bar showing a formatted value label for each data set.
In the following screenshot, for instance, the second bar (14/01/17) shows 11192 as label for the first BarChartDataSet value, 8.25 for the second (which is actually 8250, but formatted according to my needs) and 1 for the third BarChartDataSet (which will often have very small values comparing to the other datasets, so usually its actual bar won't be visible, and only the label will be shown... which is fine for me).
My problem, or better my goal, is to have all three value labels aligned at the beginning of the bar, on the left, inside the bar. Like this (sorry for the quick and dirty photoshopping):
Currently I have barChartView.drawValueAboveBarEnabled = true, but setting it false only brings the label inside the bars, but on the right side, which actually causes an even worse positioning for the label of the third BarChartDataSet, the one with small values, since that label overlaps with the dates.
Is there a way to have the value labels drawn at the beginning (left) of the bars that I am missing?
Thanks in advance for your help!
Cesare
The text was updated successfully, but these errors were encountered: