Support gaps in data (null, NaN, etc)#46
Support gaps in data (null, NaN, etc)#46motiz88 wants to merge 11 commits intoborisyankov:masterfrom
Conversation
This helps development when using npm 3, which does not install peers automatically.
|
That is a really good idea. 👍 |
# Conflicts: # package.json
SparklinesLine and SparklinesCurve received a DRY treatment via the addition of SparklinesSegmentContainer and defaults.js. Includes tests and an updated demo page.
|
Whew! OK, I think this thing is quite complete. Any thoughts? As for me, I still wonder about the |
|
I agree, this being the default options, sounds like a good idea. |
|
I implemented this and one existing test was broken - this one. I'll rebase this on master in a minute, so we can use Travis here again. It's your call, @borisyankov. As a user, I'm comfortable with this change, but I'm just one data point. Having this on by default should probably be semver-major to avoid breaking others' code. |
|
@borisyankov Any thoughts on getting this merged? I could use it :) |
|
@motiz88 any interest in getting this current with |
|
@motiz88 Has been a while. I am committed to merging it into master. |
, borisyankov#122, borisyankov#130 - PR borisyankov#46: Add gap support for null/NaN/Infinity values in data - Modified dataToPoints to mark invalid values with valid flag - Created segmentPoints utility to split data into valid segments - Updated SparklinesLine, SparklinesCurve, and SparklinesBars to handle gaps - Added comprehensive tests for gap handling - PR borisyankov#113: Add fillInvert style option to SparklinesLine - Allows inverting the fill direction for line charts - PR borisyankov#119: Add SparklinesInteractiveLayer component - New component for interactive hover/click with visual feedback - Shows active point with circle and vertical line - PR borisyankov#122: Remove empty onMouseMove handler from SparklinesLine - Made tooltips conditional on onMouseMove presence - PR borisyankov#130: Update README with improved code examples - Use proper JSX syntax highlighting - Wrap examples in function components All tests passing (25 tests across 5 test files)
I'm submitting this PR to gauge interest in the completed feature and get some feedback before I go ahead and implement it all.
The idea is to graphically represent data with in-band
nulls,NaNs or infinite values by drawing the valid (finite numeric) segments separately from one another.