-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BarChartView height is not reflecting the values assigned to it. #977
Comments
can you check ChartsDemo? I think you must missed something. But without details we can't say what's wrong. |
Here is the code i used for the charts.
func setChart(dataPoints: [String], values: [Double]) {
Thats pretty much all i have. |
try put barChartView.data = chartData at last line of your func. I see you changing lots of view properties after you set data, which is wrong. You either call data setter at last, or manually call notifyDataSetChanged() |
You chart is probably being offset. Either by limiting the Y axis with a minimum value that's around 45%, or viewport translations. |
Hi,
Currently what i have right now is
The values i am sending to the chart is :
var str: [String] = ["1","2"];
var score: [Double] = [1,0.5];
setChart(str, values: score)
And i have used the formatter as:
let percentageNumberFormatter = NSNumberFormatter()
percentageNumberFormatter.numberStyle = .PercentStyle
chartDataSet.valueFormatter = percentageNumberFormatter
Its not reflecting 100% and 50% in proportion. It rather looks like 100% and 5%.
Could somebody help me understand what i might be doing wrong.
Thank you advance.
The text was updated successfully, but these errors were encountered: