-
-
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
Scaling Yaxis #199
Comments
Did you |
I tried adding the line chartHolder.notifyDataSetChanged() right after setting the minimum axis values. It just seems to set the minimum back to 0. |
That's because you are attempting to modify properties that are automatically calculated. |
Hi Daniel, Sorry to bother you. As you've closed the issue you're obviously confident I tried using .customAxisMin as you suggested but this didn't seems to do This is my code as it is
setId: y1SetId)
label: axisUnitsData["y1"]!.name)
setId: y2SetId)
label: axisUnitsData["y2"]!.name)
[lineChartDataSetY1, lineChartDataSetY2])
Thanks a lot for your help Best, Adam On Thu, Jul 9, 2015 at 7:34 PM, Daniel Cohen Gindi <notifications@github.com
|
Still you need to notifyDataSetChanged(), or change the properties before you set the data |
I tried both of those and it makes no difference |
Maybe post a sample project so we can actually see what's happening? On Thu, Jul 9, 2015 at 10:09 PM, 365SplendidSuns notifications@github.com
|
Here is all my code involved with making the chart. It's far from the @IBAction func drawChartButtonPressed(sender: AnyObject) {
easingOption: .EaseInBounce)
setId: y1SetId)
label: axisUnitsData["y1"]!.name)
getDataEntries(xAxisValues,
y2DataEntries, label: axisUnitsData["y2"]!.name)
[lineChartDataSetY1, lineChartDataSetY2])
lineChartDataSetY1)
[setId]!.record.toDouble() {
[setId]!.record.toDouble() {
ChartDataEntry] {
{
index)
timestampToShortDate()) {
On Thu, Jul 9, 2015 at 8:11 PM, Daniel Cohen Gindi <notifications@github.com
|
You misunderstood...
I'm not interested in an unreadable reply, but in a small, focused sample
project.
If you can produce a sample project - with some fake data and failing to
change the axis range - then it's something worth looking at!
|
Yes, sorry, my last post was a bit of a mess Here is a simple sample project with the same problem |
Did you have a chance to take a look at the sample project I put together for you? iOS Charts is much better than the other charting packages I've seen so it would be great if this issue could be fixed. |
Haven't had the time yet, sorry. Anyway in the meanwhile you could look at On Mon, Jul 13, 2015 at 6:57 PM, 365SplendidSuns notifications@github.com
|
I seem to be having a similar issue. @365SplendidSuns, I was able to build your project but it wouldn't run in my simulator. What version of Xcode did you use on that project? |
I'm using XCode 6.3 |
This is working for me, my problem was using axisMinimum vs customAxisMin. Where in the readme does it say use customAxisMin btw? I have been using the Android readme and kind of struggling. |
So, the sample project is now working in your simulator and the axis range is setting correctly without you making any alterations to the code in the project? |
I mean't my own project is working. I can't get your project to work in Xcode 6.4 Sorry. |
Thanks Everyone on this issue....some way it helped me to solve my problem...@365SplendidSuns thanks for your sample project...it helped me to understand Charts better in swift 2.2. |
And Heartfelt Thanks to @danielgindi for this awesome Charts. |
@danielgindi Hej! Could you check this out? http://stackoverflow.com/questions/42090783/iso-charts-line-chart-right-axis-min-and-max-values-not-set-properly |
@wessamabdrabo have you set your data set |
I was dealing with the same problem. The source for me was With When changing |
Hi, thank you so much @365SplendidSuns, this is exactly what I am looking for. |
When using chartHolder.leftAxis.axiMinimum and chartHolder.rightAxis.axisMinimum the scales on the y axis no longer stretch to the top of the chart as in the pic below
Also, using chartHolder.autoScaleMinMaxEnabled = true as an alternative gives an EXC_BAD_INSTRUCTION on line 93 of ChartDataSet.swift
The text was updated successfully, but these errors were encountered: