@vaadin/charts 25.0.0-alpha1 → 25.0.0-alpha11

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.
@@ -132,11 +132,6 @@ export * from './vaadin-chart-mixin.js';
132
132
  *
133
133
  * For example `--vaadin-charts-color-0` sets the color of the first series on a chart.
134
134
  *
135
- * ### Validating your License
136
- *
137
- * When using Vaadin Charts in a development environment, you will see a pop-up that asks you
138
- * to validate your license by signing in to vaadin.com.
139
- *
140
135
  * @fires {CustomEvent} chart-add-series - Fired when a new series is added.
141
136
  * @fires {CustomEvent} chart-after-export - Fired after a chart is exported.
142
137
  * @fires {CustomEvent} chart-after-print - Fired after a chart is printed.
@@ -9,11 +9,13 @@
9
9
  * license.
10
10
  */
11
11
  import './vaadin-chart-series.js';
12
- import { css, html, LitElement } from 'lit';
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 { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
16
17
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
18
+ import { chartStyles } from './styles/vaadin-chart-base-styles.js';
17
19
  import { ChartMixin } from './vaadin-chart-mixin.js';
18
20
 
19
21
  /**
@@ -135,11 +137,6 @@ import { ChartMixin } from './vaadin-chart-mixin.js';
135
137
  *
136
138
  * For example `--vaadin-charts-color-0` sets the color of the first series on a chart.
137
139
  *
138
- * ### Validating your License
139
- *
140
- * When using Vaadin Charts in a development environment, you will see a pop-up that asks you
141
- * to validate your license by signing in to vaadin.com.
142
- *
143
140
  * @fires {CustomEvent} chart-add-series - Fired when a new series is added.
144
141
  * @fires {CustomEvent} chart-after-export - Fired after a chart is exported.
145
142
  * @fires {CustomEvent} chart-after-print - Fired after a chart is printed.
@@ -180,7 +177,7 @@ import { ChartMixin } from './vaadin-chart-mixin.js';
180
177
  * @mixes ThemableMixin
181
178
  * @mixes ElementMixin
182
179
  */
183
- class Chart extends ChartMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
180
+ class Chart extends ChartMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
184
181
  static get is() {
185
182
  return 'vaadin-chart';
186
183
  }
@@ -190,17 +187,13 @@ class Chart extends ChartMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElemen
190
187
  }
191
188
 
192
189
  static get styles() {
193
- return css`
194
- :host {
195
- display: block;
196
- width: 100%;
197
- overflow: hidden;
198
- }
190
+ return chartStyles;
191
+ }
199
192
 
200
- :host([hidden]) {
201
- display: none !important;
202
- }
203
- `;
193
+ static get lumoInjector() {
194
+ return {
195
+ includeBaseStyles: true,
196
+ };
204
197
  }
205
198
 
206
199
  /** @protected */
package/vaadin-chart.js CHANGED
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-chart.js';
1
+ import './src/vaadin-chart.js';
2
2
  export * from './src/vaadin-chart.js';
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.0.0-alpha1",
4
+ "version": "25.0.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -235,7 +235,7 @@
235
235
  },
