Skip to content
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

Zombie exception #477

Closed
931743010 opened this issue Oct 15, 2015 · 17 comments
Closed

Zombie exception #477

931743010 opened this issue Oct 15, 2015 · 17 comments

Comments

@931743010
Copy link

only one number
[yVals1 addObject:[[ChartDataEntry alloc] initWithValue:0 xIndex:j]];

Int(pt.x) exception
BarLineChartViewBase---public var highestVisibleXIndex: Int---Int(pt.x)

@liuxuan30
Copy link
Member

mate, you need to provide more info so we can help you. With this I can say nothing

@AntiMoron
Copy link
Contributor

There's an error while doing casting.
just explicitly use BarChartDataEntry instead of ChartDataEntry

[yVals1 addObject:[[BarChartDataEntry alloc] initWithValue:0 xIndex:j]];

to avoid the cast.
I think this is a casting bug.

@931743010
Copy link
Author

[yVals1 addObject:[[ChartDataEntry alloc] initWithValue:0 xIndex:j]];
not a casting bug;when server give me one number ;{11:00, 0}
and the andriod version is ok
when my yVals1 only have one number and this number is 0; will have exception
Int(pt.x) exception
exception-site BarLineChartViewBase---public var highestVisibleXIndex: Int---Int(pt.x)

@931743010
Copy link
Author

when initWithValue:0 and just one number ; use the LineChartView the pt.x will be {nan,nan}, then will exception.

@liuxuan30
Copy link
Member

Well, it should not be nan. There might be something wrong with the data?
Can you reproduce it with ChartsDemo code? Give the full dataSet and reproduce it with ChartsDemo

@AntiMoron
Copy link
Contributor

此贴其实可以中文。

@931743010
Copy link
Author

  • - 我看 demo是好的, 我再试试

@931743010
Copy link
Author

谁知道如何把
7dec0ddc-eda8-4712-bdf0-fa4241f83040 里面的日期 竖起来显示呢 如下图
default

@931743010
Copy link
Author

还有 就是柱状图上 x轴显示的 数字是double 能不能 只显示整数,如何做呢

@liuxuan30
Copy link
Member

  1. use valueFormatter and other available formatters
  2. the text rotation is a little complicated, but you could try with CoreGraphics, you can override the renderer

I guess it's better to write in English, as more people can help you.

@AntiMoron
Copy link
Contributor

@liuxuan30 👍

  1. Inherit ChartXAxisRenderer and override renderAxisLabels to customize the way labels are rendered.
  2. Inherit LineChartView and override its initialize function to reset the xAxisRenderer ;-)

@931743010
Copy link
Author

The key is I only know a little about swift,just know about Object-C,my project is write with Object-C. if you have some times off and this is easy for you . Can you write a demo for me,thanks.

@liuxuan30
Copy link
Member

I tried rotate the label a little but no luck yet, seems I missed something there.. Maybe it's time to ask for this feature?

@931743010
Copy link
Author

Look forward to this function;
i have another question :
all number Type is int ,but the Axis Display the type of double; is there any Method to display int。
i dont want to Modify the danielgindi/ios-charts.

@931743010
Copy link
Author

img_0182

@AntiMoron
Copy link
Contributor

What you want is exactly what formatters do.

@931743010
Copy link
Author

Removal of the decimal number in the X axis of the table
re:The problem has been Solved。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants