Skip to content

Conversation

@pan-kot
Copy link
Member

@pan-kot pan-kot commented Mar 6, 2025

Description

Introduces new charts components, based on Highcharts v12.

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Mar 6, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@pan-kot pan-kot mentioned this pull request May 15, 2025
orangevolon
orangevolon previously approved these changes Jun 25, 2025
Copy link
Member

@orangevolon orangevolon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a monumental PR! Thanks @pan-kot for driving this, charts look amazing.

@jperals
Copy link
Member

jperals commented Jun 25, 2025

Two issues related to hover effects which I don't think are expected:

  • Other columns are dimmed only when hovering the separation between columns.
column-hover.mov
  • When hovering a column, all error bars get dimmed:
Screenshot 2025-06-25 at 16 06 25

const renderers = getTooltipContentOverrides?.({ point: tooltip.point, group: tooltip.group });
const getTrack = placement === "target" ? api.getTargetTrack : api.getGroupTrack;
const orientation = tooltip.point?.series.chart.inverted ? "horizontal" : "vertical";
const position = (() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected that while hovering between bars, the tooltip keeps being rendered but changes position?

tooltip-jump.mov

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is actually deliberate (almost). I propose that we keep it, unless a better solution is found in the future.

I originally thought that the problem is related to the target rectangles that we use for tooltip placement, but that is not true - the rectangles do not have any margin around the series they are related to.

The problem comes from the mouseover logic we use for groups matching. When the cursor is between columns, it can be in position that does not cross either of the track targets, see:

Screen.Recording.2025-06-25.at.17.28.16.mov

When the cursor does not intersect with either of the rectangles, we can choose to hide the tooltip completely. However, that creates an annoying UX when the tooltip constantly disappears and reappears as the cursor is moved across the chart. To mitigate that, we show the tooltip that corresponds to the closest group, and that creates the effect from the screen recording.

Now, when the tooltip switches between point and group modes, it is not really expected to change the placement. That is actually a bug that originates in the tooltip component, that checks the chart orientation on the point state. That is wrong, because the point is not present when the tooltip mode is group. The bug is addressed here: a0fdcfb

zooming: { type: "x" },
events: {
selection(event) {
setZoom([event.xAxis[0].min, event.xAxis[0].max]);
Copy link
Member

@jperals jperals Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When zooming, the tooltip can be rendered outside of the chart. Should our component handle this?

Screenshot 2025-06-25 at 16 52 49

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that eventually it should, but it is not very clear atm. I would keep it the way it is for now.

@pan-kot
Copy link
Member Author

pan-kot commented Jun 25, 2025

@jperals ,

I addressed the linked errorbars hovering issue here: e605418

Screenshot 2025-06-25 at 17 20 22

@pan-kot pan-kot added this pull request to the merge queue Jun 26, 2025
Merged via the queue into main with commit 229b942 Jun 26, 2025
38 of 39 checks passed
@pan-kot pan-kot deleted the charts-0.1 branch June 26, 2025 08:00
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.