236
236
  {
237
237
  "name": "vaadin-chart",
238
- "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#### Configuring your chart 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#### Configuring your chart using JS API\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `configuration` property (JS Api) to set chart title, categories and data\n```js\ninitChartWithJSApi() {\n requestAnimationFrame(() => {\n const configuration = this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSApi();\n}\n```\n\n#### Configuring your chart using JS JSON API\n\nJS JSON API is a simple alternative to the JS API.\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `updateConfiguration` method (JS JSON Api) to set chart title, categories and data\n```js\ninitChartWithJSJSONApi() {\n this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSJSONApi();\n}\n```\n\nIt should be noted that 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.\n\n### Validating your License\n\nWhen using Vaadin Charts in a development environment, you will see a pop-up that asks you\nto validate your license by signing in to vaadin.com.",
238
+ "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#### Configuring your chart 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#### Configuring your chart using JS API\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `configuration` property (JS Api) to set chart title, categories and data\n```js\ninitChartWithJSApi() {\n requestAnimationFrame(() => {\n const configuration = this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSApi();\n}\n```\n\n#### Configuring your chart using JS JSON API\n\nJS JSON API is a simple alternative to the JS API.\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `updateConfiguration` method (JS JSON Api) to set chart title, categories and data\n```js\ninitChartWithJSJSONApi() {\n this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSJSONApi();\n}\n```\n\nIt should be noted that 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.",
239
239
  "attributes": [
240
240
  {
241
241
  "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.0.0-alpha1",
4
+ "version": "25.0.0-alpha11",
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#### Configuring your chart 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#### Configuring your chart using JS API\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `configuration` property (JS Api) to set chart title, categories and data\n```js\ninitChartWithJSApi() {\n requestAnimationFrame(() => {\n const configuration = this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSApi();\n}\n```\n\n#### Configuring your chart using JS JSON API\n\nJS JSON API is a simple alternative to the JS API.\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `updateConfiguration` method (JS JSON Api) to set chart title, categories and data\n```js\ninitChartWithJSJSONApi() {\n this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSJSONApi();\n}\n```\n\nIt should be noted that 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.\n\n### Validating your License\n\nWhen using Vaadin Charts in a development environment, you will see a pop-up that asks you\nto validate your license by signing in to vaadin.com.",
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#### Configuring your chart 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#### Configuring your chart using JS API\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `configuration` property (JS Api) to set chart title, categories and data\n```js\ninitChartWithJSApi() {\n requestAnimationFrame(() => {\n const configuration = this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSApi();\n}\n```\n\n#### Configuring your chart using JS JSON API\n\nJS JSON API is a simple alternative to the JS API.\n\n1. Set an id for the `<vaadin-chart>` in the template\n```html\n <vaadin-chart id=\"mychart\"></vaadin-chart>\n```\n1. Add a function that uses `updateConfiguration` method (JS JSON Api) to set chart title, categories and data\n```js\ninitChartWithJSJSONApi() {\n this.$.mychart.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```\n1. Call that function from connectedCallback (when the element is added to a document)\n```js\nconnectedCallback() {\n super.connectedCallback();\n this.initChartWithJSJSONApi();\n}\n```\n\nIt should be noted that 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
  {
@@ -1,6 +0,0 @@
1
- import '../vaadin-chart-base-theme.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/typography.js';
4
- declare const chartColors: import("lit").CSSResult;
5
- declare const chartTheme: import("lit").CSSResult;
6
- export { chartColors, chartTheme };
@@ -1,97 +0,0 @@
1
- import '../vaadin-chart-base-theme.js';
2
- import '@vaadin/vaadin-lumo-styles/color.js';
3
- import '@vaadin/vaadin-lumo-styles/typography.js';
4
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';
5
-
6
- const chartColors = css`
7
- :host {
8
- --vaadin-charts-color-0: #5ac2f7;
9
- --vaadin-charts-color-1: #1676f3;
10
- --vaadin-charts-color-2: #ff7d94;
11
- --vaadin-charts-color-3: #c5164e;
12
- --vaadin-charts-color-4: #15c15d;
13
- --vaadin-charts-color-5: #0e8151;
14
- --vaadin-charts-color-6: #c18ed2;
15
- --vaadin-charts-color-7: #9233b3;
16
- --vaadin-charts-color-8: #fda253;
17
- --vaadin-charts-color-9: #e24932;
18
- --vaadin-charts-color-positive: var(--vaadin-charts-color-4, #15c15d);
19
- --vaadin-charts-color-negative: var(--vaadin-charts-color-9, #e24932);
20
- }
21
-
22
- :host([theme~='gradient']) {
23
- --vaadin-charts-color-0: #1676f3;
24
- --vaadin-charts-color-1: #13bbf0;
25
- --vaadin-charts-color-2: #1ee;
26
- --vaadin-charts-color-3: #0cd9bf;
27
- --vaadin-charts-color-4: #06be81;
28
- --vaadin-charts-color-5: #00a344;
29
- --vaadin-charts-color-6: #41c639;
30
- --vaadin-charts-color-7: #8aed2c;
31
- --vaadin-charts-color-8: #c0e632;
32
- --vaadin-charts-color-9: #f6db3a;
33
- --vaadin-charts-color-positive: var(--vaadin-charts-color-6);
34
- --vaadin-charts-color-negative: var(--vaadin-charts-color-1);
35
- }
36
-
37
- :host([theme~='monotone']) {
38
- --vaadin-charts-color-0: #1676f3;
39
- --vaadin-charts-color-1: #4795f5;
40
- --vaadin-charts-color-2: #71b0f7;
41
- --vaadin-charts-color-3: #a0cef9;
42
- --vaadin-charts-color-4: #bce0fa;
43
- --vaadin-charts-color-5: #a8d8ed;
44
- --vaadin-charts-color-6: #7fc3dd;
45
- --vaadin-charts-color-7: #54adcc;
46
- --vaadin-charts-color-8: #2b99bc;
47
- --vaadin-charts-color-9: #0284ac;
48
- --vaadin-charts-color-positive: var(--vaadin-charts-color-3);
49
- --vaadin-charts-color-negative: var(--vaadin-charts-color-9);
50
- }
51
-
52
- :host([theme~='classic']) {
53
- --vaadin-charts-color-0: #7cb5ec;
54
- --vaadin-charts-color-1: #434348;
55
- --vaadin-charts-color-2: #90ed7d;
56
- --vaadin-charts-color-3: #f7a35c;
57
- --vaadin-charts-color-4: #8085e9;
58
- --vaadin-charts-color-5: #f15c80;
59
- --vaadin-charts-color-6: #e4d354;
60
- --vaadin-charts-color-7: #2b908f;
61
- --vaadin-charts-color-8: #f45b5b;
62
- --vaadin-charts-color-9: #91e8e1;
63
- }
64
- `;
65
-
66
- const chartTheme = css`
67
- :host {
68
- --vaadin-charts-background: var(--lumo-base-color);
69
- --vaadin-charts-title-label: var(--lumo-header-text-color);
70
- --vaadin-charts-axis-title: var(--lumo-secondary-text-color);
71
- --vaadin-charts-axis-label: var(--lumo-secondary-text-color);
72
- --vaadin-charts-data-label: var(--lumo-body-text-color);
73
- --vaadin-charts-secondary-label: var(--lumo-secondary-text-color);
74
- --vaadin-charts-axis-line: var(--lumo-contrast-5pct);
75
- --vaadin-charts-grid-line: var(--lumo-contrast-20pct);
76
- --vaadin-charts-disabled-label: var(--lumo-disabled-text-color);
77
- --vaadin-charts-contrast: var(--lumo-contrast);
78
- --vaadin-charts-contrast-5pct: var(--lumo-contrast-5pct);
79
- --vaadin-charts-contrast-10pct: var(--lumo-contrast-10pct);
80
- --vaadin-charts-contrast-20pct: var(--lumo-contrast-20pct);
81
- --vaadin-charts-contrast-60pct: var(--lumo-contrast-60pct);
82
- --vaadin-charts-tooltip-background: var(--lumo-base-color);
83
- --vaadin-charts-tooltip-border-color: inherit;
84
- --vaadin-charts-button-label: var(--lumo-primary-text-color);
85
- --vaadin-charts-button-background: var(--lumo-contrast-5pct);
86
- --vaadin-charts-button-hover-background: var(--lumo-primary-color-10pct);
87
- --vaadin-charts-button-active-label: var(--lumo-primary-contrast-color);
88
- --vaadin-charts-button-active-background: var(--lumo-primary-color);
89
- --vaadin-charts-xaxis-line-width: 0;
90
- --vaadin-charts-tooltip-background-opacity: 1;
91
- font-family: var(--lumo-font-family);
92
- }
93
- `;
94
-
95
- registerStyles('vaadin-chart', [chartColors, chartTheme], { moduleId: 'lumo-chart' });
96
-
97
- export { chartColors, chartTheme };
@@ -1,2 +0,0 @@
1
- import './vaadin-chart-styles.js';
2
- import '../../src/vaadin-chart.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-chart-styles.js';
2
- import '../../src/vaadin-chart.js';