@synergy-design-system/metadata 3.16.1 → 3.17.0

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/data/core/component/component:syn-chart.json +2 -2
  3. package/data/core/setup/setup:angular-components-module.json +1 -1
  4. package/data/core/setup/setup:angular-forms-module.json +1 -1
  5. package/data/core/setup/setup:angular-package.json +2 -2
  6. package/data/core/setup/setup:angular-validators-module.json +1 -1
  7. package/data/core/setup/setup:components-package.json +2 -2
  8. package/data/core/setup/setup:react-package.json +2 -2
  9. package/data/core/setup/setup:tokens-package.json +2 -2
  10. package/data/core/setup/setup:vue-package.json +2 -2
  11. package/data/core/token/token:tokens-charts-js-index-d-ts.json +1 -1
  12. package/data/core/token/token:tokens-charts-js-index-js.json +1 -1
  13. package/data/core/token/token:tokens-charts-scss-tokens-scss.json +1 -1
  14. package/data/core/token/token:tokens-charts-themes-sick2025-dark-css.json +1 -1
  15. package/data/core/token/token:tokens-charts-themes-sick2025-light-css.json +1 -1
  16. package/data/core/token/token:tokens-figma-variables-sick2018-dark-json.json +1 -1
  17. package/data/core/token/token:tokens-figma-variables-sick2018-light-json.json +1 -1
  18. package/data/core/token/token:tokens-figma-variables-sick2025-dark-json.json +1 -1
  19. package/data/core/token/token:tokens-figma-variables-sick2025-light-json.json +1 -1
  20. package/data/core/token/token:tokens-js-index-d-ts.json +1 -1
  21. package/data/core/token/token:tokens-js-index-js.json +1 -1
  22. package/data/core/token/token:tokens-scss-tokens-scss.json +1 -1
  23. package/data/core/token/token:tokens-themes-sick2018-dark-css.json +1 -1
  24. package/data/core/token/token:tokens-themes-sick2018-light-css.json +1 -1
  25. package/data/core/token/token:tokens-themes-sick2025-dark-css.json +1 -1
  26. package/data/core/token/token:tokens-themes-sick2025-light-css.json +1 -1
  27. package/data/index.json +1 -1
  28. package/data/layers/examples/component/component:syn-chart.md +115 -106
  29. package/data/layers/examples/component/component:syn-combobox.md +0 -18
  30. package/data/layers/full/component/component:syn-chart/angular/chart.component.ts +11 -5
  31. package/data/layers/full/component/component:syn-chart/components/chart.component.ts +67 -20
  32. package/data/layers/full/component/component:syn-chart/components/chart.palettes.ts +59 -59
  33. package/data/layers/full/component/component:syn-chart/components/types.ts +47 -4
  34. package/data/layers/full/component/component:syn-chart/react/chart.ts +1 -1
  35. package/data/layers/full/component/component:syn-chart/vue/SynVueChart.vue +11 -5
  36. package/data/layers/full/setup/setup:angular-package/angular/CHANGELOG.md +20 -0
  37. package/data/layers/full/setup/setup:angular-package/angular/package.json +1 -1
  38. package/data/layers/full/setup/setup:components-package/components/CHANGELOG.md +19 -0
  39. package/data/layers/full/setup/setup:components-package/components/package.json +1 -1
  40. package/data/layers/full/setup/setup:react-package/react/CHANGELOG.md +20 -0
  41. package/data/layers/full/setup/setup:react-package/react/package.json +1 -1
  42. package/data/layers/full/setup/setup:react-package/react/syn-jsx-elements.ts +2 -2
  43. package/data/layers/full/setup/setup:tokens-package/tokens/CHANGELOG.md +19 -0
  44. package/data/layers/full/setup/setup:tokens-package/tokens/package.json +1 -1
  45. package/data/layers/full/setup/setup:vue-package/vue/CHANGELOG.md +20 -0
  46. package/data/layers/full/setup/setup:vue-package/vue/package.json +1 -1
  47. package/data/layers/full/tokens/charts/js/index.d.ts +275 -265
  48. package/data/layers/full/tokens/charts/js/index.js +143 -133
  49. package/data/layers/full/tokens/charts/scss/_tokens.scss +135 -133
  50. package/data/layers/full/tokens/charts/themes/sick2025_dark.css +135 -133
  51. package/data/layers/full/tokens/charts/themes/sick2025_light.css +135 -133
  52. package/data/layers/full/tokens/js/index.d.ts +11 -1
  53. package/data/layers/full/tokens/js/index.js +11 -1
  54. package/data/layers/full/tokens/scss/_tokens.scss +3 -1
  55. package/data/layers/full/tokens/themes/sick2018_dark.css +3 -1
  56. package/data/layers/full/tokens/themes/sick2018_light.css +3 -1
  57. package/data/layers/full/tokens/themes/sick2025_dark.css +3 -1
  58. package/data/layers/full/tokens/themes/sick2025_light.css +3 -1
  59. package/data/layers/interface/component/component:syn-chart.json +5 -5
  60. package/data/layers/interface/component/component:syn-chart.md +4 -4
  61. package/data/manifest.json +1 -1
  62. package/package.json +5 -5
