-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 - Basic OHLC and Candlestick charts #488
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove duplicate withOutOpacity method from seriesColours
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
Refactored tooltips into cartesian-chart component
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.
Updated d3fc and replaced local cartesianSvgChart
* 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.
Add tooltips for Area charts
replace colour references with color
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
Improved and simplified nearby-tooltip code and used on y-scatter
Tooltip fixes
Updated d3fc and used its new ordinalAxis
basic OHLC / candlestick charts
remove unnecessary slice
Basic OHLC and Candlestick charts
I can finally kill my highcharts candlesticks branch! |
update perspective-viewer-d3fc/test/results
update perspective-viewer-d3fc/test/results
…nto feature/color_ohlc
…ifferent length dataset caused a problem
Add upColors and downColors to series
Add candlestick/ohlc legend
Thanks for the PR! This has been on the top of the feature request list for a long time! It would be great if in the future, Perspective could calculate time buckets like this so we could create these chart types from arbitrary data. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added D3FC Candlestick and Open, High, Low, Close (OHLC) charts and added a new example to the Simple examples to demonstrate.