-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat(series): markSizeAccessor and BubbleSeries (alpha) #559
Conversation
This looks like a first step towards a real scatter chart, right? #502 |
Instead of calling this |
b7b2db7
to
9f25616
Compare
9f25616
to
1d937ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done a quick check through the PR code and added few minor comments
I've found some weird issues when moving my mouse over multiple points
Seems that in some cases the number of datapoints in the tooltip is different from the number of elements highlighted (I can spot some duplicated values, like the bubbles 80 in this example)
- Use linear index with area/line charts until tooltip re-design - Split stories into area/line with marks and bubble - Remove x value in tooltip when multiple values are present
- Fix type errors with mark chages - Random number generator logic - multiple x from source not positional value - Bring back error on band scales - Fix sorting function with string geo keys
- Cleanup yDomain tests with mocks - Cleanup stackedPercentSeries tests with mocks - Add isDefined and isDefinedFrom with tests - Make mark prop on RawDatum optional - Require datum on DataSeriesDatum - Update series mocks - Add rawDataSeries mock from data or data[] - Fix issue with null values in mergePartial
- Update mergePartial logic to treat Maps like Objects - Update mergePartial logic to treat Sets like Arrays - Add tests for new functionality
- Add Geometry mocks - Update Rendering bands tests with mocks
- Fix RecursivePartial for nested any, any[], Set and Map - Add option to mergeMaps, default is to replace.
- point tests - rendering area tests - rendering bubble tests - rendering line tests - general rendering tests - band and continuous scale tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, great work on that!
Tested locally and works fine. I think we should address in the near future adding a more descriptive tooltip because is not very clear to me, what is X, Y, and radius value
@markov00 I agree, we really need to update the tooltip to account for more cases. |
# [18.4.0](v18.3.0...v18.4.0) (2020-04-22) ### Bug Fixes * **partition:** single slice wrong text positioning ([#643](#643)) ([6298d36](6298d36)), closes [#637](#637) * **treemap:** align onElementClick parameters to sunburst ([#636](#636)) ([2c1d224](2c1d224)), closes [#624](#624) ### Features * allow colorVariant option for series specific color styles ([#630](#630)) ([e5a206d](e5a206d)) * **series:** BubbleSeries (alpha) and markSizeAccessor ([#559](#559)) ([3aa235e](3aa235e))
🎉 This PR is included in version 18.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [18.4.0](elastic/elastic-charts@v18.3.0...v18.4.0) (2020-04-22) ### Bug Fixes * **partition:** single slice wrong text positioning ([opensearch-project#643](elastic/elastic-charts#643)) ([f8b5b8a](elastic/elastic-charts@f8b5b8a)), closes [opensearch-project#637](elastic/elastic-charts#637) * **treemap:** align onElementClick parameters to sunburst ([opensearch-project#636](elastic/elastic-charts#636)) ([8dd87bf](elastic/elastic-charts@8dd87bf)), closes [opensearch-project#624](elastic/elastic-charts#624) ### Features * allow colorVariant option for series specific color styles ([opensearch-project#630](elastic/elastic-charts#630)) ([e2444ef](elastic/elastic-charts@e2444ef)) * **series:** BubbleSeries (alpha) and markSizeAccessor ([opensearch-project#559](elastic/elastic-charts#559)) ([85d9bda](elastic/elastic-charts@85d9bda))
Summary
Closes #533
Allow for a
markSizeAccessor
to render as radius size for point values. Copied Kibana logic for dotRadio using a step function, but this could be replaced with our own continuous sizing function.Add
BubbleSeries
spec. This spec only draws points with no lines. The unique aspect of this type is that it uses thed3-delaunay
spatial indexing approach. Currently, this does not work well with other chart spec types as the tooltip will show all values in range even on different x values. This is NOT a scatter plot, this type will come in another PR in the future.Tasks:
Bubble
Area
Line
Checklist
src/index.ts
(and stories only import from../src
except for test data & storybook)