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

How to represent a null value,It's like the picture? not 0 #3052

Closed
guoyutao opened this issue Nov 24, 2017 · 8 comments
Closed

How to represent a null value,It's like the picture? not 0 #3052

guoyutao opened this issue Nov 24, 2017 · 8 comments

Comments

@guoyutao
Copy link

guoyutao commented Nov 24, 2017

image

@guoyutao guoyutao changed the title How do you represent a null value,It's like the picture? not 0 How to represent a null value,It's like the picture? not 0 Nov 24, 2017
@HudsonGraeme
Copy link

If you're working in Swift, and you encounter a nil value, then add error trapping to still add a nil value; something like the following would maybe work
if(temperature == nil) { temperature =0 } else { //Add to to chart }

I'm surprised the application didn't crash when the chart had to deal with the null (nil value). Since nil is not a valid chart value, the chart can't do anything with it, hence an empty space. It is your job to deal with nil values.

@guoyutao
Copy link
Author

You don't understand what I mean.I mean, how to achieve this effect,like the picture?

@HudsonGraeme
Copy link

Oh, I gotcha. Have you tried using nil?

@thierryH91200
Copy link
Contributor

use 2 dataset it's simple
first dataset => x1 = 0 .. n
second dataset => x2 = n+1 .. m

@guoyutao
Copy link
Author

guoyutao commented Nov 27, 2017

@HudsonGraeme I've tried this way, But the Bouble type doesn't match.I've done by The way that @thierryH91200 provided

thank you very mach

@HudsonGraeme
Copy link

@guoyutao Glad you have it working, sorry I wasn't of much help.
@thierryH91200 Cheers!

@littledogboy
Copy link

@thierryH91200 That's a good idea!

@xiaowasly
Copy link

@guoyutao How did you achieve that, I also encountered a similar problem, can answer in detail

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

6 participants