palantir / plottable

:bar_chart: A library of modular chart components built on D3
http://plottablejs.org/
MIT License
2.97k stars 223 forks source link

look into removing foreground() and background() elements #3260

Open hellochar opened 7 years ago

hellochar commented 7 years ago

Component adds a foreground() and background() svg element to every Component. This are not used in our own code and only exist as a convenience for users to add custom visuals before/after the content. In an HTML world this may not make sense anymore (or at least they shouldn't be SVG specific).

Look into removing them: see if our users use it and how they use it.

adidahiya commented 7 years ago

We use this right now to render tooltips on grid plots, but it should be easy enough to migrate to an HTML-based implementation.

danielbaak commented 7 years ago

I've tried following the tooltip tutorial (http://plottablejs.org/tutorials/tooltips/) with plottable v3.1.1. It doesn't work.

apparently the API of .foreground() has changed?

hellochar commented 7 years ago

Hey @danielbaak our website and docs aren't up to date for 3.1.1 yet - see #3342. We haven't modified the .foreground() api yet though; what exactly goes wrong?

zmandel commented 7 years ago

@hellochar Im also seeing issues with using .foreground(). Ive spent lots of time debugging this but still cant pinpoint why all my custom drawing (lines, crosshairs) no longer work, they all use similar code to this crosshair example, as in var crosshairContainer = plot.foreground().append("g") in http://plottablejs.org/examples/finance/

hellochar commented 7 years ago

@zmandel can you file a separate issue with a repro of what you're seeing? I'll take a look :)

zmandel commented 7 years ago

@hellochar thank you! https://github.com/palantir/plottable/issues/3382