@@ -21,7 +21,7 @@ import '@synergy-design-system/components/components/chart/chart.js';
21
21
  *
22
22
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
23
23
  * @status experimental
24
- * @since 0.0.0
24
+ * @since 3.15.0
25
25
  *
26
26
  * @csspart base - The component's base wrapper.
27
27
  */
@@ -61,16 +61,22 @@ it takes precedence over the palette.
61
61
  }
62
62
 
63
63
  /**
64
- * The ECharts configuration option object.
64
+ * The ECharts configuration input.
65
65
 
66
- This property maps 1:1 to the ECharts `option` parameter passed to `setOption()`.
66
+ This property accepts either:
67
+ - a plain `ECConfig` object, or
68
+ - a callback that receives a typed preset handle and applies chart presets.
69
+
70
+ The resolved result maps 1:1 to the ECharts `option` parameter passed to
71
+ `setOption()`.
67
72
  Consult the [ECharts option documentation](https://echarts.apache.org/en/option.html)
68
- and assign the object directly to this property.
73
+ and assign either the object directly or build it through the handle.
69
74
 
70
75
  > **Note:** Currently only **line charts** (`series[].type: 'line'`) are supported.
71
76
  > Support for additional chart types (bar, pie, etc.) will be added in future releases or can be requested.
72
77
 
73
- Assigning a new object completely replaces the previous chart configuration (`notMerge: true`).
78
+ Assigning a new config input completely replaces the previous chart
79
+ configuration (`notMerge: true`).
74
80
  To update only parts of the chart, access the underlying ECharts instance directly and
75
81
  call `setOption()` with custom merge options.
76
82
  */
@@ -1,5 +1,5 @@
1
1
  import {
2
- type EChartsType, init, use,
2
+ type EChartsType, init, registerPreprocessor, registerTheme, use,
3
3
  } from 'echarts/core.js';
4
4
  import { CanvasRenderer } from 'echarts/renderers.js';
5
5
  import { html } from 'lit';
@@ -10,12 +10,14 @@ import { LineChart } from 'echarts/charts.js';
10
10
  import {
11
11
  GridComponent, LegendComponent, TitleComponent, TooltipComponent,
12
12
  } from 'echarts/components.js';
13
- import { classMap } from 'lit/directives/class-map.js';
14
13
  import SynergyElement from '../../internal/synergy-element.js';
15
14
  import componentStyles from '../../styles/component.styles.js';
16
15
  import styles from './chart.styles.js';
17
- import { PALETTE_TOKENS, type SynChartPalette } from './chart.palettes.js';
18
- import type { ECConfig } from './types.js';
16
+ import { type ChartPalette, PALETTE_TOKENS } from './chart.palettes.js';
17
+ import { resolveConfigInput } from './configs/config.js';
18
+ import type { ChartConfigType, ECConfig } from './types.js';
19
+ import { synergyLightTheme } from './themes/light.js';
20
+ import { applyAxisDefaultsPreprocessor } from './configs/axes/utilities.js';
19
21
 
20
22
  // TODO: Check, should we let the user define the *use* so the bundle size is optimized for their specific use case?
21
23
  use([
@@ -32,7 +34,7 @@ use([
32
34
  *
33
35
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
34
36
  * @status experimental
35
- * @since 0.0.0
37
+ * @since 3.15.0
36
38
  *
37
39
  * @csspart base - The component's base wrapper.
38
40
  */
@@ -49,31 +51,59 @@ export default class SynChart extends SynergyElement {
49
51
 
50
52
  private resizeObserver: ResizeObserver;
51
53
 
54
+ private resolvedConfig: ECConfig = {};
55
+
52
56
  /**
53
- * The ECharts configuration option object.
57
+ * The ECharts configuration input.
58
+ *
59
+ * This property accepts either:
60
+ * - a plain `ECConfig` object, or
61
+ * - a callback that receives a typed preset handle and applies chart presets.
54
62
  *
55
- * This property maps 1:1 to the ECharts `option` parameter passed to `setOption()`.
63
+ * The resolved result maps 1:1 to the ECharts `option` parameter passed to
64
+ * `setOption()`.
56
65
  * Consult the [ECharts option documentation](https://echarts.apache.org/en/option.html)
57
- * and assign the object directly to this property.
66
+ * and assign either the object directly or build it through the handle.
58
67
  *
59
68
  * > **Note:** Currently only **line charts** (`series[].type: 'line'`) are supported.
60
69
  * > Support for additional chart types (bar, pie, etc.) will be added in future releases or can be requested.
61
70
  *
62
- * Assigning a new object completely replaces the previous chart configuration (`notMerge: true`).
71
+ * Assigning a new config input completely replaces the previous chart
72
+ * configuration (`notMerge: true`).
63
73
  * To update only parts of the chart, access the underlying ECharts instance directly and
64
74
  * call `setOption()` with custom merge options.
65
75
  *
66
76
  * @example
67
77
  * ```js
78
+ * // Using a plain object
68
79
  * chart.config = {
69
80
  * xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed'] },
70
81
  * yAxis: { type: 'value' },
71
82
  * series: [{ type: 'line', data: [150, 230, 224] }],
72
83
  * };
84
+ *
85
+ * // Using the handle with method chaining
86
+ * chart.config = (handle) => handle
87
+ * .baseConfig({
88
+ * xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed'] },
89
+ * yAxis: { type: 'value' },
90
+ * series: [{ type: 'line', data: [150, 230, 224] }],
91
+ * })
92
+ * .axesShowSplitLines();
93
+ *
94
+ * // Using the handle with sequential calls
95
+ * chart.config = (handle) => {
96
+ * handle.baseConfig({
97
+ * xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed'] },
98
+ * yAxis: { type: 'value' },
99
+ * series: [{ type: 'line', data: [150, 230, 224] }],
100
+ * });
101
+ * handle.axesShowSplitLines();
102
+ * };
73
103
  * ```
74
104
  */
75
105
  @property({ attribute: false })
76
- config: ECConfig = {};
106
+ config: ChartConfigType = {};
77
107
 
78
108
  /**
79
109
  * The color palette to apply to chart series.
@@ -88,13 +118,13 @@ export default class SynChart extends SynergyElement {
88
118
  * it takes precedence over the palette.
89
119
  */
90
120
  @property({ reflect: true })
91
- palette: SynChartPalette = 'categorical';
121
+ palette: ChartPalette = 'categorical';
92
122
 
93
123
  /** Resolves palette CSS custom properties to computed color values and applies them to the chart. */
94
124
  private applyPalette(): void {
95
125
  if (!this.chartInstance) return;
96
126
  // If the user explicitly set config.color, respect it — palette is a default only
97
- if (Array.isArray(this.config.color) && this.config.color.length > 0) return;
127
+ if (Array.isArray(this.resolvedConfig.color) && this.resolvedConfig.color.length > 0) return;
98
128
 
99
129
  const tokens = PALETTE_TOKENS[this.palette];
100
130
  const computedStyles = getComputedStyle(this);
@@ -103,23 +133,41 @@ export default class SynChart extends SynergyElement {
103
133
  .filter(Boolean);
104
134
 
105
135
  if (colors.length > 0) {
106
- this.chartInstance.setOption({ color: colors }, { notMerge: false });
136
+ const oldOption = this.chartInstance.getOption();
137
+ if (!oldOption) return;
138
+
139
+ oldOption.color = colors;
140
+ // We can not only replace 'color' via { replaceMerge: ['color'] }. Echarts does not allow to do this.
141
+ // Therefore we need to completely replace it, with the old option but new color.
142
+ this.chartInstance.setOption(oldOption, { notMerge: true });
107
143
  }
108
144
  }
109
145
 
110
146
  protected updated(changedProperties: PropertyValues<this>): void {
111
147
  if (changedProperties.has('config') && this.chartInstance) {
112
- this.chartInstance.setOption(this.config, { notMerge: true });
148
+ this.resolvedConfig = resolveConfigInput(this.config);
149
+ this.chartInstance.setOption(this.resolvedConfig, { notMerge: true });
113
150
  }
114
151
  if ((changedProperties.has('palette') || changedProperties.has('config')) && this.chartInstance) {
115
152
  this.applyPalette();
116
153
  }
117
154
  }
118
155
 
156
+ connectedCallback() {
157
+ super.connectedCallback();
158
+ registerTheme('default', synergyLightTheme);
159
+ /**
160
+ * Depending if x-axis or y-axis, the axis name has different positions and alignments. This preprocessor ensures that the correct styles are applied to the axis names based on the axis type.
161
+ * This is needed because ECharts does not provide a way to set specific styles for x and y axis, only for axis types.
162
+ */
163
+ registerPreprocessor(applyAxisDefaultsPreprocessor);
164
+ }
165
+
119
166
  // Initialize echarts instance and resize observer
120
167
  protected firstUpdated(_changedProperties: PropertyValues): void {
121
168
  if (this.chartContainer !== null && this.chartContainer !== undefined) {
122
- this.chartInstance = init(this.chartContainer);
169
+ this.chartInstance = init(this.chartContainer, 'default');
170
+
123
171
  // Resize observer
124
172
  this.resizeObserver = new ResizeObserver(() => {
125
173
  this.chartInstance?.resize();
@@ -127,8 +175,9 @@ export default class SynChart extends SynergyElement {
127
175
  this.resizeObserver.observe(this.chartContainer);
128
176
 
129
177
  // Apply config if already set before first render
130
- if (Object.keys(this.config).length > 0) {
131
- this.chartInstance.setOption(this.config);
178
+ this.resolvedConfig = resolveConfigInput(this.config);
179
+ if (Object.keys(this.resolvedConfig).length > 0) {
180
+ this.chartInstance.setOption(this.resolvedConfig);
132
181
  }
133
182
  // Apply palette after config so colors blend in without replacing the full config
134
183
  this.applyPalette();
@@ -172,9 +221,7 @@ export default class SynChart extends SynergyElement {
172
221
  return html`
173
222
  <div
174
223
  part="base"
175
- class=${classMap({
176
- chart: true,
177
- })}>
224
+ class="chart">
178
225
  </div>
179
226
  `;
180
227
  }
@@ -7,7 +7,7 @@
7
7
  * (`01`=primary, `02`=accent, `03`=muted, `04`=purple, `05`=teal, `06`=magenta, `07`=neutral)
8
8
  * - `sequential-status-critical/error/info/success/warning` — 10-step status color ramps, ordered from darkest to brightest
9
9
  */
10
- export type SynChartPalette =
10
+ export type ChartPalette =
11
11
  | 'categorical'
12
12
  | 'sequential-01'
13
13
  | 'sequential-02'
@@ -23,88 +23,88 @@ export type SynChartPalette =
23
23
  | 'sequential-status-warning';
24
24
 
25
25
  /** Maps each palette name to the ordered list of CSS custom property names to resolve. */
26
- export const PALETTE_TOKENS: Record<SynChartPalette, string[]> = {
26
+ export const PALETTE_TOKENS: Record<ChartPalette, string[]> = {
27
27
  categorical: [
28
- '--syn-categorical-01', '--syn-categorical-02', '--syn-categorical-03',
29
- '--syn-categorical-04', '--syn-categorical-05', '--syn-categorical-06',
30
- '--syn-categorical-07', '--syn-categorical-08', '--syn-categorical-09',
31
- '--syn-categorical-10', '--syn-categorical-11', '--syn-categorical-12',
28
+ '--syn-chart-categorical-01', '--syn-chart-categorical-02', '--syn-chart-categorical-03',
29
+ '--syn-chart-categorical-04', '--syn-chart-categorical-05', '--syn-chart-categorical-06',
30
+ '--syn-chart-categorical-07', '--syn-chart-categorical-08', '--syn-chart-categorical-09',
31
+ '--syn-chart-categorical-10', '--syn-chart-categorical-11', '--syn-chart-categorical-12',
32
32
  ],
33
33
  'sequential-01': [
34
- '--syn-sequential-01-100', '--syn-sequential-01-90', '--syn-sequential-01-80',
35
- '--syn-sequential-01-70', '--syn-sequential-01-60', '--syn-sequential-01-50',
36
- '--syn-sequential-01-40', '--syn-sequential-01-30', '--syn-sequential-01-20',
37
- '--syn-sequential-01-10',
34
+ '--syn-chart-sequential-01-100', '--syn-chart-sequential-01-90', '--syn-chart-sequential-01-80',
35
+ '--syn-chart-sequential-01-70', '--syn-chart-sequential-01-60', '--syn-chart-sequential-01-50',
36
+ '--syn-chart-sequential-01-40', '--syn-chart-sequential-01-30', '--syn-chart-sequential-01-20',
37
+ '--syn-chart-sequential-01-10',
38
38
  ],
39
39
  'sequential-02': [
40
- '--syn-sequential-02-100', '--syn-sequential-02-90', '--syn-sequential-02-80',
41
- '--syn-sequential-02-70', '--syn-sequential-02-60', '--syn-sequential-02-50',
42
- '--syn-sequential-02-40', '--syn-sequential-02-30', '--syn-sequential-02-20',
43
- '--syn-sequential-02-10',
40
+ '--syn-chart-sequential-02-100', '--syn-chart-sequential-02-90', '--syn-chart-sequential-02-80',
41
+ '--syn-chart-sequential-02-70', '--syn-chart-sequential-02-60', '--syn-chart-sequential-02-50',
42
+ '--syn-chart-sequential-02-40', '--syn-chart-sequential-02-30', '--syn-chart-sequential-02-20',
43
+ '--syn-chart-sequential-02-10',
44
44
  ],
45
45
  'sequential-03': [
46
- '--syn-sequential-03-100', '--syn-sequential-03-90', '--syn-sequential-03-80',
47
- '--syn-sequential-03-70', '--syn-sequential-03-60', '--syn-sequential-03-50',
48
- '--syn-sequential-03-40', '--syn-sequential-03-30', '--syn-sequential-03-20',
49
- '--syn-sequential-03-10',
46
+ '--syn-chart-sequential-03-100', '--syn-chart-sequential-03-90', '--syn-chart-sequential-03-80',
47
+ '--syn-chart-sequential-03-70', '--syn-chart-sequential-03-60', '--syn-chart-sequential-03-50',
48
+ '--syn-chart-sequential-03-40', '--syn-chart-sequential-03-30', '--syn-chart-sequential-03-20',
49
+ '--syn-chart-sequential-03-10',
50
50
  ],
51
51
  'sequential-04': [
52
- '--syn-sequential-04-100', '--syn-sequential-04-90', '--syn-sequential-04-80',
53
- '--syn-sequential-04-70', '--syn-sequential-04-60', '--syn-sequential-04-50',
54
- '--syn-sequential-04-40', '--syn-sequential-04-30', '--syn-sequential-04-20',
55
- '--syn-sequential-04-10',
52
+ '--syn-chart-sequential-04-100', '--syn-chart-sequential-04-90', '--syn-chart-sequential-04-80',
53
+ '--syn-chart-sequential-04-70', '--syn-chart-sequential-04-60', '--syn-chart-sequential-04-50',
54
+ '--syn-chart-sequential-04-40', '--syn-chart-sequential-04-30', '--syn-chart-sequential-04-20',
55
+ '--syn-chart-sequential-04-10',
56
56
  ],
57
57
  'sequential-05': [
58
- '--syn-sequential-05-100', '--syn-sequential-05-90', '--syn-sequential-05-80',
59
- '--syn-sequential-05-70', '--syn-sequential-05-60', '--syn-sequential-05-50',
60
- '--syn-sequential-05-40', '--syn-sequential-05-30', '--syn-sequential-05-20',
61
- '--syn-sequential-05-10',
58
+ '--syn-chart-sequential-05-100', '--syn-chart-sequential-05-90', '--syn-chart-sequential-05-80',
59
+ '--syn-chart-sequential-05-70', '--syn-chart-sequential-05-60', '--syn-chart-sequential-05-50',
60
+ '--syn-chart-sequential-05-40', '--syn-chart-sequential-05-30', '--syn-chart-sequential-05-20',
61
+ '--syn-chart-sequential-05-10',
62
62
  ],
63
63
  'sequential-06': [
64
- '--syn-sequential-06-100', '--syn-sequential-06-90', '--syn-sequential-06-80',
65
- '--syn-sequential-06-70', '--syn-sequential-06-60', '--syn-sequential-06-50',
66
- '--syn-sequential-06-40', '--syn-sequential-06-30', '--syn-sequential-06-20',
67
- '--syn-sequential-06-10',
64
+ '--syn-chart-sequential-06-100', '--syn-chart-sequential-06-90', '--syn-chart-sequential-06-80',
65
+ '--syn-chart-sequential-06-70', '--syn-chart-sequential-06-60', '--syn-chart-sequential-06-50',
66
+ '--syn-chart-sequential-06-40', '--syn-chart-sequential-06-30', '--syn-chart-sequential-06-20',
67
+ '--syn-chart-sequential-06-10',
68
68
  ],
69
69
  'sequential-07': [
70
- '--syn-sequential-07-100', '--syn-sequential-07-90', '--syn-sequential-07-80',
71
- '--syn-sequential-07-70', '--syn-sequential-07-60', '--syn-sequential-07-50',
72
- '--syn-sequential-07-40', '--syn-sequential-07-30', '--syn-sequential-07-20',
73
- '--syn-sequential-07-10',
70
+ '--syn-chart-sequential-07-100', '--syn-chart-sequential-07-90', '--syn-chart-sequential-07-80',
71
+ '--syn-chart-sequential-07-70', '--syn-chart-sequential-07-60', '--syn-chart-sequential-07-50',
72
+ '--syn-chart-sequential-07-40', '--syn-chart-sequential-07-30', '--syn-chart-sequential-07-20',
73
+ '--syn-chart-sequential-07-10',
74
74
  ],
75
75
  'sequential-status-critical': [
76
- '--syn-sequential-status-critical-100', '--syn-sequential-status-critical-90',
77
- '--syn-sequential-status-critical-80', '--syn-sequential-status-critical-70',
78
- '--syn-sequential-status-critical-60', '--syn-sequential-status-critical-50',
79
- '--syn-sequential-status-critical-40', '--syn-sequential-status-critical-30',
80
- '--syn-sequential-status-critical-20', '--syn-sequential-status-critical-10',
76
+ '--syn-chart-sequential-status-critical-100', '--syn-chart-sequential-status-critical-90',
77
+ '--syn-chart-sequential-status-critical-80', '--syn-chart-sequential-status-critical-70',
78
+ '--syn-chart-sequential-status-critical-60', '--syn-chart-sequential-status-critical-50',
79
+ '--syn-chart-sequential-status-critical-40', '--syn-chart-sequential-status-critical-30',
80
+ '--syn-chart-sequential-status-critical-20', '--syn-chart-sequential-status-critical-10',
81
81
  ],
82
82
  'sequential-status-error': [
83
- '--syn-sequential-status-error-100', '--syn-sequential-status-error-90',
84
- '--syn-sequential-status-error-80', '--syn-sequential-status-error-70',
85
- '--syn-sequential-status-error-60', '--syn-sequential-status-error-50',
86
- '--syn-sequential-status-error-40', '--syn-sequential-status-error-30',
87
- '--syn-sequential-status-error-20', '--syn-sequential-status-error-10',
83
+ '--syn-chart-sequential-status-error-100', '--syn-chart-sequential-status-error-90',
84
+ '--syn-chart-sequential-status-error-80', '--syn-chart-sequential-status-error-70',
85
+ '--syn-chart-sequential-status-error-60', '--syn-chart-sequential-status-error-50',
86
+ '--syn-chart-sequential-status-error-40', '--syn-chart-sequential-status-error-30',
87
+ '--syn-chart-sequential-status-error-20', '--syn-chart-sequential-status-error-10',
88
88
  ],
89
89
  'sequential-status-info': [
90
- '--syn-sequential-status-info-100', '--syn-sequential-status-info-90',
91
- '--syn-sequential-status-info-80', '--syn-sequential-status-info-70',
92
- '--syn-sequential-status-info-60', '--syn-sequential-status-info-50',
93
- '--syn-sequential-status-info-40', '--syn-sequential-status-info-30',
94
- '--syn-sequential-status-info-20', '--syn-sequential-status-info-10',
90
+ '--syn-chart-sequential-status-info-100', '--syn-chart-sequential-status-info-90',
91
+ '--syn-chart-sequential-status-info-80', '--syn-chart-sequential-status-info-70',
92
+ '--syn-chart-sequential-status-info-60', '--syn-chart-sequential-status-info-50',
93
+ '--syn-chart-sequential-status-info-40', '--syn-chart-sequential-status-info-30',
94
+ '--syn-chart-sequential-status-info-20', '--syn-chart-sequential-status-info-10',
95
95
  ],
96
96
  'sequential-status-success': [
97
- '--syn-sequential-status-success-100', '--syn-sequential-status-success-90',
98
- '--syn-sequential-status-success-80', '--syn-sequential-status-success-70',
99
- '--syn-sequential-status-success-60', '--syn-sequential-status-success-50',
100
- '--syn-sequential-status-success-40', '--syn-sequential-status-success-30',
101
- '--syn-sequential-status-success-20', '--syn-sequential-status-success-10',
97
+ '--syn-chart-sequential-status-success-100', '--syn-chart-sequential-status-success-90',
98
+ '--syn-chart-sequential-status-success-80', '--syn-chart-sequential-status-success-70',
99
+ '--syn-chart-sequential-status-success-60', '--syn-chart-sequential-status-success-50',
100
+ '--syn-chart-sequential-status-success-40', '--syn-chart-sequential-status-success-30',
101
+ '--syn-chart-sequential-status-success-20', '--syn-chart-sequential-status-success-10',
102
102
  ],
103
103
  'sequential-status-warning': [
104
- '--syn-sequential-status-warning-100', '--syn-sequential-status-warning-90',
105
- '--syn-sequential-status-warning-80', '--syn-sequential-status-warning-70',
106
- '--syn-sequential-status-warning-60', '--syn-sequential-status-warning-50',
107
- '--syn-sequential-status-warning-40', '--syn-sequential-status-warning-30',
108
- '--syn-sequential-status-warning-20', '--syn-sequential-status-warning-10',
104
+ '--syn-chart-sequential-status-warning-100', '--syn-chart-sequential-status-warning-90',
105
+ '--syn-chart-sequential-status-warning-80', '--syn-chart-sequential-status-warning-70',
106
+ '--syn-chart-sequential-status-warning-60', '--syn-chart-sequential-status-warning-50',
107
+ '--syn-chart-sequential-status-warning-40', '--syn-chart-sequential-status-warning-30',
108
+ '--syn-chart-sequential-status-warning-20', '--syn-chart-sequential-status-warning-10',
109
109
  ],
110
110
  };
@@ -1,5 +1,48 @@
1
- import type { LineSeriesOption } from 'echarts/charts.js';
2
- import type { ComposeOption } from 'echarts/core.js';
1
+ import type { EChartsOption } from 'echarts/types/dist/shared.js';
2
+ import {
3
+ type ChartPresets,
4
+ } from './configs/presets/index.js';
5
+ import type { ChartConfigBuilder } from './configs/config.js';
3
6
 
4
- // Scoped option type only includes the components and chart types registered via use()
5
- export type ECConfig = ComposeOption<LineSeriesOption>;
7
+ export type ECConfig = EChartsOption;
8
+
9
+ export type ChartPresetFunctions = {
10
+ [K in keyof typeof ChartPresets]: (...args: Parameters<(typeof ChartPresets)[K]>) => ChartConfigHandle;
11
+ };
12
+
13
+ export type ChartConfigHandle = ChartPresetFunctions & Omit<ChartConfigBuilder, 'build'>;
14
+
15
+ /**
16
+ * Configuration callback for the chart `config` property.
17
+ *
18
+ * This callback is invoked with a configuration handle that provides preset functions
19
+ * for building the chart configuration. Use the handle to call preset functions and
20
+ * set the base configuration. The callback is responsible for configuring all aspects
21
+ * of the chart before rendering.
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * config={(handle) => {
26
+ * handle.baseConfig({ ... });
27
+ * handle.axesShowSplitLines();
28
+ * handle.axesAddXLabelIcons({ ... });
29
+ * }}
30
+ * ```
31
+ */
32
+ export type ChartConfigCallback = (handle: ChartConfigHandle) => void;
33
+
34
+ /**
35
+ * Accepted input type for the `config` property on `<syn-chart>`.
36
+ *
37
+ * Can be either:
38
+ * - A direct ECharts configuration object
39
+ * - A callback function that configures the chart using preset functions
40
+ */
41
+ export type ChartConfigType = ECConfig | ChartConfigCallback;
42
+
43
+ export type {
44
+ AxisIndices,
45
+ AxisUpdateOptions,
46
+ AxesUpdateOptions,
47
+ AxisLabelIconOptions,
48
+ } from './configs/axes/types.js';
@@ -15,7 +15,7 @@ Component.define('syn-chart');
15
15
  *
16
16
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
17
17
  * @status experimental
18
- * @since 0.0.0
18
+ * @since 3.15.0
19
19
  *
20
20
  * @csspart base - The component's base wrapper.
21
21
  */
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
12
12
  * @status experimental
13
- * @since 0.0.0
13
+ * @since 3.15.0
14
14
  *
15
15
  * @csspart base - The component's base wrapper.
16
16
  */
@@ -44,16 +44,22 @@ it takes precedence over the palette.
44
44
  palette?: SynChart['palette'];
45
45
 
46
46
  /**
47
- * The ECharts configuration option object.
47
+ * The ECharts configuration input.
48
48
 
49
- This property maps 1:1 to the ECharts `option` parameter passed to `setOption()`.
49
+ This property accepts either:
50
+ - a plain `ECConfig` object, or
51
+ - a callback that receives a typed preset handle and applies chart presets.
52
+
53
+ The resolved result maps 1:1 to the ECharts `option` parameter passed to
54
+ `setOption()`.
50
55
  Consult the [ECharts option documentation](https://echarts.apache.org/en/option.html)
51
- and assign the object directly to this property.
56
+ and assign either the object directly or build it through the handle.
52
57
 
53
58
  > **Note:** Currently only **line charts** (`series[].type: 'line'`) are supported.
54
59
  > Support for additional chart types (bar, pie, etc.) will be added in future releases or can be requested.
55
60
 
56
- Assigning a new object completely replaces the previous chart configuration (`notMerge: true`).
61
+ Assigning a new config input completely replaces the previous chart
62
+ configuration (`notMerge: true`).
57
63
  To update only parts of the chart, access the underlying ECharts instance directly and
58
64
  call `setOption()` with custom merge options.
59
65
  */
@@ -1,5 +1,25 @@
1
1
  # @synergy-design-system/angular
2
2
 
3
+ ## 3.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1291](https://github.com/synergy-design-system/synergy-design-system/pull/1291) [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10) Thanks [@kirchsuSICKAG](https://github.com/kirchsuSICKAG)! - Released on: 2026-06-24
8
+
9
+ feat: ✨ chart axes mvp ([#1203](https://github.com/synergy-design-system/synergy-design-system/issues/1203))
10
+
11
+ This release introduces the first chart axis MVP for syn-chart.
12
+
13
+ New features:
14
+ - Adds and registers a Synergy ECharts light theme as default for syn-chart.
15
+ - Provides a config callback API with preset methods like `axesShowSplitLines()`, `axesAddXLabelIcons()`, and `axesHideLabels()` as an alternative to raw ECharts configuration objects for the _config_ property. These methods support both method chaining and sequential calling patterns for maximum flexibility.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10), [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10)]:
20
+ - @synergy-design-system/components@3.16.0
21
+ - @synergy-design-system/tokens@3.16.0
22
+
3
23
  ## 3.15.7
4
24
 
5
25
  ### Patch Changes
@@ -22,7 +22,7 @@
22
22
  "url": "https://github.com/synergy-design-system/synergy-design-system.git",
23
23
  "directory": "packages/angular"
24
24
  },
25
- "version": "3.15.7",
25
+ "version": "3.16.0",
26
26
  "scripts": {
27
27
  "_build": "pnpm _clean && ng-packagr -c tsconfig.lib.json && pnpm _after-build",
28
28
  "_clean": "rm -rf ../_private/angular-demo/.angular",
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1291](https://github.com/synergy-design-system/synergy-design-system/pull/1291) [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10) Thanks [@kirchsuSICKAG](https://github.com/kirchsuSICKAG)! - Released on: 2026-06-24
8
+
9
+ feat: ✨ chart axes mvp ([#1203](https://github.com/synergy-design-system/synergy-design-system/issues/1203))
10
+
11
+ This release introduces the first chart axis MVP for syn-chart.
12
+
13
+ New features:
14
+ - Adds and registers a Synergy ECharts light theme as default for syn-chart.
15
+ - Provides a config callback API with preset methods like `axesShowSplitLines()`, `axesAddXLabelIcons()`, and `axesHideLabels()` as an alternative to raw ECharts configuration objects for the _config_ property. These methods support both method chaining and sequential calling patterns for maximum flexibility.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10)]:
20
+ - @synergy-design-system/tokens@3.16.0
21
+
3
22
  ## 3.15.7
4
23
 
5
24
  ### Patch Changes
@@ -4,7 +4,7 @@
4
4
  "url": "https://www.sick.com"
5
5
  },
6
6
  "name": "@synergy-design-system/components",
7
- "version": "3.15.7",
7
+ "version": "3.16.0",
8
8
  "description": "",
9
9
  "repository": {
10
10
  "type": "git",
@@ -1,5 +1,25 @@
1
1
  # @synergy-design-system/react
2
2
 
3
+ ## 3.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1291](https://github.com/synergy-design-system/synergy-design-system/pull/1291) [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10) Thanks [@kirchsuSICKAG](https://github.com/kirchsuSICKAG)! - Released on: 2026-06-24
8
+
9
+ feat: ✨ chart axes mvp ([#1203](https://github.com/synergy-design-system/synergy-design-system/issues/1203))
10
+
11
+ This release introduces the first chart axis MVP for syn-chart.
12
+
13
+ New features:
14
+ - Adds and registers a Synergy ECharts light theme as default for syn-chart.
15
+ - Provides a config callback API with preset methods like `axesShowSplitLines()`, `axesAddXLabelIcons()`, and `axesHideLabels()` as an alternative to raw ECharts configuration objects for the _config_ property. These methods support both method chaining and sequential calling patterns for maximum flexibility.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [[`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10), [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10)]:
20
+ - @synergy-design-system/components@3.16.0
21
+ - @synergy-design-system/tokens@3.16.0
22
+
3
23
  ## 3.15.7
4
24
 
5
25
  ### Patch Changes
@@ -43,7 +43,7 @@
43
43
  "directory": "packages/react"
44
44
  },
45
45
  "type": "module",
46
- "version": "3.15.7",
46
+ "version": "3.16.0",
47
47
  "devDependencies": {
48
48
  "@types/react": "^19.2.17",
49
49
  "react": "^19.2.7"
@@ -269,7 +269,7 @@ export type SynCustomElement<
269
269
  *
270
270
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
271
271
  * @status experimental
272
- * @since 0.0.0
272
+ * @since 3.15.0
273
273
  *
274
274
  * @csspart base - The component's base wrapper.
275
275
  */ export type SynChartJSXElement = SynCustomElement<SynChart, []>;
@@ -1737,7 +1737,7 @@ declare module 'react' {
1737
1737
  *
1738
1738
  * @documentation https://synergy-design-system.github.io/?path=/docs/charting-syn-chart--docs
1739
1739
  * @status experimental
1740
- * @since 0.0.0
1740
+ * @since 3.15.0
1741
1741
  *
1742
1742
  * @csspart base - The component's base wrapper.
1743
1743
  */ 'syn-chart': SynChartJSXElement;
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1291](https://github.com/synergy-design-system/synergy-design-system/pull/1291) [`363595e`](https://github.com/synergy-design-system/synergy-design-system/commit/363595ea1fde8baad6e11d69365732aa9f547c10) Thanks [@kirchsuSICKAG](https://github.com/kirchsuSICKAG)! - Released on: 2026-06-24
8
+
9
+ feat: ✨ Prefix all chart tokens, add new component and chart tokens
10
+
11
+ **Prefixing chart tokens**
12
+ - chart-related tokens now use a dedicated `chart` prefix to ensure clear scoping and avoid naming conflicts.
13
+
14
+ **Component tokens**
15
+ - `--syn-typography-color-text-quiet`
16
+ - `--syn-typography-color-text-quiet-inverted`
17
+
18
+ **Chart tokens**:
19
+ - `--syn-chart-grid-lines-color`
20
+ - `--syn-chart-grid-lines-color-emphasize`
21
+
3
22
  ## 3.15.7
4
23
 
5
24
  ### Patch Changes
@@ -82,5 +82,5 @@
82
82
  },
83
83
  "type": "module",
84
84
  "types": "./dist/js/index.d.ts",
85
- "version": "3.15.7"
85
+ "version": "3.16.0"
86
86
  }