Bar chart goes below zero line ios-charts
up vote
1
down vote
favorite
I have following question, today i updated the 'charts' pod in my project and suddenly the chart is drawn wrong. I mean the bars are going below zero, and not starting at the zero line.
and before the update it looked like this:
(i know the second image is a grouped barchart)
but my problem is that in the new version the bars start at the bottom of the chartview, and in the old they started at the zero line.
i read that this was a bug in the old version and that it should look like this. Is it possible, to have the buggy design back because i liked it, or is it not supposed to look like this?
i tried using axisMinimum = 0 but that only moved the zero from the yAxxis to the bottom.
groupedBarChart.xAxis.labelPosition = XAxis.LabelPosition.bottom
groupedBarChart.chartDescription?.text = ""
groupedBarChart.backgroundColor = UIColor(red:0.980, green:0.898, blue:0.498, alpha: 1.000)
print(groupedBarChart.leftAxis.axisMinimum)
groupedBarChart.fitBars = true
this is the code i use to customize the chart.
Im looking forward to your answers and thanks in advance.
swift charts bar-chart ios-charts
add a comment |
up vote
1
down vote
favorite
I have following question, today i updated the 'charts' pod in my project and suddenly the chart is drawn wrong. I mean the bars are going below zero, and not starting at the zero line.
and before the update it looked like this:
(i know the second image is a grouped barchart)
but my problem is that in the new version the bars start at the bottom of the chartview, and in the old they started at the zero line.
i read that this was a bug in the old version and that it should look like this. Is it possible, to have the buggy design back because i liked it, or is it not supposed to look like this?
i tried using axisMinimum = 0 but that only moved the zero from the yAxxis to the bottom.
groupedBarChart.xAxis.labelPosition = XAxis.LabelPosition.bottom
groupedBarChart.chartDescription?.text = ""
groupedBarChart.backgroundColor = UIColor(red:0.980, green:0.898, blue:0.498, alpha: 1.000)
print(groupedBarChart.leftAxis.axisMinimum)
groupedBarChart.fitBars = true
this is the code i use to customize the chart.
Im looking forward to your answers and thanks in advance.
swift charts bar-chart ios-charts
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
can you please trychartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?
– Atalay Asa
Nov 23 at 14:38
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have following question, today i updated the 'charts' pod in my project and suddenly the chart is drawn wrong. I mean the bars are going below zero, and not starting at the zero line.
and before the update it looked like this:
(i know the second image is a grouped barchart)
but my problem is that in the new version the bars start at the bottom of the chartview, and in the old they started at the zero line.
i read that this was a bug in the old version and that it should look like this. Is it possible, to have the buggy design back because i liked it, or is it not supposed to look like this?
i tried using axisMinimum = 0 but that only moved the zero from the yAxxis to the bottom.
groupedBarChart.xAxis.labelPosition = XAxis.LabelPosition.bottom
groupedBarChart.chartDescription?.text = ""
groupedBarChart.backgroundColor = UIColor(red:0.980, green:0.898, blue:0.498, alpha: 1.000)
print(groupedBarChart.leftAxis.axisMinimum)
groupedBarChart.fitBars = true
this is the code i use to customize the chart.
Im looking forward to your answers and thanks in advance.
swift charts bar-chart ios-charts
I have following question, today i updated the 'charts' pod in my project and suddenly the chart is drawn wrong. I mean the bars are going below zero, and not starting at the zero line.
and before the update it looked like this:
(i know the second image is a grouped barchart)
but my problem is that in the new version the bars start at the bottom of the chartview, and in the old they started at the zero line.
i read that this was a bug in the old version and that it should look like this. Is it possible, to have the buggy design back because i liked it, or is it not supposed to look like this?
i tried using axisMinimum = 0 but that only moved the zero from the yAxxis to the bottom.
groupedBarChart.xAxis.labelPosition = XAxis.LabelPosition.bottom
groupedBarChart.chartDescription?.text = ""
groupedBarChart.backgroundColor = UIColor(red:0.980, green:0.898, blue:0.498, alpha: 1.000)
print(groupedBarChart.leftAxis.axisMinimum)
groupedBarChart.fitBars = true
this is the code i use to customize the chart.
Im looking forward to your answers and thanks in advance.
swift charts bar-chart ios-charts
swift charts bar-chart ios-charts
edited Nov 20 at 1:32
rmaddy
236k27307374
236k27307374
asked Nov 19 at 22:59
Elliot Czigány
405
405
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
can you please trychartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?
– Atalay Asa
Nov 23 at 14:38
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47
add a comment |
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
can you please trychartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?
– Atalay Asa
Nov 23 at 14:38
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
can you please try
chartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?– Atalay Asa
Nov 23 at 14:38
can you please try
chartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?– Atalay Asa
Nov 23 at 14:38
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53383852%2fbar-chart-goes-below-zero-line-ios-charts%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What version of ios-charts you have used before update? What version you use now?
– AlexSmet
Nov 20 at 13:35
@AlexSmet i used charts version 3.0.2
– Elliot Czigány
Nov 20 at 20:33
can you please try
chartView.leftAxis.spaceBottom = 0.0
or do it for your right axis?– Atalay Asa
Nov 23 at 14:38
@AtalayAsa it only moves the zero line to the bottom.
– Elliot Czigány
Nov 25 at 19:47