Skip to content

feat: upgrade Highcharts to 12.6.2 - #13289

Draft
totally-not-ai[bot] wants to merge 27 commits into
mainfrom
feat/highcharts-12.6.2
Draft

totally-not-ai[bot] wants to merge 27 commits into
mainfrom
feat/highcharts-12.6.2

Conversation

@totally-not-ai

@totally-not-ai totally-not-ai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review risk: two-way door — @vaadin/charts only; affects chart rendering, exporting and the bundled Highcharts security patches

Summary

Upgrades highcharts in @vaadin/charts from 12.2.0 to 12.6.2 (the latest 12.x), with workarounds for regressions introduced between 12.3 and 12.6, and broader visual coverage. Highcharts backports fixes, including security fixes, only to its latest minor version.

Fixes #12983

Companion PR for the Flow SVG generator: vaadin/flow-components#10520

The new visual tests (more chart types and the non-styled suite) landed in #13291 with Highcharts 12.2.0 baselines. This PR updates the baselines that change with 12.6.2.

What changed

  • Bump highcharts to 12.6.2.
  • vaadin-chart-mixin.js workarounds:
    • Export path: since 12.3 exporting.local defaults to true, so PNG, JPEG and SVG exports render in the browser instead of being posted to the export server. That makes exporting.url and width have no effect, fails PDF exports when fallbackToExportServer is off, and needs blob: and data: sources in a Content Security Policy. Remove the default and wrap Exporting.prototype.exportChart to keep the 12.2 rule: export on the server, unless the app loads the offline-exporting module (which used to switch the download menu items and exportChartLocal() to the browser) or sets exporting.local itself. To be removed in the next major version to adopt the Highcharts default.
    • Export styles: since 12.3 nothing calls Chart.prototype.getSVG, so wrap Exporting.prototype.getSVG and fire afterExport once the async export settles, also when it fails. Exports are counted per chart and a print is tracked separately, so the body keeps the copied styles and the styled-mode attribute until the last overlapping export or print is done, also when both are of the same chart. Detaching a chart while its export is pending removes them too, as the destroyed chart can no longer fire afterExport.
    • Solid gauge colors (Solid Gauge arc highcharts-color-{n} class removed when yAxis has stops (regression in 12.3.0; worked in 12.2.0) highcharts/highcharts#23279): re-apply the point color classes in styled mode when yAxis.stops carries no usable color.
    • Animated solid gauge clipping (Regression: clipped pane in solid gauge highcharts/highcharts#24460, since 12.5): port the upstream fix that uses the plot area as the clip box for series on radial axes.
    • Outside tooltip in a scrollable plot area (Wrong tooltip position with scrollable plot area highcharts/highcharts#24548, since 12.6): port the upstream fix so the tooltip stays next to its point.
  • Visual baselines updated for 12.6.2. The new visual tests themselves are in test: add chart visual coverage for more chart types and non-styled mode #13291.
  • Separate commit: remove the patches in highcharts-patches.js that 12.6.1/12.6.2 now include (setNestedProperty, addCredits, AST.filterUserAttributes for xlink:href, AST.parseMarkup), the tests of the markup parser fallback, and highcharts-policy.js, which only the markup patch used. The tests for point keys, credits links and xlink:href stay, so they now check the fixes Highcharts ships. optionsToObject and _defaultSetter stay.

Behavior changes (release notes)

  • exportChart() returns a promise.
  • credits.href only accepts links matching AST.allowedReferences (https://, http://, mailto:, /, ./, ../, #). Previously our patch only rejected javascript:, vbscript: and data:, so e.g. about.html or tel: links are now ignored.
  • A vertical heatmap color axis is no longer reversed (12.4); colorAxis.reversed: true restores the old look.
  • Some y-axis grid lines move by 1 px, sub-pixel changes on pie edges, markers and polar panes.

Test summary

  • Unit tests for each workaround (export events including failed exports and exports overlapping with another export or a print, solid gauge classes, clip box, outside tooltip position, annotation labels), styled and non-styled.
  • Unit tests for the export path: the export server by default and from the download menu items, the browser when exporting.local is set as an option or passed to exportChart(), and the browser from exportChartLocal() and the download menu items when the offline-exporting module is loaded.
  • Regression tests for point keys, credits links and xlink:href run against 12.6.2 without the removed patches.
  • Charts unit tests, ESLint and tsc pass locally.
  • Visual baselines regenerated for 12.6.2, including the chart types and non-styled scenarios added in test: add chart visual coverage for more chart types and non-styled mode #13291.

🤖 Generated with Claude Code

Working on behalf of Serhii

DiegoCardoso and others added 12 commits October 27, 2026 14:25
Since Highcharts 12.3 the export methods live on an Exporting instance and the
getSVG left on Chart is a proxy with no internal callers, so the export events
stopped firing and exports lost the shadow root styles. getSVGForExport runs
getSVG in async mode, so afterExport now waits for the promise to settle.
Highcharts removes the color classes from solid gauge points whenever
yAxis.stops is set. The stops always fall back to minColor and maxColor, which
are undefined in styled mode, so the points render invisible. Re-apply the
class list, including the point state class, when the stops carry no color.

Workaround for highcharts/highcharts#23279
Since Highcharts 12.5 a setClip listener offsets the clip box of series on
gauge and polar charts by the pane position, which cuts off the top and left of
an animated solid gauge whose arc reaches the pane edge. Remove the listener
and use the plot area as the clip box for series on radial axes, as upstream
does in Highcharts 13.

Workaround for highcharts/highcharts#24460
Since Highcharts 12.6 an outside tooltip adds the scroll offset of a
scrollable plot area to a default position that already accounts for it, so
the tooltip moves away from the point by the scrolled distance.

Workaround for highcharts/highcharts#24548
Highcharts 12.4 no longer reverses a vertical color axis by default, and no
longer rounds y-axis grid lines twice on non-stock charts, which moves some
grid lines by one pixel.
Baselines are generated on Highcharts 12.2.0.
…d suite

The non-styled chart suite renders the outside tooltip in light, dark
and prefers-dark, so the separate base fixture is redundant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Highcharts 12.6.1 and 12.6.2 reject reserved point key segments, filter
credits and xlink:href links through the AST allow list, and parse
markup in an inert document. Remove the duplicate patches, their tests,
and the Trusted Types policy helper that only the markup patch used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@totally-not-ai totally-not-ai Bot changed the title feat: upgrade Highcharts to 12.6.2 chore: upgrade Highcharts to 12.6.2 Oct 27, 2026
The non-styled outside tooltip now keeps the Highcharts look, so
regenerate the baselines that the non-styled suite added before that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@web-padawan web-padawan changed the title chore: upgrade Highcharts to 12.6.2 feat: upgrade Highcharts to 12.6.2 Oct 27, 2026
totally-not-ai Bot and others added 7 commits October 27, 2026 14:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkaround

Annotation labels call Tooltip#getPosition with a stand-in object that
has no options, so only read them for an outside tooltip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An export now waits for the chart copy to render, so two exports can
overlap. Remove the attribute only when the last styled export is done,
and cover failed sync and async exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore the point key, credits link and xlink:href tests, which assert
outcomes rather than the removed patches. Credits links outside the
Highcharts allow list, such as about.html or tel:, are now ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eaches

The dark and prefers-dark runs, and the Lumo and Aura runs, rendered
the same images as the base light run for every chart type painted
with presentation attributes. Keep only the tooltip, HTML label,
exporting menu and export copy scenarios there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add screenshot tests for stacking, ranges, waterfall, data labels, 3D,
annotations, drilldown and flags, and a non-styled suite that renders
the charts with `chart.styledMode: false`, the way the Flow `Chart`
does by default. Base renders every chart type; dark, prefers-dark,
Lumo and Aura render only what a colour scheme or theme can reach:
the tooltip, HTML labels, the exporting menu and the export copy.

The base `tooltip-outside-non-styled` screenshot is dropped, as the
non-styled suite renders the same outside tooltip in light and dark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@totally-not-ai
totally-not-ai Bot changed the base branch from main to test/chart-visual-coverage October 27, 2026 16:18
@sissbruecker
sissbruecker force-pushed the test/chart-visual-coverage branch from 152c640 to 305b10d Compare October 28, 2026 11:43
sissbruecker added a commit that referenced this pull request Oct 28, 2026
…ode (#13291)

## Description

Related to #12983

Adds visual coverage for `@vaadin/charts` ahead of the Highcharts 12.6.2
upgrade in #13289, so that the upgrade PR only shows the baselines that
change with the new version.

- Added styled-mode screenshot tests for stacked column, percent stacked
area, ranges, waterfall, data labels, 3D column and pie, annotations,
drilldown and flags
- Added a non-styled suite, `base/chart-non-styled.test.js`, that
renders every fixture with `chart.styledMode: false`, the default of the
Flow `Chart`
- Highcharts then paints with presentation attributes, and the base
styles are scoped to `[styled-mode]`, so these baselines show the plain
Highcharts look and guard against Vaadin styles leaking into it
- Added fixtures that only the non-styled suite renders: line, area, bar
and scatter, pie, a solid gauge with and without `yAxis.stops`
(highcharts/highcharts#23279), and a chart next to its `getSVG()` export
- Removed the `tooltip-outside-non-styled` pair from the styled suite,
as the non-styled suite renders the same outside tooltip
- Rendered all baselines with the current Highcharts 12.2.0

## Type of change

- Tests

> [!NOTE]
> A follow-up branch, `test/chart-non-styled-base-ref`, makes the Aura
and Lumo suites compare their non-styled renders against these base
baselines. It changes the visual test runner, so it gets its own PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Base automatically changed from test/chart-visual-coverage to main October 28, 2026 11:59
# Conflicts:
#	packages/charts/test/visual/base/chart-non-styled.test.js
#	packages/charts/test/visual/base/screenshots/chart-non-styled/baseline/export-svg.png
#	packages/charts/test/visual/base/screenshots/chart-non-styled/baseline/heatmap.png
#	packages/charts/test/visual/base/screenshots/chart-non-styled/baseline/stacked-area.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/annotations.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/data-labels.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/drilldown.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/flags.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/ranges.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/stacked-area.png
#	packages/charts/test/visual/base/screenshots/chart/baseline/stacked-column.png
#	packages/charts/test/visual/chart.common.js
…inish

Count pending exports per chart and track a print separately, so neither
a second export of the same chart nor a print that ends during an export
removes the body styles while a chart copy is still rendering.
vaadin-bot pushed a commit to vaadin/platform that referenced this pull request Oct 29, 2026
The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vaadin-bot pushed a commit to vaadin/platform that referenced this pull request Oct 29, 2026
The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vaadin-bot pushed a commit to vaadin/platform that referenced this pull request Oct 29, 2026
The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ZheSun88 added a commit to vaadin/platform that referenced this pull request Oct 29, 2026
* chore: update versions.json in 25.3 with latest WC

* chore: add SBOM notes for opentelemetry-api, picomatch and lerc

- opentelemetry-api 1.66.0: also cover CVE-2026-118259, test only via
  selenium-remote-driver, inbound tracestate is never extracted
- picomatch 4.0.7 (CVE-2026-112366): build time only, no fix released
- lerc 3.0.0 (CVE-2026-10758): GeoTIFF decoder not on Vaadin Map path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: add SBOM note for highcharts 12.2.0

The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Highcharts 12.3 defaults `exporting.local` to `true`. Keep the 12.2
behavior for now: export on the server unless the app loads the
offline-exporting module or sets `exporting.local`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ZheSun88 added a commit to vaadin/platform that referenced this pull request Oct 29, 2026
* chore: update versions.json in 25.2 with latest WC

* chore: add SBOM notes for opentelemetry-api, picomatch and lerc

- opentelemetry-api: also cover CVE-2026-118259, test only via
  selenium-remote-driver, inbound tracestate is never extracted
- picomatch 4.0.7 (CVE-2026-112366): build time only, no fix released
- lerc 3.0.0 (CVE-2026-10758): GeoTIFF decoder not on Vaadin Map path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: add SBOM note for highcharts 12.2.0

The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ZheSun88 added a commit to vaadin/platform that referenced this pull request Oct 30, 2026
* chore: add SBOM notes for opentelemetry-api, picomatch and lerc

- opentelemetry-api: also cover CVE-2026-118259, test only via
  selenium-remote-driver, inbound tracestate is never extracted
- picomatch 4.0.7 (CVE-2026-112366): build time only, no fix released
- lerc 3.0.0 (CVE-2026-10758): GeoTIFF decoder not on Vaadin Map path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: add SBOM note for highcharts 12.2.0

The five Highcharts CVEs are fixed in Vaadin Charts by vaadin/web-components#12886 without bumping the bundled Highcharts. Scanners keep flagging 12.2.0 by version until vaadin/web-components#13289 bumps it to 12.6.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

Upgrade Highcharts to 12.6.2 in the next minor version

2 participants