Skip to content

Conversation

@80avin
Copy link

@80avin 80avin commented Feb 11, 2026

fixes #13
It works, but I don't like the presence of

  • DrawingBackend::with_tooltips function
    tooltip should be enabled per chart, not backend.
  • draw_series_with_tooltips api.
    Ideally, it should work with draw_series API and tooltip should be a configuration parameter.

Challenge:

  • The library gives user the control over when to draw. Because of this, we don't have enough information in draw_series to emit the tooltips code.

Alternative API:

  • chart.tooltip_mode(TooltipMode) shall enable tooltips for current chart.
    mode can be "Auto", "Always", "Disable". If Always and the backend doesn't support, there should be error.
  • On every draw ( and .label, etc) call, keep on building internal state.
    Also, SVG backend shall add classes wherever required to uniquely identify elements, if tooltip mode is enabled.
  • On present call, add javascript to enable tooltips.
image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] Interactivity

1 participant