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

Feature: Nullable values in line chart #252

Merged
merged 17 commits into from
Mar 21, 2020
Merged

Conversation

shamilovtim
Copy link

@shamilovtim shamilovtim commented Mar 20, 2020

This PR provides the ability for a user to provide null points on the line chart to achieve gaps in data.
FlSpot(null,null)

Sample has been updated. It's not pretty but it demonstrates a lot of different stuff.
image

Closes #26
Closes #123

@shamilovtim
Copy link
Author

there are formatting changes again because of the last PR. contributor did not use dart formatter at all

@imaNNeo
Copy link
Owner

imaNNeo commented Mar 20, 2020

I'll add a linter check to verify it in each PR.
But please revert them, it makes confusion for now and later.

@imaNNeo
Copy link
Owner

imaNNeo commented Mar 20, 2020

Thank you,
I'm going to the final review.
I think there was an issue for this feature,
could you please find it and mention it in the PR's title?

@shamilovtim
Copy link
Author

@imaNNeoFighT Unrelated to this PR but this is what happens on master right now when I provide

       spots: const [
            FlSpot(0, 1),
            FlSpot(11, 4),
            FlSpot(2, 1),
            FlSpot(4.9, 5),
            FlSpot(6.8, 5),
            FlSpot(8, 1),
            FlSpot(9.5, 2),
          ],

image

Should the spots be sorted or would that be incorrect for a line chart? It seems to be the x or y should determine the order, not the sequence of the elements in the array. Of course, we can always fix it in a different PR. I just wanted to call it out.

@shamilovtim
Copy link
Author

Ok all set. Just ignore my last comment, it's unrelated.

@shamilovtim shamilovtim requested a review from imaNNeo March 20, 2020 15:27
@imaNNeo
Copy link
Owner

imaNNeo commented Mar 21, 2020

About your last comment, I think it's correct :)
because you provided unordered spots, btw you can open an issue to discuss it there.
and about the PR, everything is ready to merge, but we should update the LineChartBarData.spots documentation, (dart docs, above the field and constructor), I will handle it,
Thanks!

@imaNNeo imaNNeo merged commit 9920de8 into imaNNeo:dev Mar 21, 2020
@imaNNeo
Copy link
Owner

imaNNeo commented Mar 21, 2020

I've made some changes on your codes, they are for simplification check the commit here.

@shamilovtim shamilovtim deleted the nullability branch April 1, 2020 20:02
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

Successfully merging this pull request may close these issues.

2 participants