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 - Basic OHLC and Candlestick charts #488

Merged
merged 64 commits into from
Mar 25, 2019

Conversation

matt-hooper
Copy link
Contributor

Added D3FC Candlestick and Open, High, Low, Close (OHLC) charts and added a new example to the Simple examples to demonstrate.

image

image

Matthew Hooper and others added 30 commits March 8, 2019 16:59
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.
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
@timkpaine timkpaine added enhancement Feature requests or improvements JS labels Mar 18, 2019
@timkpaine
Copy link
Member

I can finally kill my highcharts candlesticks branch!

@andy-lee-eng andy-lee-eng deleted the d3fc_plugin branch March 22, 2019 11:32
@matt-hooper matt-hooper restored the d3fc_plugin branch March 22, 2019 16:01
@texodus
Copy link
Member

texodus commented Mar 25, 2019

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.

@texodus texodus merged commit 389356d into finos:master Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants