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

Refactor tooltip and crosshair components #31

Open
absingla opened this issue Apr 11, 2017 · 2 comments
Open

Refactor tooltip and crosshair components #31

absingla opened this issue Apr 11, 2017 · 2 comments

Comments

@absingla
Copy link

Crosshair is a service component as well as tooltip, legend around composite-y.
I can distinguish two approaches:

  1. Currently tooltip renders itself into separate container outside the chart on special event thrown out of the chart. This is done via overlaying svg compositeY container with exact coordinates prepared specifically for tooltip in the chart. That is a consistent way to implement crosshair as well.

  2. While legend can be rendered in its own container outside the chart, tooltip and crosshair should better reside within svg along with chart drawings. Same as Line, Bar and other drawings are. In this case crosshair would be able to listen to svg mouse events on its own.
    But Line and Bar are implemented as subviews of CompositeY which is not a true component approach too.
    So, in order to implement Crosshair as a component it should accept svg as container, listen to its mouse events and have a reference to parent config model (compositeY.config) as new implementation of legend and colorPicker does (see htmlcontainer branch). By this reference crosshair would be able to retrieve right data (from own reference to dataModel) and format it for rendering (timestamp).

@absingla
Copy link
Author

  1. Can we add crosshair as a property of tooltip?
  2. Allow crosshair in bubble chart
  3. Show colors of fields in tooltip
  4. How to handle tooltip for multiple points on same x, y coordinates?

@Dmitra
Copy link
Contributor

Dmitra commented Jun 3, 2017

Crosshair was successfully implemented as standalone component https://github.com/Juniper/contrail-charts/tree/master/src/components/crosshair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants