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 just found a new kind of issue with the bar charts, I have a little set with 12 groups of bars, every group has two bars. Now I'm setting my groups since the x = 0.
for i in 0..<dataPoints.count{letdataEntry=BarChartDataEntry(x:Double(i), y:values[i])
dataEntries.append(dataEntry)}
As you can see here in the image the last element is not completely drawing over the chart check the black rectangle.
I'm using the last commit over master, which is 180c418 and i guess the problem is the same function that before, in this case over the BarChartView
internaloverridefunc calcMinMax(){
guard let data =self.data as?BarChartDataelse{return}
if fitBars
{
_xAxis.calculate(
min: data.xMin - data.barWidth / 2.0,
max: data.xMax + data.barWidth / 2.0)}else{
_xAxis.calculate(min: data.xMin, max: data.xMax)}// calculate axis range (min / max) according to provided data
_leftAxis.calculate(
min: data.getYMin(axis:.left),
max: data.getYMax(axis:.left))
_rightAxis.calculate(
min: data.getYMin(axis:.right),
max: data.getYMax(axis:.right))}
The data.xMax is just taking acount of the last element in x wich is 11 ( counting the 0 as 1 ) and that's the reason why at the end the chart is clipping the last groups of bars. This is just my first assumption please tell me if you think that the problem is in another side.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi @liuxuan30 @danielgindi !
I just found a new kind of issue with the bar charts, I have a little set with 12 groups of bars, every group has two bars. Now I'm setting my groups since the x = 0.
As you can see here in the image the last element is not completely drawing over the chart check the black rectangle.
I'm using the last commit over master, which is 180c418 and i guess the problem is the same function that before, in this case over the
BarChartView
The
data.xMax
is just taking acount of the last element inx
wich is 11 ( counting the 0 as 1 ) and that's the reason why at the end the chart is clipping the last groups of bars. This is just my first assumption please tell me if you think that the problem is in another side.Thanks in advance.
The text was updated successfully, but these errors were encountered: