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

D3fc plugin - "Nearby" tooltips for some charts #484

Merged
merged 24 commits into from
Mar 18, 2019

Conversation

matt-hooper
Copy link
Contributor

  • Tooltips for line charts, area charts and canvas based XY scatter using nearby point logic
  • Added nearby point logic to Y scatter
  • Removed SVG XY scatter chart. Canvas XY scatter is now the default
  • Additional refactors and bug-fixes

Matthew Hooper and others added 24 commits March 14, 2019 12:12
Get x/y range from plot-area "measure" event
Use a generic approach (similar to mainAxis) for getting closest point
Added option to existing tooltip component to allow for always-show
Added tooltips for canvas scatter chart
New approach to setting xAxis/yAxis lead to a slightly different method for styling the axis too.
The d3fc chart replaces the axis `decorate` function with its own `xDecorate` function, so we need to set that directly.
* Removed old SVG X/Y chart and replace with the Canvas one

* Remove old pointSeries
Replaced use of Array.flat
"Fixed" `withoutOpacity` function so that it uses "rgb()" instead of "rgba()"
Added workaround for weird Edge issue that doesn't render the plot-area of some charts (bar/column charts and heatmap) unless you resize the window. An immediate redraw of the D3 element seems to work, but is not great.
It turns out we don't actually need to use copies of the scales, and therefore can avoid decorating the chart object to get the "measure" (though this approach does require calling the "toolTip" component after the chart has been rendered. This allows us to simplify the code quite a lot.
Also:
* rebind `settings` and other properties from base tooltip component
* added `size` option for controlling highlight sizing (though the "range" has to be modified because the symbol size behaviour isn't the same as the circle radius behaviour)
* Use nearby-tooltip for the y-scatter chart, since it's a better experience
@texodus
Copy link
Member

texodus commented Mar 18, 2019

Thanks for the PR! Looks great!

@texodus texodus merged commit 9ed7f20 into finos:master Mar 18, 2019
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.

3 participants