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.



Wrong barchart



and before the update it looked like this:



before chart



(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.










share|improve this question
























  • 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















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.



Wrong barchart



and before the update it looked like this:



before chart



(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.










share|improve this question
























  • 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













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.



Wrong barchart



and before the update it looked like this:



before chart



(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.










share|improve this question















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.



Wrong barchart



and before the update it looked like this:



before chart



(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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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


















  • 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
















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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen