@vaadin/charts 25.1.13 → 25.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/charts",
3
- "version": "25.1.13",
3
+ "version": "25.1.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,17 +35,17 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/component-base": "~25.1.13",
39
- "@vaadin/vaadin-themable-mixin": "~25.1.13",
38
+ "@vaadin/component-base": "~25.1.14",
39
+ "@vaadin/vaadin-themable-mixin": "~25.1.14",
40
40
  "highcharts": "12.2.0",
41
41
  "lit": "^3.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@vaadin/aura": "~25.1.13",
45
- "@vaadin/chai-plugins": "~25.1.13",
46
- "@vaadin/test-runner-commands": "~25.1.13",
44
+ "@vaadin/aura": "~25.1.14",
45
+ "@vaadin/chai-plugins": "~25.1.14",
46
+ "@vaadin/test-runner-commands": "~25.1.14",
47
47
  "@vaadin/testing-helpers": "^2.0.0",
48
- "@vaadin/vaadin-lumo-styles": "~25.1.13",
48
+ "@vaadin/vaadin-lumo-styles": "~25.1.14",
49
49
  "sinon": "^21.0.2"
50
50
  },
51
51
  "cvdlName": "vaadin-chart",
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "096f6a289e018a246f3bfb0162d52fd1c2fd6bce"
57
+ "gitHead": "e1e68f0783c9b6c50ac194086d15e5ca91d00d24"
58
58
  }
@@ -21,9 +21,32 @@ import '@vaadin/component-base/src/styles/user-colors.js';
21
21
  import { css, unsafeCSS } from 'lit';
22
22
  import { addGlobalStyles } from '@vaadin/component-base/src/css-utils.js';
23
23
 
24
- /* Tooltip styles, to support `"tooltip": { "outside": true }` config option */
24
+ const seriesColorTokens = Array.from(
25
+ { length: 10 },
26
+ (_, i) =>
27
+ `--_color-${i}: var(--highcharts-color-${i}, var(--vaadin-charts-color-${i}, var(--vaadin-user-color-${i})));`,
28
+ ).join('\n ');
29
+
30
+ // A non-split tooltip carries highcharts-color-N on the tooltip element itself,
31
+ // a split one on its child boxes, so both selectors are needed.
32
+ const seriesColorRules = Array.from(
33
+ { length: 10 },
34
+ (_, i) =>
35
+ `.highcharts-tooltip-container .highcharts-tooltip.highcharts-color-${i},
36
+ .highcharts-tooltip-container .highcharts-tooltip .highcharts-color-${i} { fill: var(--_color-${i}); stroke: var(--_color-${i}); }`,
37
+ ).join('\n');
38
+
39
+ /* Emitted at both scopes, so it looks absent from upstream Highcharts. Do not prune. */
25
40
  // postcss-lit-disable-next-line
26
41
  const tooltipStyles = (scope) => css`
42
+ ${unsafeCSS(scope)} .highcharts-strong {
43
+ font-weight: bold;
44
+ }
45
+
46
+ ${unsafeCSS(scope)} .highcharts-emphasized {
47
+ font-style: italic;
48
+ }
49
+
27
50
  ${unsafeCSS(scope)} .highcharts-tooltip {
28
51
  cursor: default;
29
52
  pointer-events: none;
@@ -32,9 +55,17 @@ const tooltipStyles = (scope) => css`
32
55
  filter: drop-shadow(var(--vaadin-charts-tooltip-shadow, 0 4px 8px rgba(0, 0, 0, 0.2))) !important;
33
56
  }
34
57
 
58
+ /* Marked by the mixin for stickOnContact, which Highcharts itself only honours
59
+ outside styled mode. See highcharts/highcharts#25310. */
60
+ ${unsafeCSS(scope)} .highcharts-tooltip.vaadin-chart-sticky-tooltip {
61
+ pointer-events: auto;
62
+ }
63
+
35
64
  ${unsafeCSS(scope)} .highcharts-tooltip text,
36
65
  ${unsafeCSS(scope)} .highcharts-tooltip foreignObject span {
37
66
  fill: var(--highcharts-neutral-color-80, var(--vaadin-charts-data-label, var(--vaadin-text-color)));
67
+ /* The tooltip carries the series color, and stroke inherits into the glyphs. */
68
+ stroke-width: 0;
38
69
  }
39
70
 
40
71
  ${unsafeCSS(scope)} .highcharts-tooltip .highcharts-tracker {
@@ -65,6 +96,12 @@ const tooltipStyles = (scope) => css`
65
96
  addGlobalStyles(
66
97
  'vaadin-charts-tooltip',
67
98
  css`
99
+ .highcharts-tooltip-container {
100
+ ${unsafeCSS(seriesColorTokens)}
101
+ }
102
+
103
+ ${unsafeCSS(seriesColorRules)}
104
+
68
105
  .highcharts-tooltip-container .highcharts-root {
69
106
  overflow: visible;
70
107
  font-size: var(--vaadin-charts-font-size, 0.75rem);
@@ -87,20 +124,13 @@ export const chartStyles = css`
87
124
  font-size: var(--vaadin-charts-font-size, 0.75rem);
88
125
  line-height: normal;
89
126
 
90
- /* Needs to be a color, not a background image */
127
+ /* Needs to be a color, not a background image. A theme may set it to transparent. */
91
128
  --_bg: var(--vaadin-charts-background, var(--vaadin-background-color));
129
+ /* What elements drawn on the canvas read against. A transparent canvas has to
130
+ declare what shows through instead. */
131
+ --_surface: var(--vaadin-charts-surface, var(--_bg));
92
132
 
93
- --_color-0: var(--highcharts-color-0, var(--vaadin-charts-color-0, var(--vaadin-user-color-0)));
94
- --_color-1: var(--highcharts-color-1, var(--vaadin-charts-color-1, var(--vaadin-user-color-1)));
95
- --_color-2: var(--highcharts-color-2, var(--vaadin-charts-color-2, var(--vaadin-user-color-2)));
96
- --_color-3: var(--highcharts-color-3, var(--vaadin-charts-color-3, var(--vaadin-user-color-3)));
97
- --_color-4: var(--highcharts-color-4, var(--vaadin-charts-color-4, var(--vaadin-user-color-4)));
98
- --_color-5: var(--highcharts-color-5, var(--vaadin-charts-color-5, var(--vaadin-user-color-5)));
99
- --_color-6: var(--highcharts-color-6, var(--vaadin-charts-color-6, var(--vaadin-user-color-6)));
100
- --_color-7: var(--highcharts-color-7, var(--vaadin-charts-color-7, var(--vaadin-user-color-7)));
101
- --_color-8: var(--highcharts-color-8, var(--vaadin-charts-color-8, var(--vaadin-user-color-8)));
102
- --_color-9: var(--highcharts-color-9, var(--vaadin-charts-color-9, var(--vaadin-user-color-9)));
103
-
133
+ ${unsafeCSS(seriesColorTokens)}
104
134
  --_color-0-label: oklch(from var(--_color-0) clamp(0, (0.62 - l) * 1000, 1) 0 0);
105
135
  --_color-1-label: oklch(from var(--_color-1) clamp(0, (0.62 - l) * 1000, 1) 0 0);
106
136
  --_color-2-label: oklch(from var(--_color-2) clamp(0, (0.62 - l) * 1000, 1) 0 0);
@@ -118,7 +148,7 @@ export const chartStyles = css`
118
148
  --_label: var(--vaadin-charts-label, var(--vaadin-text-color));
119
149
  --_secondary-label: var(--vaadin-charts-secondary-label, var(--vaadin-text-color-secondary));
120
150
  --_disabled-label: var(--vaadin-charts-disabled-label, var(--vaadin-text-color-disabled));
121
- --_point-border: var(--vaadin-charts-point-border, var(--_bg));
151
+ --_point-border: var(--vaadin-charts-point-border, var(--_surface));
122
152
  --_axis-line: var(--vaadin-charts-axis-line, var(--vaadin-border-color-secondary));
123
153
  --_axis-title: var(--vaadin-charts-axis-title, var(--_secondary-label));
124
154
  --_axis-label: var(--vaadin-charts-axis-label, var(--_secondary-label));
@@ -168,14 +198,6 @@ export const chartStyles = css`
168
198
  stroke-width: 0;
169
199
  }
170
200
 
171
- :where([styled-mode]) .highcharts-strong {
172
- font-weight: bold;
173
- }
174
-
175
- :where([styled-mode]) .highcharts-emphasized {
176
- font-style: italic;
177
- }
178
-
179
201
  :where([styled-mode]) .highcharts-anchor {
180
202
  cursor: pointer;
181
203
  }
@@ -478,7 +500,7 @@ export const chartStyles = css`
478
500
 
479
501
  :where([styled-mode]) .highcharts-markers {
480
502
  stroke-width: 1px;
481
- stroke: var(--highcharts-background-color, var(--_bg));
503
+ stroke: var(--highcharts-background-color, var(--_surface));
482
504
  }
483
505
 
484
506
  :where([styled-mode])
@@ -717,7 +739,7 @@ export const chartStyles = css`
717
739
  /* Loading */
718
740
  :where([styled-mode]) .highcharts-loading {
719
741
  position: absolute;
720
- background-color: var(--highcharts-background-color, var(--_bg));
742
+ background-color: var(--highcharts-background-color, var(--_surface));
721
743
  opacity: 0.5;
722
744
  text-align: center;
723
745
  z-index: 10;
@@ -761,7 +783,7 @@ export const chartStyles = css`
761
783
 
762
784
  /* Highcharts More and modules */
763
785
  :where([styled-mode]) .highcharts-boxplot-box {
764
- fill: var(--highcharts-background-color, var(--_bg));
786
+ fill: var(--highcharts-background-color, var(--_surface));
765
787
  }
766
788
 
767
789
  :where([styled-mode]) .highcharts-boxplot-median {
@@ -856,7 +878,7 @@ export const chartStyles = css`
856
878
 
857
879
  :where([styled-mode]) .highcharts-navigator-handle {
858
880
  stroke: var(--highcharts-neutral-color-40, var(--_grid-line));
859
- fill: var(--highcharts-neutral-color-5, var(--_bg));
881
+ fill: var(--highcharts-neutral-color-5, var(--_surface));
860
882
  cursor: ew-resize;
861
883
  }
862
884
 
@@ -900,7 +922,7 @@ export const chartStyles = css`
900
922
  }
901
923
 
902
924
  :where([styled-mode]) .highcharts-scrollbar-button {
903
- fill: var(--highcharts-neutral-color-10, var(--_bg));
925
+ fill: var(--highcharts-neutral-color-10, var(--_surface));
904
926
  stroke: var(--highcharts-neutral-color-20);
905
927
  stroke-width: 1px;
906
928
  }
@@ -946,6 +968,7 @@ export const chartStyles = css`
946
968
  fill: var(--highcharts-neutral-color-80, var(--vaadin-charts-button-label, var(--_label)));
947
969
  }
948
970
 
971
+ /* Inverts like vaadin-button[theme~='primary']. Lumo and Aura override both. */
949
972
  :where([styled-mode]) .highcharts-button-pressed {
950
973
  font-weight: bold;
951
974
  fill: var(--highcharts-highlight-color-10, var(--vaadin-charts-button-active-background, var(--_label)));
@@ -953,7 +976,7 @@ export const chartStyles = css`
953
976
  }
954
977
 
955
978
  :where([styled-mode]) .highcharts-button-pressed text {
956
- fill: var(--highcharts-neutral-color-80, var(--vaadin-charts-button-active-label, var(--_bg)));
979
+ fill: var(--highcharts-neutral-color-80, var(--vaadin-charts-button-active-label, var(--_surface)));
957
980
  font-weight: bold;
958
981
  }
959
982
 
@@ -1006,7 +1029,7 @@ export const chartStyles = css`
1006
1029
  }
1007
1030
 
1008
1031
  :where([styled-mode]) .highcharts-crosshair-label text {
1009
- fill: var(--highcharts-background-color, var(--_bg));
1032
+ fill: var(--highcharts-background-color, var(--_surface));
1010
1033
  font-size: 0.9em;
1011
1034
  }
1012
1035
 
@@ -1046,7 +1069,7 @@ export const chartStyles = css`
1046
1069
 
1047
1070
  :where([styled-mode]) .highcharts-flags-series .highcharts-point .highcharts-label-box {
1048
1071
  stroke: var(--highcharts-neutral-color-40, var(--_grid-line));
1049
- fill: var(--highcharts-background-color, var(--_bg));
1072
+ fill: var(--highcharts-background-color, var(--_surface));
1050
1073
  transition: fill 250ms;
1051
1074
  }
1052
1075
 
@@ -1055,7 +1078,7 @@ export const chartStyles = css`
1055
1078
  --highcharts-neutral-color-100,
1056
1079
  color-mix(in srgb, var(--vaadin-charts-contrast, var(--_label)) 60%, transparent)
1057
1080
  );
1058
- fill: var(--highcharts-highlight-color-20, var(--_bg));
1081
+ fill: var(--highcharts-highlight-color-20, var(--_surface));
1059
1082
  }
1060
1083
 
1061
1084
  :where([styled-mode]) .highcharts-flags-series .highcharts-point text {
@@ -1134,7 +1157,7 @@ export const chartStyles = css`
1134
1157
  /* Exporting module */
1135
1158
  :where([styled-mode]) .highcharts-contextbutton {
1136
1159
  /* Fill is needed to capture hover */
1137
- fill: var(--highcharts-background-color, var(--_bg));
1160
+ fill: var(--highcharts-background-color, var(--_surface));
1138
1161
  stroke: none;
1139
1162
  stroke-linecap: round;
1140
1163
  }
@@ -1151,7 +1174,7 @@ export const chartStyles = css`
1151
1174
 
1152
1175
  :where([styled-mode]) .highcharts-menu {
1153
1176
  border: none;
1154
- background: var(--highcharts-background-color, var(--_bg));
1177
+ background: var(--highcharts-background-color, var(--_surface));
1155
1178
  border-radius: 3px;
1156
1179
  padding: 0.5em;
1157
1180
  box-shadow: 3px 3px 10px #888;
@@ -1171,7 +1194,7 @@ export const chartStyles = css`
1171
1194
  }
1172
1195
 
1173
1196
  :where([styled-mode]) .highcharts-menu-item:hover {
1174
- background: var(--highcharts-neutral-color-5, var(--_bg));
1197
+ background: var(--highcharts-neutral-color-5, var(--_surface));
1175
1198
  }
1176
1199
 
1177
1200
  /* Breadcrumbs */
@@ -29,7 +29,6 @@ import 'highcharts/es-modules/masters/modules/bullet.src.js';
29
29
  import 'highcharts/es-modules/masters/modules/gantt.src.js';
30
30
  import 'highcharts/es-modules/masters/modules/draggable-points.src.js';
31
31
  import KeyboardNavigation from 'highcharts/es-modules/Accessibility/KeyboardNavigation.js';
32
- import HTMLUtilities from 'highcharts/es-modules/Accessibility/Utils/HTMLUtilities.js';
33
32
  import Pointer from 'highcharts/es-modules/Core/Pointer.js';
34
33
  import Highcharts from 'highcharts/es-modules/masters/highstock.src.js';
35
34
  import { deepMerge } from '@vaadin/component-base/src/object-utils.js';
@@ -52,56 +51,28 @@ Highcharts.wrap(Highcharts.Chart.prototype, 'getSVG', function (proceed, ...args
52
51
  });
53
52
  /* eslint-enable @typescript-eslint/no-invalid-this, prefer-arrow-callback */
54
53
 
55
- // Monkeypatch the onDocumentMouseMove method to fix the check for the source of the event
56
- // Due to the fact that the event is attached to the document, the target of the event is
57
- // the <vaadin-chart> element, so we need to use the composedPath to get the actual target (#7107)
58
- Pointer.prototype.onDocumentMouseMove = function (e) {
59
- const chart = this.chart;
60
- const chartPosition = this.chartPosition;
61
- const pEvt = this.normalize(e, chartPosition);
62
- const tooltip = chart.tooltip;
63
- // If we're outside, hide the tooltip
64
- if (
65
- chartPosition &&
66
- (!tooltip || !tooltip.isSticky) &&
67
- !chart.isInsidePlot(pEvt.chartX - chart.plotLeft, pEvt.chartY - chart.plotTop, {
68
- visiblePlotOnly: true,
69
- }) &&
70
- // Use the first element from the composed path instead of the actual target
71
- !this.inClass(pEvt.composedPath()[0], 'highcharts-tracker')
72
- ) {
73
- this.reset();
54
+ // Document-level handlers see <vaadin-chart> as the target inside a shadow root, so retarget
55
+ // to the composed path. Remove when fixed: vaadin/web-components#7107 (onDocumentMouseMove)
56
+ // and highcharts/highcharts#23490 (onMouseUp).
57
+ /* eslint-disable @typescript-eslint/no-invalid-this */
58
+ function withComposedTarget(proceed, e, ...args) {
59
+ // Only a shadow host can be a retargeted event target.
60
+ if (!e.target || !e.target.shadowRoot) {
61
+ return proceed.call(this, e, ...args);
74
62
  }
75
- };
76
-
77
- // As the `mouseup` event is attached to the document element, the target will reference
78
- // the instance of the `vaadin-chart` element instead of the element the event originated from.
79
- // That causes some mishbehaviors, e.g. in a drilldown series, clicking in the point does not
80
- // drills down the series in some cases.
81
- // Change to check for the first element in the composed path as the target of the event.
82
- // Workaround for https://github.com/highcharts/highcharts/issues/23490
83
- //
84
- // TODO: Remove this monkeypatch once the referenced issue is fixed
85
- const { simulatedEventTarget } = HTMLUtilities;
86
- KeyboardNavigation.prototype.onMouseUp = function (e) {
87
- delete this.isClickingChart;
88
- if (!this.keyboardReset && e.relatedTarget !== simulatedEventTarget) {
89
- const chart = this.chart;
90
- const target = e.composedPath()[0];
91
- if (!target || !chart.container.contains(target)) {
92
- const curMod = this.modules && this.modules[this.currentModuleIx || 0];
93
- if (curMod && curMod.terminate) {
94
- curMod.terminate();
95
- }
96
- this.currentModuleIx = 0;
97
- }
98
- if (chart.focusElement) {
99
- chart.focusElement.removeFocusBorder();
100
- delete chart.focusElement;
101
- }
102
- this.keyboardReset = true;
63
+
64
+ // `delete` restores the inherited Event.prototype.target accessor.
65
+ Object.defineProperty(e, 'target', { value: e.composedPath()[0], configurable: true });
66
+ try {
67
+ return proceed.call(this, e, ...args);
68
+ } finally {
69
+ delete e.target;
103
70
  }
104
- };
71
+ }
72
+ /* eslint-enable @typescript-eslint/no-invalid-this */
73
+
74
+ Highcharts.wrap(Pointer.prototype, 'onDocumentMouseMove', withComposedTarget);
75
+ Highcharts.wrap(KeyboardNavigation.prototype, 'onMouseUp', withComposedTarget);
105
76
 
106
77
  // Init Highcharts global language defaults
107
78
  // No data message should be empty by default
@@ -961,7 +932,53 @@ export const ChartMixin = (superClass) =>
961
932
  this.configuration = Highcharts.chart(this.$.chart, options);
962
933
  }
963
934
 
964
- this.__forceResize();
935
+ this.__syncOutsideTooltipColors();
936
+ this.__markStickyTooltip();
937
+ this.__redrawOrganizationDataLabels();
938
+ }
939
+
940
+ /**
941
+ * A `tooltip: { outside: true }` tooltip renders in `document.body`, so it
942
+ * inherits neither the palette a theme scopes to `vaadin-chart` nor any
943
+ * `--vaadin-charts-color-*` set on this element. Copy the resolved series
944
+ * colours onto its container instead.
945
+ *
946
+ * @private
947
+ */
948
+ __syncOutsideTooltipColors() {
949
+ const { tooltip } = this.configuration;
950
+ if (!tooltip || !tooltip.outside) {
951
+ return;
952
+ }
953
+
954
+ Highcharts.addEvent(tooltip, 'refresh', () => {
955
+ const { container } = tooltip;
956
+ if (!container) {
957
+ return;
958
+ }
959
+ const style = getComputedStyle(this);
960
+ for (let i = 0; i < 10; i++) {
961
+ container.style.setProperty(`--_color-${i}`, style.getPropertyValue(`--_color-${i}`));
962
+ }
963
+ });
964
+ }
965
+
966
+ /**
967
+ * Marks the tooltip so the stylesheet can make it reachable by the pointer. CSS
968
+ * cannot see the `stickOnContact` option, and Highcharts only applies it itself
969
+ * when styled mode is off. See highcharts/highcharts#25310.
970
+ *
971
+ * @private
972
+ */
973
+ __markStickyTooltip() {
974
+ const { tooltip } = this.configuration;
975
+
976
+ Highcharts.addEvent(tooltip, 'refresh', () => {
977
+ // `refresh` also fires when a formatter returns false, before any label exists.
978
+ if (tooltip.label) {
979
+ tooltip.label.element.classList.toggle('vaadin-chart-sticky-tooltip', tooltip.shouldStickOnContact());
980
+ }
981
+ });
965
982
  }
966
983
 
967
984
  /** @protected */
@@ -1717,24 +1734,30 @@ export const ChartMixin = (superClass) =>
1717
1734
  /**
1718
1735
  * @private
1719
1736
  * Workaround for https://github.com/highcharts/highcharts/issues/23443
1720
- * Forces a resize in the chart to make it calculate the labels positions
1721
- * correctly in a chart with "organization" series
1737
+ * In styled mode the label CSS is not applied yet when "organization" data
1738
+ * labels are first measured, so they need a second measurement pass.
1722
1739
  *
1723
1740
  * TODO: Remove when the related ticket is fixed
1724
1741
  */
1725
- __forceResize() {
1726
- const chart = this.configuration;
1727
- const { options } = chart;
1728
- const hasOrganizationSeries =
1729
- options.chart.styledMode &&
1730
- (options.chart.type === 'organization' || options.series.some((series) => series.type === 'organization'));
1731
- if (!hasOrganizationSeries) {
1742
+ __redrawOrganizationDataLabels() {
1743
+ if (!this.configuration.options.chart.styledMode) {
1732
1744
  return;
1733
1745
  }
1734
1746
 
1747
+ // Series declared as <vaadin-chart-series> children are not on the chart yet,
1748
+ // so the organization check waits for the frame too. Reading the chart there
1749
+ // rather than capturing it also keeps a pending frame from holding a
1750
+ // destroyed chart alive.
1735
1751
  requestAnimationFrame(() => {
1736
- chart.setSize(chart.chartWidth - 10, chart.chartHeight);
1737
- chart.setSize(null, null);
1752
+ if (!this.configuration) {
1753
+ return;
1754
+ }
1755
+
1756
+ this.configuration.series.forEach((series) => {
1757
+ if (series.type === 'organization' && series.drawDataLabels) {
1758
+ series.drawDataLabels();
1759
+ }
1760
+ });
1738
1761
  });
1739
1762
  }
1740
1763
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/charts",
4
- "version": "25.1.13",
4
+ "version": "25.1.14",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -241,7 +241,7 @@
241
241
  },
242
242
  {
243
243
  "name": "vaadin-chart",
244
- "description": "`<vaadin-chart>` is a Web Component for creating high quality charts.\n\n### Basic use\n\nThere are two ways of configuring your `<vaadin-chart>` element: **HTML API**, **JS API** and **JSON API**.\nNote that you can make use of all APIs in your element.\n\n#### Using HTML API\n\n`vaadin-chart` has a set of attributes to make it easier for you to customize your chart.\n\n```html\n<vaadin-chart title=\"The chart title\" subtitle=\"The chart subtitle\">\n <vaadin-chart-series\n type=\"column\"\n title=\"The series title\"\n values=\"[10, 20, 30]\"\n ></vaadin-chart-series>\n</vaadin-chart>\n```\n\n> Note that while you can set type for each series individually, for some types, such as `'bar'`, `'gauge'` and `'solidgauge'`, you\n> have to set it as the default series type on `<vaadin-chart>` in order to work properly.\n\n#### Using JS API\n\nUse [`configuration`](https://cdn.vaadin.com/vaadin-web-components/25.1.13/#/elements/vaadin-chart#property-configuration) property to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\n\n// Wait for default configuration to be ready\nrequestAnimationFrame(() => {\n const configuration = chart.configuration;\n configuration.setTitle({ text: 'The chart title' });\n // By default there is one X axis, it is referenced by configuration.xAxis[0].\n configuration.xAxis[0].setCategories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);\n configuration.addSeries({\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n });\n});\n```\n\n#### Using JS JSON API\n\nUse [`updateConfiguration`](https://cdn.vaadin.com/vaadin-web-components/25.1.13/#/elements/vaadin-chart#method-updateConfiguration) method to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\nchart.updateConfiguration({\n title: {\n text: 'The chart title'\n },\n subtitle: {\n text: 'Subtitle'\n },\n xAxis: {\n categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n },\n series: [{\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n }]\n});\n```\n\n**Note:** chart style customization cannot be done via the JS or JSON API.\nStyling properties in the JSON configuration will be ignored. The following section discusses chart styling.\n\n### CSS Styling\n\nChart appearance is primarily controlled by CSS style rules.\nA comprehensive list of the supported style classes can be found at\nhttps://www.highcharts.com/docs/chart-design-and-style/style-by-css\n\nSee also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.\n\n### RTL support\n\n`vaadin-charts` as well as [Highcharts](https://www.highcharts.com/) by itself are not adjusting the layout\nbased on the `dir` attribute. In order to make `vaadin-charts` display RTL content properly additional\nJSON configuration should be used.\nEach chart should be updated based on the specific needs, but general recommendations are:\n\n 1. Set `reversed` to true for xAxis (https://api.highcharts.com/highcharts/xAxis.reversed).\n 2. Set `useHTML` to true for text elements, i.e. `tooltip` (https://api.highcharts.com/highcharts/tooltip.useHTML).\n 3. Set `rtl` to true for `legend` (https://api.highcharts.com/highcharts/legend.rtl).\n\n### Setting colors\n\nAlthough charts can be styled as described above, there is a simpler way for setting colors.\nColors can be set using CSS custom properties `--vaadin-charts-color-{n}` (where `n` goes from `0 - 9`).\n\nFor example `--vaadin-charts-color-0` sets the color of the first series on a chart.",
244
+ "description": "`<vaadin-chart>` is a Web Component for creating high quality charts.\n\n### Basic use\n\nThere are two ways of configuring your `<vaadin-chart>` element: **HTML API**, **JS API** and **JSON API**.\nNote that you can make use of all APIs in your element.\n\n#### Using HTML API\n\n`vaadin-chart` has a set of attributes to make it easier for you to customize your chart.\n\n```html\n<vaadin-chart title=\"The chart title\" subtitle=\"The chart subtitle\">\n <vaadin-chart-series\n type=\"column\"\n title=\"The series title\"\n values=\"[10, 20, 30]\"\n ></vaadin-chart-series>\n</vaadin-chart>\n```\n\n> Note that while you can set type for each series individually, for some types, such as `'bar'`, `'gauge'` and `'solidgauge'`, you\n> have to set it as the default series type on `<vaadin-chart>` in order to work properly.\n\n#### Using JS API\n\nUse [`configuration`](https://cdn.vaadin.com/vaadin-web-components/25.1.14/#/elements/vaadin-chart#property-configuration) property to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\n\n// Wait for default configuration to be ready\nrequestAnimationFrame(() => {\n const configuration = chart.configuration;\n configuration.setTitle({ text: 'The chart title' });\n // By default there is one X axis, it is referenced by configuration.xAxis[0].\n configuration.xAxis[0].setCategories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);\n configuration.addSeries({\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n });\n});\n```\n\n#### Using JS JSON API\n\nUse [`updateConfiguration`](https://cdn.vaadin.com/vaadin-web-components/25.1.14/#/elements/vaadin-chart#method-updateConfiguration) method to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\nchart.updateConfiguration({\n title: {\n text: 'The chart title'\n },\n subtitle: {\n text: 'Subtitle'\n },\n xAxis: {\n categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n },\n series: [{\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n }]\n});\n```\n\n**Note:** chart style customization cannot be done via the JS or JSON API.\nStyling properties in the JSON configuration will be ignored. The following section discusses chart styling.\n\n### CSS Styling\n\nChart appearance is primarily controlled by CSS style rules.\nA comprehensive list of the supported style classes can be found at\nhttps://www.highcharts.com/docs/chart-design-and-style/style-by-css\n\nSee also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.\n\n### RTL support\n\n`vaadin-charts` as well as [Highcharts](https://www.highcharts.com/) by itself are not adjusting the layout\nbased on the `dir` attribute. In order to make `vaadin-charts` display RTL content properly additional\nJSON configuration should be used.\nEach chart should be updated based on the specific needs, but general recommendations are:\n\n 1. Set `reversed` to true for xAxis (https://api.highcharts.com/highcharts/xAxis.reversed).\n 2. Set `useHTML` to true for text elements, i.e. `tooltip` (https://api.highcharts.com/highcharts/tooltip.useHTML).\n 3. Set `rtl` to true for `legend` (https://api.highcharts.com/highcharts/legend.rtl).\n\n### Setting colors\n\nAlthough charts can be styled as described above, there is a simpler way for setting colors.\nColors can be set using CSS custom properties `--vaadin-charts-color-{n}` (where `n` goes from `0 - 9`).\n\nFor example `--vaadin-charts-color-0` sets the color of the first series on a chart.",
245
245
  "attributes": [
246
246
  {
247
247
  "name": "category-max",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/charts",
4
- "version": "25.1.13",
4
+ "version": "25.1.14",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -100,7 +100,7 @@
100
100
  },
101
101
  {
102
102
  "name": "vaadin-chart",
103
- "description": "`<vaadin-chart>` is a Web Component for creating high quality charts.\n\n### Basic use\n\nThere are two ways of configuring your `<vaadin-chart>` element: **HTML API**, **JS API** and **JSON API**.\nNote that you can make use of all APIs in your element.\n\n#### Using HTML API\n\n`vaadin-chart` has a set of attributes to make it easier for you to customize your chart.\n\n```html\n<vaadin-chart title=\"The chart title\" subtitle=\"The chart subtitle\">\n <vaadin-chart-series\n type=\"column\"\n title=\"The series title\"\n values=\"[10, 20, 30]\"\n ></vaadin-chart-series>\n</vaadin-chart>\n```\n\n> Note that while you can set type for each series individually, for some types, such as `'bar'`, `'gauge'` and `'solidgauge'`, you\n> have to set it as the default series type on `<vaadin-chart>` in order to work properly.\n\n#### Using JS API\n\nUse [`configuration`](https://cdn.vaadin.com/vaadin-web-components/25.1.13/#/elements/vaadin-chart#property-configuration) property to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\n\n// Wait for default configuration to be ready\nrequestAnimationFrame(() => {\n const configuration = chart.configuration;\n configuration.setTitle({ text: 'The chart title' });\n // By default there is one X axis, it is referenced by configuration.xAxis[0].\n configuration.xAxis[0].setCategories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);\n configuration.addSeries({\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n });\n});\n```\n\n#### Using JS JSON API\n\nUse [`updateConfiguration`](https://cdn.vaadin.com/vaadin-web-components/25.1.13/#/elements/vaadin-chart#method-updateConfiguration) method to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\nchart.updateConfiguration({\n title: {\n text: 'The chart title'\n },\n subtitle: {\n text: 'Subtitle'\n },\n xAxis: {\n categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n },\n series: [{\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n }]\n});\n```\n\n**Note:** chart style customization cannot be done via the JS or JSON API.\nStyling properties in the JSON configuration will be ignored. The following section discusses chart styling.\n\n### CSS Styling\n\nChart appearance is primarily controlled by CSS style rules.\nA comprehensive list of the supported style classes can be found at\nhttps://www.highcharts.com/docs/chart-design-and-style/style-by-css\n\nSee also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.\n\n### RTL support\n\n`vaadin-charts` as well as [Highcharts](https://www.highcharts.com/) by itself are not adjusting the layout\nbased on the `dir` attribute. In order to make `vaadin-charts` display RTL content properly additional\nJSON configuration should be used.\nEach chart should be updated based on the specific needs, but general recommendations are:\n\n 1. Set `reversed` to true for xAxis (https://api.highcharts.com/highcharts/xAxis.reversed).\n 2. Set `useHTML` to true for text elements, i.e. `tooltip` (https://api.highcharts.com/highcharts/tooltip.useHTML).\n 3. Set `rtl` to true for `legend` (https://api.highcharts.com/highcharts/legend.rtl).\n\n### Setting colors\n\nAlthough charts can be styled as described above, there is a simpler way for setting colors.\nColors can be set using CSS custom properties `--vaadin-charts-color-{n}` (where `n` goes from `0 - 9`).\n\nFor example `--vaadin-charts-color-0` sets the color of the first series on a chart.",
103
+ "description": "`<vaadin-chart>` is a Web Component for creating high quality charts.\n\n### Basic use\n\nThere are two ways of configuring your `<vaadin-chart>` element: **HTML API**, **JS API** and **JSON API**.\nNote that you can make use of all APIs in your element.\n\n#### Using HTML API\n\n`vaadin-chart` has a set of attributes to make it easier for you to customize your chart.\n\n```html\n<vaadin-chart title=\"The chart title\" subtitle=\"The chart subtitle\">\n <vaadin-chart-series\n type=\"column\"\n title=\"The series title\"\n values=\"[10, 20, 30]\"\n ></vaadin-chart-series>\n</vaadin-chart>\n```\n\n> Note that while you can set type for each series individually, for some types, such as `'bar'`, `'gauge'` and `'solidgauge'`, you\n> have to set it as the default series type on `<vaadin-chart>` in order to work properly.\n\n#### Using JS API\n\nUse [`configuration`](https://cdn.vaadin.com/vaadin-web-components/25.1.14/#/elements/vaadin-chart#property-configuration) property to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\n\n// Wait for default configuration to be ready\nrequestAnimationFrame(() => {\n const configuration = chart.configuration;\n configuration.setTitle({ text: 'The chart title' });\n // By default there is one X axis, it is referenced by configuration.xAxis[0].\n configuration.xAxis[0].setCategories(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);\n configuration.addSeries({\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n });\n});\n```\n\n#### Using JS JSON API\n\nUse [`updateConfiguration`](https://cdn.vaadin.com/vaadin-web-components/25.1.14/#/elements/vaadin-chart#method-updateConfiguration) method to set chart title, categories and data:\n\n```js\nconst chart = document.querySelector('vaadin-chart');\nchart.updateConfiguration({\n title: {\n text: 'The chart title'\n },\n subtitle: {\n text: 'Subtitle'\n },\n xAxis: {\n categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n },\n series: [{\n type: 'column',\n data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]\n }]\n});\n```\n\n**Note:** chart style customization cannot be done via the JS or JSON API.\nStyling properties in the JSON configuration will be ignored. The following section discusses chart styling.\n\n### CSS Styling\n\nChart appearance is primarily controlled by CSS style rules.\nA comprehensive list of the supported style classes can be found at\nhttps://www.highcharts.com/docs/chart-design-and-style/style-by-css\n\nSee also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.\n\n### RTL support\n\n`vaadin-charts` as well as [Highcharts](https://www.highcharts.com/) by itself are not adjusting the layout\nbased on the `dir` attribute. In order to make `vaadin-charts` display RTL content properly additional\nJSON configuration should be used.\nEach chart should be updated based on the specific needs, but general recommendations are:\n\n 1. Set `reversed` to true for xAxis (https://api.highcharts.com/highcharts/xAxis.reversed).\n 2. Set `useHTML` to true for text elements, i.e. `tooltip` (https://api.highcharts.com/highcharts/tooltip.useHTML).\n 3. Set `rtl` to true for `legend` (https://api.highcharts.com/highcharts/legend.rtl).\n\n### Setting colors\n\nAlthough charts can be styled as described above, there is a simpler way for setting colors.\nColors can be set using CSS custom properties `--vaadin-charts-color-{n}` (where `n` goes from `0 - 9`).\n\nFor example `--vaadin-charts-color-0` sets the color of the first series on a chart.",
104
104
  "extension": true,
105
105
  "attributes": [
106
106
  {