@vaadin/charts 25.0.0-alpha3 → 25.0.0-alpha5
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 +7 -7
- package/src/helpers.js +11 -0
- package/src/styles/vaadin-chart-core-styles.d.ts +13 -0
- package/{theme/vaadin-chart-base-theme.js → src/styles/vaadin-chart-core-styles.js} +18 -17
- package/src/vaadin-chart.js +5 -13
- package/theme/lumo/vaadin-chart-styles.d.ts +0 -1
- package/theme/lumo/vaadin-chart-styles.js +0 -1
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/charts",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/component-base": "25.0.0-
|
|
39
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha5",
|
|
39
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha5",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha5",
|
|
41
41
|
"highcharts": "9.2.2",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-alpha5",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha5",
|
|
47
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
48
48
|
"sinon": "^18.0.0"
|
|
49
49
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "7dc87bb2a3cae81ed53259fa10b58f990d50c6fd"
|
|
56
56
|
}
|
package/src/helpers.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2025 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
10
|
+
*/
|
|
11
|
+
|
|
1
12
|
export function inflateFunctions(config) {
|
|
2
13
|
if (Array.isArray(config)) {
|
|
3
14
|
config.forEach(inflateFunctions);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2025 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
10
|
+
*/
|
|
11
|
+
import type { CSSResult } from 'lit';
|
|
12
|
+
|
|
13
|
+
export const chartStyles: CSSResult;
|
|
@@ -16,18 +16,26 @@
|
|
|
16
16
|
*
|
|
17
17
|
* License: www.highcharts.com/license
|
|
18
18
|
*/
|
|
19
|
-
import { css
|
|
19
|
+
import { css } from 'lit';
|
|
20
20
|
|
|
21
21
|
/* When updating this file do not override vaadin-charts custom properties section */
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
export const chartStyles = css`
|
|
24
24
|
:host {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
font-family:
|
|
29
|
+
-apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
30
|
+
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
27
31
|
font-size: 12px;
|
|
28
32
|
line-height: normal;
|
|
29
33
|
}
|
|
30
34
|
|
|
35
|
+
:host([hidden]) {
|
|
36
|
+
display: none !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
.highcharts-container {
|
|
32
40
|
position: relative;
|
|
33
41
|
overflow: hidden;
|
|
@@ -125,7 +133,7 @@ const chartBaseTheme = css`
|
|
|
125
133
|
}
|
|
126
134
|
|
|
127
135
|
:where([styled-mode]) .highcharts-xaxis-grid .highcharts-grid-line {
|
|
128
|
-
stroke-width: var(--vaadin-charts-xaxis-line-width,
|
|
136
|
+
stroke-width: var(--vaadin-charts-xaxis-line-width, 0);
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
:where([styled-mode]) .highcharts-tick {
|
|
@@ -171,9 +179,6 @@ const chartBaseTheme = css`
|
|
|
171
179
|
pointer-events: none;
|
|
172
180
|
white-space: nowrap;
|
|
173
181
|
transition: stroke 150ms;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
:where([styled-mode]) .highcharts-tooltip {
|
|
177
182
|
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.05)) !important;
|
|
178
183
|
}
|
|
179
184
|
|
|
@@ -444,7 +449,7 @@ const chartBaseTheme = css`
|
|
|
444
449
|
}
|
|
445
450
|
|
|
446
451
|
:where([styled-mode]) .highcharts-treemap-series .highcharts-point-hover {
|
|
447
|
-
stroke-width:
|
|
452
|
+
stroke-width: 0;
|
|
448
453
|
stroke: var(--vaadin-charts-background, #fff);
|
|
449
454
|
fill-opacity: 0.75;
|
|
450
455
|
transition:
|
|
@@ -508,7 +513,7 @@ const chartBaseTheme = css`
|
|
|
508
513
|
}
|
|
509
514
|
|
|
510
515
|
:where([styled-mode]) .highcharts-legend-item > .highcharts-point {
|
|
511
|
-
stroke-width:
|
|
516
|
+
stroke-width: 0;
|
|
512
517
|
}
|
|
513
518
|
|
|
514
519
|
:where([styled-mode]) .highcharts-legend-item:hover text {
|
|
@@ -753,7 +758,7 @@ const chartBaseTheme = css`
|
|
|
753
758
|
:where([styled-mode]) .highcharts-button-hover {
|
|
754
759
|
transition: fill 0ms;
|
|
755
760
|
fill: var(--vaadin-charts-button-hover-background, hsla(214, 90%, 52%, 0.1));
|
|
756
|
-
stroke-width:
|
|
761
|
+
stroke-width: 0;
|
|
757
762
|
}
|
|
758
763
|
|
|
759
764
|
:where([styled-mode]) .highcharts-button-hover text {
|
|
@@ -903,7 +908,7 @@ const chartBaseTheme = css`
|
|
|
903
908
|
|
|
904
909
|
:where([styled-mode]) .highcharts-coloraxis-marker {
|
|
905
910
|
fill: var(--vaadin-charts-axis-label, hsla(214, 42%, 18%, 0.72));
|
|
906
|
-
stroke-width:
|
|
911
|
+
stroke-width: 0;
|
|
907
912
|
}
|
|
908
913
|
|
|
909
914
|
:where([styled-mode]) .highcharts-null-point {
|
|
@@ -1053,10 +1058,6 @@ const chartBaseTheme = css`
|
|
|
1053
1058
|
/* https://github.com/highcharts/highcharts/issues/16282 */
|
|
1054
1059
|
/* without this the resize callback always calls __reflow */
|
|
1055
1060
|
ul[aria-hidden='false'] {
|
|
1056
|
-
margin:
|
|
1061
|
+
margin: 0;
|
|
1057
1062
|
}
|
|
1058
1063
|
`;
|
|
1059
|
-
|
|
1060
|
-
registerStyles('vaadin-chart', chartBaseTheme, { moduleId: 'vaadin-chart-base-theme' });
|
|
1061
|
-
|
|
1062
|
-
export { chartBaseTheme };
|
package/src/vaadin-chart.js
CHANGED
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
11
|
import './vaadin-chart-series.js';
|
|
12
|
-
import {
|
|
12
|
+
import { html, LitElement } from 'lit';
|
|
13
13
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
14
14
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
15
15
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
16
|
+
import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
|
|
16
17
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
18
|
+
import { chartStyles } from './styles/vaadin-chart-core-styles.js';
|
|
17
19
|
import { ChartMixin } from './vaadin-chart-mixin.js';
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -180,7 +182,7 @@ import { ChartMixin } from './vaadin-chart-mixin.js';
|
|
|
180
182
|
* @mixes ThemableMixin
|
|
181
183
|
* @mixes ElementMixin
|
|
182
184
|
*/
|
|
183
|
-
class Chart extends ChartMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
|
|
185
|
+
class Chart extends ChartMixin(ThemableMixin(ElementMixin(CSSInjectionMixin(PolylitMixin(LitElement))))) {
|
|
184
186
|
static get is() {
|
|
185
187
|
return 'vaadin-chart';
|
|
186
188
|
}
|
|
@@ -190,17 +192,7 @@ class Chart extends ChartMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElemen
|
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
static get styles() {
|
|
193
|
-
return
|
|
194
|
-
:host {
|
|
195
|
-
display: block;
|
|
196
|
-
width: 100%;
|
|
197
|
-
overflow: hidden;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
:host([hidden]) {
|
|
201
|
-
display: none !important;
|
|
202
|
-
}
|
|
203
|
-
`;
|
|
195
|
+
return chartStyles;
|
|
204
196
|
}
|
|
205
197
|
|
|
206
198
|
/** @protected */
|
package/web-types.json
CHANGED