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 a problem with a CombinedChartView which I'm trying to fix but I can't find a decent solution. Here's a screenshot of the chart:
As you can see the LineChartDataSet which I have doesn't start directly at the beginning of horizontal axis. There is a small offset which I'm trying to eliminate and I would like the dataset to start directly from the zero position of X axis, so basically what I'm trying to achieve is that:
(actually that's not a screenshot but the previous one edited in an image editor, anyway I think you get the point)
I guess that's not a big deal to implement, but I'm trying to find a solution how to achieve that and I'm not able to. I hope that you will be able to help me with it. Thank you!
The text was updated successfully, but these errors were encountered:
pawelurb
changed the title
Can't set fix axis offset
Can't set x axis offset
Jan 14, 2016
if you take the chart demo line chart and look at where the data set is created you can see it creates X and Y values. Just take the X array and loop through it while subtracting the correct amount from each one.
As far as what the correct value is (if it is not constant) then you can subtract the smallest X value in your data set.
That should result in what you are trying to achieve.
Hello,
I have a problem with a CombinedChartView which I'm trying to fix but I can't find a decent solution. Here's a screenshot of the chart:
As you can see the LineChartDataSet which I have doesn't start directly at the beginning of horizontal axis. There is a small offset which I'm trying to eliminate and I would like the dataset to start directly from the zero position of X axis, so basically what I'm trying to achieve is that:
(actually that's not a screenshot but the previous one edited in an image editor, anyway I think you get the point)
I guess that's not a big deal to implement, but I'm trying to find a solution how to achieve that and I'm not able to. I hope that you will be able to help me with it. Thank you!
The text was updated successfully, but these errors were encountered: