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

[charts] ChartsTooltip and ChartsAxisHighlight not re-render when update series data #15565

Open
winey-dev opened this issue Nov 23, 2024 · 2 comments
Labels
bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module!

Comments

@winey-dev
Copy link

winey-dev commented Nov 23, 2024

Steps to reproduce

example: codesendbox

Current behavior

  1. I'm using TSDB and I'm receiving an updated series dataset by setting the interval to 10 seconds.

  2. When the mouse pointer is on top of the chart, the ChartsTooltip and ChartsAxisHighlight are rendered on top of the chart.

  3. The problem occurs when the received data is rendered to Chart after 10 seconds.
    MarkPlot is currently displaying a good re-branding above the mouse pointer, but the ChartsTooltip and ChartsAxisHighlight are not re-branding.

Expected behavior

I believe that when the series data is updated, the ChartsTooltip and ChartsAxisHighlight information should also be re-rendered to reflect the current information, similar to MarkPlot.

Context

MarkPlot, ChartsTooltip, and ChartsAxisHighlight are components with similar characteristics but are heading in different directions, causing a lack of synchronization. I believe it would be beneficial to align these three components to ensure consistency.

Additionally, it would be ideal if users could choose the conditions under which re-rendering occurs within the same chart area. For example, one user might want to view continuous data through the tooltip, while another might prefer the tooltip's content to remain fixed.

Your environment

npx @mui/envinfo
 System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 22.9.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (131.0.2903.51)
  npmPackages:
    @emotion/react: ^11.13.3 => 11.13.3
    @emotion/styled: ^11.13.0 => 11.13.0
    @mui/base:  5.0.0-beta.58
    @mui/core-downloads-tracker:  6.1.1
    @mui/icons-material: ^6.1.1 => 6.1.1
    @mui/lab: ^6.0.0-beta.11 => 6.0.0-beta.11
    @mui/material: ^6.1.1 => 6.1.1
    @mui/private-theming:  6.1.1
    @mui/styled-engine:  6.1.1
    @mui/styles: ^6.1.1 => 6.1.1
    @mui/system: ^6.1.1 => 6.1.1
    @mui/types:  7.2.17
    @mui/utils:  6.1.3
    @mui/x-charts: ^7.22.1 => 7.22.1
    @mui/x-charts-vendor:  7.20.0
    @mui/x-internals:  7.20.0
    @mui/x-tree-view: ^7.20.0 => 7.20.0
    @types/react:  18.3.7
    react: ^18 => 18.3.1
    react-dom: ^18 => 18.3.1
    typescript: 5.6.3 => 5.6.3

Search keywords: ChartsTooltip,ChartsAxisHighlight

@winey-dev winey-dev added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 23, 2024
@github-actions github-actions bot added the component: charts This is the name of the generic UI component, not the React module! label Nov 23, 2024
@michelengelen michelengelen changed the title ChartsTooltip, ChartsAxisHighlight not re-render when update series data [charts] ChartsTooltip and ChartsAxisHighlight not re-render when update series data Nov 25, 2024
@michelengelen
Copy link
Member

Hey @winey-dev
Thanks for opening an issue!
I'll add this to the board. 👍🏼

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 25, 2024
@alexfauquette
Copy link
Member

I do not manage to get the reproduction working, but that sounds fairly similar to #15065

The root cause is the tooltip state being updated only by pointer event, so its blind to item updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: charts This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants