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] Canvas plots don't have tooltips with d3fc@14.0.44 #678

Closed
quigleyj-mavenomics opened this issue Aug 9, 2019 · 2 comments · Fixed by #683
Closed

[D3FC] Canvas plots don't have tooltips with d3fc@14.0.44 #678

quigleyj-mavenomics opened this issue Aug 9, 2019 · 2 comments · Fixed by #683
Labels
JS question Questions about use, potential features, or improvements

Comments

@quigleyj-mavenomics
Copy link

There's an issue with tooltips on canvas charts (eg, the Candlesticks and OHLC charts) where they target an element d3fc-svg svg instead of targeting the chart more generically. This worked previously, as D3FC apparently created both a <canvas> element and an <svg> element regardless of the chart's actual type.

However, as of d3fc@14.0.44, it now only instantiates one or the other. As a result, charts that use SVGs work as expected, whereas charts that use Canvas elements don't get tooltips.

This was a patch update for D3FC, and in the Perspective repo's yarn lockfile it's pulling in d3fc@14.0.40. This version does not include the change and thus works as expected.

@timkpaine timkpaine added JS question Questions about use, potential features, or improvements labels Aug 13, 2019
@texodus
Copy link
Member

texodus commented Aug 14, 2019

Thanks for the exceptionally well researched report, it is very helpful! I'll get this fixed - in what environment are you seeing d3fc@14.0.44 ?

@quigleyj-mavenomics
Copy link
Author

We started seeing it after we refreshed our yarn lockfile- @finos/perspective-viewer-d3fc uses a caret pin so 14.0.44 is in-range. Our project doesn't have a direct dependency on d3fc, just Perspective and the Perspective D3FC plugin. Here's the relevant entry from our yarn lockfile:

d3fc@^14.0.34:
  version "14.0.44"
  resolved "https://registry.yarnpkg.com/d3fc/-/d3fc-14.0.44.tgz#34c7f87a57ceb5574ac04f9b59e468993004e82d"
  integrity sha512-ILL+u/tEQOlV+P8KNhaq14hnQGL2F1Oukk8MMV7C0Jk0crOSlaEsoe94oXZmJ7mwvio4S536G0d4hDPzSiM3xw==

The workaround is to use yarn resolutions, so that we can force 14.0.40 instead (which works):

d3fc@14.0.40, d3fc@^14.0.34:
  version "14.0.40"
  resolved "https://registry.yarnpkg.com/d3fc/-/d3fc-14.0.40.tgz#568098ca3e220fac132c7a154299a858abae26ef"
  integrity sha512-rThy0zNIEeWzmAkUshZJLU3ACNWvnP0o2qQyCuW/IXzAhRVuuLtGm4HnIA44+a4pFYbgGS6OSiZf5bCK/uVnUA==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS question Questions about use, potential features, or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants