@vaadin/charts 23.2.0-alpha3 → 23.2.0-alpha4

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@vaadin/charts",
3
- "version": "23.2.0-alpha3",
3
+ "version": "23.2.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "description": "vaadin-charts",
8
- "license": "https://raw.githubusercontent.com/vaadin/web-components/master/packages/charts/LICENSE",
8
+ "license": "SEE LICENSE IN LICENSE",
9
9
  "cvdlName": "vaadin-chart",
10
10
  "repository": {
11
11
  "type": "git",
@@ -24,7 +24,9 @@
24
24
  "src",
25
25
  "theme",
26
26
  "vaadin-*.d.ts",
27
- "vaadin-*.js"
27
+ "vaadin-*.js",
28
+ "web-types.json",
29
+ "web-types.lit.json"
28
30
  ],
29
31
  "keywords": [
30
32
  "Vaadin",
@@ -35,8 +37,8 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "23.2.0-alpha3",
39
- "@vaadin/vaadin-themable-mixin": "23.2.0-alpha3",
40
+ "@vaadin/component-base": "23.2.0-alpha4",
41
+ "@vaadin/vaadin-themable-mixin": "23.2.0-alpha4",
40
42
  "highcharts": "9.2.2"
41
43
  },
42
44
  "devDependencies": {
@@ -44,5 +46,9 @@
44
46
  "@vaadin/testing-helpers": "^0.3.2",
45
47
  "sinon": "^13.0.2"
46
48
  },
47
- "gitHead": "06e5875be93ca50da2846dafc65a8531010c0576"
49
+ "web-types": [
50
+ "web-types.json",
51
+ "web-types.lit.json"
52
+ ],
53
+ "gitHead": "cbf5f1d0f38ac9b81c65cf9ef5660182e176e598"
48
54
  }
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { PointOptionsObject, Series, SeriesOptionsType } from 'highcharts';
7
7
 
8
- export type ChartSeriesMarkers = 'shown' | 'hidden' | 'auto';
8
+ export type ChartSeriesMarkers = 'auto' | 'hidden' | 'shown';
9
9
 
10
10
  export interface ChartSeriesConfig {
11
11
  data?: ChartSeriesValues;
@@ -22,7 +22,7 @@ export interface ChartSeriesConfig {
22
22
 
23
23
  export type ChartSeriesOptions = ChartSeriesConfig & SeriesOptionsType;
24
24
 
25
- export type ChartSeriesValues = Array<number | number[] | PointOptionsObject>;
25
+ export type ChartSeriesValues = Array<number[] | PointOptionsObject | number>;
26
26
 
27
27
  /**
28
28
  * `<vaadin-chart-series>` is a custom element for creating series for Vaadin Charts.
@@ -10,7 +10,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
10
10
 
11
11
  export type ChartCategories = string[] | { [key: number]: string };
12
12
 
13
- export type ChartCategoryPosition = 'left' | 'right' | 'top' | 'bottom';
13
+ export type ChartCategoryPosition = 'bottom' | 'left' | 'right' | 'top';
14
14
 
15
15
  export type ChartStacking = 'normal' | 'percent' | null;
16
16
 
@@ -245,7 +245,7 @@ export interface ChartCustomEventMap {
245
245
  'yaxes-extremes-set': ChartYaxesExtremesSetEvent;
246
246
  }
247
247
 
248
- export type ChartEventMap = HTMLElementEventMap & ChartCustomEventMap;
248
+ export type ChartEventMap = ChartCustomEventMap & HTMLElementEventMap;
249
249
 
250
250
  /**
251
251
  * `<vaadin-chart>` is a Web Component for creating high quality charts.
@@ -346,8 +346,7 @@ export type ChartEventMap = HTMLElementEventMap & ChartCustomEventMap;
346
346
  * A comprehensive list of the supported style classes can be found at
347
347
  * https://www.highcharts.com/docs/chart-design-and-style/style-by-css
348
348
  *
349
- * See also the documentation for styling Vaadin components at
350
- * https://vaadin.com/docs/v14/themes/themes-and-styling-overview.html
349
+ * See also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.
351
350
  *
352
351
  * ### RTL support
353
352
  *
@@ -582,13 +581,13 @@ declare class Chart extends ResizeMixin(ThemableMixin(ElementMixin(HTMLElement))
582
581
  addEventListener<K extends keyof ChartEventMap>(
583
582
  type: K,
584
583
  listener: (this: Chart, ev: ChartEventMap[K]) => void,
585
- options?: boolean | AddEventListenerOptions,
584
+ options?: AddEventListenerOptions | boolean,
586
585
  ): void;
587
586
 
588
587
  removeEventListener<K extends keyof ChartEventMap>(
589
588
  type: K,
590
589
  listener: (this: Chart, ev: ChartEventMap[K]) => void,
591
- options?: boolean | EventListenerOptions,
590
+ options?: EventListenerOptions | boolean,
592
591
  ): void;
593
592
  }
594
593
 
@@ -34,7 +34,7 @@ export function deepMerge(target, source) {
34
34
  const isObject = (item) => item && typeof item === 'object' && !Array.isArray(item);
35
35
 
36
36
  if (isObject(source) && isObject(target)) {
37
- for (const key in source) {
37
+ Object.keys(source).forEach((key) => {
38
38
  if (isObject(source[key])) {
39
39
  if (!target[key]) {
40
40
  Object.assign(target, { [key]: {} });
@@ -44,7 +44,7 @@ export function deepMerge(target, source) {
44
44
  } else {
45
45
  Object.assign(target, { [key]: source[key] });
46
46
  }
47
- }
47
+ });
48
48
  }
49
49
 
50
50
  return target;
@@ -164,8 +164,7 @@ Highcharts.setOptions({ lang: { noData: '' } });
164
164
  * A comprehensive list of the supported style classes can be found at
165
165
  * https://www.highcharts.com/docs/chart-design-and-style/style-by-css
166
166
  *
167
- * See also the documentation for styling Vaadin components at
168
- * https://vaadin.com/docs/v14/themes/themes-and-styling-overview.html
167
+ * See also the [Chart Styling](https://vaadin.com/docs/latest/components/charts/css-styling) documentation.
169
168
  *
170
169
  * ### RTL support
171
170
  *
@@ -1217,24 +1216,20 @@ class Chart extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))) {
1217
1216
 
1218
1217
  /** @private */
1219
1218
  __inflateFunctions(jsonConfiguration) {
1220
- for (const attr in jsonConfiguration) {
1221
- // eslint-disable-next-line no-prototype-builtins
1222
- if (jsonConfiguration.hasOwnProperty(attr)) {
1223
- const targetProperty = jsonConfiguration[attr];
1224
- if (attr.indexOf('_fn_') === 0 && (typeof targetProperty === 'string' || targetProperty instanceof String)) {
1225
- try {
1226
- // eslint-disable-next-line no-eval
1227
- jsonConfiguration[attr.substr(4)] = eval(`(${targetProperty})`);
1228
- } catch (e) {
1229
- // eslint-disable-next-line no-eval
1230
- jsonConfiguration[attr.substr(4)] = eval(`(function(){${targetProperty}})`);
1231
- }
1232
- delete jsonConfiguration[attr];
1233
- } else if (targetProperty instanceof Object) {
1234
- this.__inflateFunctions(targetProperty);
1219
+ Object.entries(jsonConfiguration).forEach(([attr, targetProperty]) => {
1220
+ if (attr.startsWith('_fn_') && (typeof targetProperty === 'string' || targetProperty instanceof String)) {
1221
+ try {
1222
+ // eslint-disable-next-line no-eval
1223
+ jsonConfiguration[attr.substr(4)] = eval(`(${targetProperty})`);
1224
+ } catch (e) {
1225
+ // eslint-disable-next-line no-eval
1226
+ jsonConfiguration[attr.substr(4)] = eval(`(function(){${targetProperty}})`);
1235
1227
  }
1228
+ delete jsonConfiguration[attr];
1229
+ } else if (targetProperty instanceof Object) {
1230
+ this.__inflateFunctions(targetProperty);
1236
1231
  }
1237
- }
1232
+ });
1238
1233
  }
1239
1234
 
1240
1235
  /** @private */
@@ -1766,7 +1761,7 @@ class Chart extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement))) {
1766
1761
  let style = '';
1767
1762
  if (this.hasAttribute('style')) {
1768
1763
  style = this.getAttribute('style');
1769
- if (style.charAt(style.length - 1) !== ';') {
1764
+ if (!style.endsWith(';')) {
1770
1765
  style += ';';
1771
1766
  }
1772
1767
  }
package/web-types.json ADDED
@@ -0,0 +1,684 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/charts",
4
+ "version": "23.2.0-alpha4",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "vaadin-chart-series",
11
+ "description": "`<vaadin-chart-series>` is a custom element for creating series for Vaadin Charts.\n\n### Basic use\n\nTo use `<vaadin-chart-series>`, add it inside a `<vaadin-chart>` element:\n\n```html\n <vaadin-chart>\n <vaadin-chart-series></vaadin-chart-series>\n </vaadin-chart>\n```\n\n`<vaadin-chart-series>` accepts `values` as an array attribute, so you can add it to your element definition:\n\n```html\n <vaadin-chart-series values=\"[10,20,30,40,50]\"></vaadin-chart-series>\n```\n\nwhich will add a new line series, where each value will be a data point.\nLook for the Properties session to see all available attributes.\n\n### Dynamically adding and removing series\n\nYou are also able to add and remove series by using DOM API.\n\nTo create a new series, call `document.createElement('vaadin-chart-series')` and append it to your `<vaadin-chart>`:\n\n```js\n const chart = \\* a <vaadin-chart> reference *\\\n const newSeries = document.createElement('vaadin-chart-series');\n newSeries.values = [10,20,30,40,50];\n chart.appendChild(newSeries);\n```\n\nIn order to remove it, you should use the series to be removed as a reference for the `#removeChild()` call:\n\n```js\n const chart = \\* a <vaadin-chart> reference *\\\n const seriesToBeRemoved = \\* a <vaadin-chart-series> reference to remove*\\\n chart.removeChild(seriesToBeRemoved);\n```",
12
+ "attributes": [
13
+ {
14
+ "name": "value-min",
15
+ "description": "Value-axis minimum-value.\nSets the value to a series bound by 'unit' property.\nOtherwise sets the value to the first series.\nUndefined by default (determined from data).",
16
+ "value": {
17
+ "type": [
18
+ "number",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "name": "value-max",
26
+ "description": "Value-axis maximum-value.\nSee the 'valueMin'",
27
+ "value": {
28
+ "type": [
29
+ "number",
30
+ "null",
31
+ "undefined"
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "name": "type",
37
+ "description": "A string with the type of the series.\nDefaults to `'line'` in case no type is set for the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type on `<vaadin-chart>`.",
38
+ "value": {
39
+ "type": [
40
+ "string",
41
+ "null",
42
+ "undefined"
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "name": "title",
48
+ "description": "The name of the series as shown in the legend, tooltip etc.",
49
+ "value": {
50
+ "type": [
51
+ "string"
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "name": "markers",
57
+ "description": "Shows/hides data-point markers for line-like series.\nAcceptable input are:\n - `shown`: markers are always visible\n - `hidden`: markers are always hidden\n - `auto`: markers are visible for widespread data and hidden, when data is dense *(default)*",
58
+ "value": {
59
+ "type": [
60
+ "ChartSeriesMarkers",
61
+ "undefined"
62
+ ]
63
+ }
64
+ },
65
+ {
66
+ "name": "unit",
67
+ "description": "Used to connect the series to an axis; if multiple series have the same “unit”, they will share axis.\nDisplayed as a title for the axis.\nIf no unit is defined, then series will be connected to the first axis.",
68
+ "value": {
69
+ "type": [
70
+ "string",
71
+ "null",
72
+ "undefined"
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "name": "stack",
78
+ "description": "Used to group series in a different stacks.\n\"stacking\" property should be specified either for each series or in plotOptions.\nIt is recommended to place series in a single stack, when they belong to the same yAxis.",
79
+ "value": {
80
+ "type": [
81
+ "number",
82
+ "string"
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "name": "neck-position",
88
+ "description": "The height of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area height. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
89
+ "value": {
90
+ "type": [
91
+ "number",
92
+ "string"
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "name": "neck-width",
98
+ "description": "The width of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area width. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
99
+ "value": {
100
+ "type": [
101
+ "number",
102
+ "string"
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "name": "theme",
108
+ "description": "The theme variants to apply to the component.",
109
+ "value": {
110
+ "type": [
111
+ "string",
112
+ "null",
113
+ "undefined"
114
+ ]
115
+ }
116
+ }
117
+ ],
118
+ "js": {
119
+ "properties": [
120
+ {
121
+ "name": "values",
122
+ "description": "An array of data used by the series.\nFormat depends on the chart type and can be:\n - An array of numerical values `[y0, y1, y2, y3,...]`\n - An array of arrays with 2 values (`x`, `y`) `[ [x0, y0], [x1, y1], [x2, y2], ... ]`\n - An array of objects, each one describing one point `[ {x: x0, y: y0, name: 'Point0', color: '#FF0000'}, {...}, ...]`\n\n See more in [API Site](https://api.highcharts.com/highcharts/series)\n\nNote that you should always use [Polymer API](https://www.polymer-project.org/2.0/docs/devguide/model-data#array-mutation)\nto mutate the values array in order to make the component aware of the\nchange and be able to synchronize it.",
123
+ "value": {
124
+ "type": [
125
+ "ChartSeriesValues"
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "name": "valueMin",
131
+ "description": "Value-axis minimum-value.\nSets the value to a series bound by 'unit' property.\nOtherwise sets the value to the first series.\nUndefined by default (determined from data).",
132
+ "value": {
133
+ "type": [
134
+ "number",
135
+ "null",
136
+ "undefined"
137
+ ]
138
+ }
139
+ },
140
+ {
141
+ "name": "valueMax",
142
+ "description": "Value-axis maximum-value.\nSee the 'valueMin'",
143
+ "value": {
144
+ "type": [
145
+ "number",
146
+ "null",
147
+ "undefined"
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ "name": "type",
153
+ "description": "A string with the type of the series.\nDefaults to `'line'` in case no type is set for the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type on `<vaadin-chart>`.",
154
+ "value": {
155
+ "type": [
156
+ "string",
157
+ "null",
158
+ "undefined"
159
+ ]
160
+ }
161
+ },
162
+ {
163
+ "name": "title",
164
+ "description": "The name of the series as shown in the legend, tooltip etc.",
165
+ "value": {
166
+ "type": [
167
+ "string"
168
+ ]
169
+ }
170
+ },
171
+ {
172
+ "name": "markers",
173
+ "description": "Shows/hides data-point markers for line-like series.\nAcceptable input are:\n - `shown`: markers are always visible\n - `hidden`: markers are always hidden\n - `auto`: markers are visible for widespread data and hidden, when data is dense *(default)*",
174
+ "value": {
175
+ "type": [
176
+ "ChartSeriesMarkers",
177
+ "undefined"
178
+ ]
179
+ }
180
+ },
181
+ {
182
+ "name": "unit",
183
+ "description": "Used to connect the series to an axis; if multiple series have the same “unit”, they will share axis.\nDisplayed as a title for the axis.\nIf no unit is defined, then series will be connected to the first axis.",
184
+ "value": {
185
+ "type": [
186
+ "string",
187
+ "null",
188
+ "undefined"
189
+ ]
190
+ }
191
+ },
192
+ {
193
+ "name": "stack",
194
+ "description": "Used to group series in a different stacks.\n\"stacking\" property should be specified either for each series or in plotOptions.\nIt is recommended to place series in a single stack, when they belong to the same yAxis.",
195
+ "value": {
196
+ "type": [
197
+ "number",
198
+ "string"
199
+ ]
200
+ }
201
+ },
202
+ {
203
+ "name": "neckPosition",
204
+ "description": "The height of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area height. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
205
+ "value": {
206
+ "type": [
207
+ "number",
208
+ "string"
209
+ ]
210
+ }
211
+ },
212
+ {
213
+ "name": "neckWidth",
214
+ "description": "The width of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area width. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
215
+ "value": {
216
+ "type": [
217
+ "number",
218
+ "string"
219
+ ]
220
+ }
221
+ },
222
+ {
223
+ "name": "additionalOptions",
224
+ "description": "Represents additional JSON configuration.",
225
+ "value": {
226
+ "type": [
227
+ "SeriesOptionsType",
228
+ "undefined"
229
+ ]
230
+ }
231
+ }
232
+ ],
233
+ "events": []
234
+ }
235
+ },
236
+ {
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\nUsing as a base the project created with in Quick Start and an `additionalOptions` in order to make RTL adjustments:\n\n```html\n <vaadin-chart title=\"۱- عنوان نمودار\" subtitle=\"۲- عنوان فرعی نمودار\"\n additional-options='{\"title\": {\"useHTML\": true}, \"tooltip\": {\"useHTML\": true}, \"subtitle\": {\"useHTML\": true},\n \"legend\": {\"rtl\": true}, \"yAxis\": [{\"id\": \"۴- مقادیر\", \"title\": {\"text\": \"۴- مقادیر\", \"useHTML\": true}}],\n \"xAxis\": {\"reversed\": true}}'>\n <vaadin-chart-series\n type= \"column\"\n title=\"۳- عنوان ردیف\"\n unit=\"۴- مقادیر\"\n values=\"[10,20,30]\">\n </vaadin-chart-series>\n </vaadin-chart>\n```\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.",
239
+ "attributes": [
240
+ {
241
+ "name": "category-max",
242
+ "description": "Category-axis maximum value. Defaults to `undefined`.",
243
+ "value": {
244
+ "type": [
245
+ "number",
246
+ "null",
247
+ "undefined"
248
+ ]
249
+ }
250
+ },
251
+ {
252
+ "name": "category-min",
253
+ "description": "Category-axis minimum value. Defaults to `undefined`.",
254
+ "value": {
255
+ "type": [
256
+ "number",
257
+ "null",
258
+ "undefined"
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ "name": "category-position",
264
+ "description": "The position of the category axis. Acceptable values are `left`, `right`, `top` and `bottom`\nexcept for bar charts which only accept `left` and `right`.\nWith the default value, charts appear as though they have `category-position=\"bottom\"`\nexcept for bar charts that appear as though they have `category-position=\"left\"`.\n\nDefaults to `undefined`",
265
+ "value": {
266
+ "type": [
267
+ "ChartCategoryPosition",
268
+ "undefined"
269
+ ]
270
+ }
271
+ },
272
+ {
273
+ "name": "no-legend",
274
+ "description": "Specifies whether to hide legend or show.\nLegend configuration can be set up via additionalOptions property",
275
+ "value": {
276
+ "type": [
277
+ "boolean",
278
+ "null",
279
+ "undefined"
280
+ ]
281
+ }
282
+ },
283
+ {
284
+ "name": "stacking",
285
+ "description": "Specifies how series are stacked on top of each other.\nPossible values are null, \"normal\" or \"percent\".\nIf \"stack\" property is not defined on the vaadin-chart-series elements, then series will be put into\nthe default stack.",
286
+ "value": {
287
+ "type": [
288
+ "ChartStacking",
289
+ "undefined"
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ "name": "timeline",
295
+ "description": "Specifies whether the chart is a normal chart or a timeline chart.",
296
+ "value": {
297
+ "type": [
298
+ "boolean",
299
+ "null",
300
+ "undefined"
301
+ ]
302
+ }
303
+ },
304
+ {
305
+ "name": "title",
306
+ "description": "Represents the title of the chart.",
307
+ "value": {
308
+ "type": [
309
+ "string"
310
+ ]
311
+ }
312
+ },
313
+ {
314
+ "name": "tooltip",
315
+ "description": "Whether or not to show tooltip when hovering data points.",
316
+ "value": {
317
+ "type": [
318
+ "boolean",
319
+ "null",
320
+ "undefined"
321
+ ]
322
+ }
323
+ },
324
+ {
325
+ "name": "type",
326
+ "description": "Sets the default series type of the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type.",
327
+ "value": {
328
+ "type": [
329
+ "string",
330
+ "null",
331
+ "undefined"
332
+ ]
333
+ }
334
+ },
335
+ {
336
+ "name": "subtitle",
337
+ "description": "Represents the subtitle of the chart.",
338
+ "value": {
339
+ "type": [
340
+ "string",
341
+ "undefined"
342
+ ]
343
+ }
344
+ },
345
+ {
346
+ "name": "chart3d",
347
+ "description": "Specifies whether to show chart in 3 or in 2 dimensions.\nSome display angles are added by default to the \"chart.options3d\" (`{alpha: 15, beta: 15, depth: 50}`).\n3D display options can be modified via `additionalOptions`.\nThe thickness of a Pie chart can be set on `additionalOptions` through `plotOptions.pie.depth`.\n3D is supported by Bar, Column, Pie and Scatter3D charts.\nMore info available at [Highcharts](https://www.highcharts.com/docs/chart-concepts/3d-charts).",
348
+ "value": {
349
+ "type": [
350
+ "boolean",
351
+ "null",
352
+ "undefined"
353
+ ]
354
+ }
355
+ },
356
+ {
357
+ "name": "empty-text",
358
+ "description": "Specifies the message displayed on a chart without displayable data.",
359
+ "value": {
360
+ "type": [
361
+ "string"
362
+ ]
363
+ }
364
+ },
365
+ {
366
+ "name": "polar",
367
+ "description": "When present, cartesian charts like line, spline, area and column are transformed\ninto the polar coordinate system.",
368
+ "value": {
369
+ "type": [
370
+ "boolean",
371
+ "null",
372
+ "undefined"
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "name": "theme",
378
+ "description": "The theme variants to apply to the component.",
379
+ "value": {
380
+ "type": [
381
+ "string",
382
+ "null",
383
+ "undefined"
384
+ ]
385
+ }
386
+ }
387
+ ],
388
+ "js": {
389
+ "properties": [
390
+ {
391
+ "name": "configuration",
392
+ "description": "Configuration object that exposes the JS Api to configure the chart.\n\nMost important methods are:\n- `addSeries (Object options, [Boolean redraw], [Mixed animation])`\n- `addAxis (Object options, [Boolean isX], [Boolean redraw], [Mixed animation])`\n- `setTitle (Object title, object subtitle, Boolean redraw)`\n\nMost important properties are:\n- `configuration.series`: An array of the chart's series. Detailed API for Series object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Series)\n- `configuration.xAxis`: An array of the chart's x axes. Detailed API for Axis object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Axis)\n- `configuration.yAxis`: An array of the chart's y axes. Detailed API for Axis object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Axis)\n- `configuration.title`: The chart title.\n\nFor detailed documentation of available API check the [API site](http://api.highcharts.com/class-reference/classes.list)",
393
+ "value": {
394
+ "type": [
395
+ "Highcharts.Chart",
396
+ "undefined"
397
+ ]
398
+ }
399
+ },
400
+ {
401
+ "name": "categories",
402
+ "description": "If categories are present names are used instead of numbers for the category axis.\nThe format of categories can be an `Array` with a list of categories, such as `['2010', '2011', '2012']`\nor a mapping `Object`, like `{0:'1',9:'Target (10)', 15: 'Max'}`.",
403
+ "value": {
404
+ "type": [
405
+ "ChartCategories",
406
+ "undefined"
407
+ ]
408
+ }
409
+ },
410
+ {
411
+ "name": "categoryMax",
412
+ "description": "Category-axis maximum value. Defaults to `undefined`.",
413
+ "value": {
414
+ "type": [
415
+ "number",
416
+ "null",
417
+ "undefined"
418
+ ]
419
+ }
420
+ },
421
+ {
422
+ "name": "categoryMin",
423
+ "description": "Category-axis minimum value. Defaults to `undefined`.",
424
+ "value": {
425
+ "type": [
426
+ "number",
427
+ "null",
428
+ "undefined"
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ "name": "categoryPosition",
434
+ "description": "The position of the category axis. Acceptable values are `left`, `right`, `top` and `bottom`\nexcept for bar charts which only accept `left` and `right`.\nWith the default value, charts appear as though they have `category-position=\"bottom\"`\nexcept for bar charts that appear as though they have `category-position=\"left\"`.\n\nDefaults to `undefined`",
435
+ "value": {
436
+ "type": [
437
+ "ChartCategoryPosition",
438
+ "undefined"
439
+ ]
440
+ }
441
+ },
442
+ {
443
+ "name": "noLegend",
444
+ "description": "Specifies whether to hide legend or show.\nLegend configuration can be set up via additionalOptions property",
445
+ "value": {
446
+ "type": [
447
+ "boolean",
448
+ "null",
449
+ "undefined"
450
+ ]
451
+ }
452
+ },
453
+ {
454
+ "name": "stacking",
455
+ "description": "Specifies how series are stacked on top of each other.\nPossible values are null, \"normal\" or \"percent\".\nIf \"stack\" property is not defined on the vaadin-chart-series elements, then series will be put into\nthe default stack.",
456
+ "value": {
457
+ "type": [
458
+ "ChartStacking",
459
+ "undefined"
460
+ ]
461
+ }
462
+ },
463
+ {
464
+ "name": "timeline",
465
+ "description": "Specifies whether the chart is a normal chart or a timeline chart.",
466
+ "value": {
467
+ "type": [
468
+ "boolean",
469
+ "null",
470
+ "undefined"
471
+ ]
472
+ }
473
+ },
474
+ {
475
+ "name": "title",
476
+ "description": "Represents the title of the chart.",
477
+ "value": {
478
+ "type": [
479
+ "string"
480
+ ]
481
+ }
482
+ },
483
+ {
484
+ "name": "tooltip",
485
+ "description": "Whether or not to show tooltip when hovering data points.",
486
+ "value": {
487
+ "type": [
488
+ "boolean",
489
+ "null",
490
+ "undefined"
491
+ ]
492
+ }
493
+ },
494
+ {
495
+ "name": "type",
496
+ "description": "Sets the default series type of the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type.",
497
+ "value": {
498
+ "type": [
499
+ "string",
500
+ "null",
501
+ "undefined"
502
+ ]
503
+ }
504
+ },
505
+ {
506
+ "name": "subtitle",
507
+ "description": "Represents the subtitle of the chart.",
508
+ "value": {
509
+ "type": [
510
+ "string",
511
+ "undefined"
512
+ ]
513
+ }
514
+ },
515
+ {
516
+ "name": "chart3d",
517
+ "description": "Specifies whether to show chart in 3 or in 2 dimensions.\nSome display angles are added by default to the \"chart.options3d\" (`{alpha: 15, beta: 15, depth: 50}`).\n3D display options can be modified via `additionalOptions`.\nThe thickness of a Pie chart can be set on `additionalOptions` through `plotOptions.pie.depth`.\n3D is supported by Bar, Column, Pie and Scatter3D charts.\nMore info available at [Highcharts](https://www.highcharts.com/docs/chart-concepts/3d-charts).",
518
+ "value": {
519
+ "type": [
520
+ "boolean",
521
+ "null",
522
+ "undefined"
523
+ ]
524
+ }
525
+ },
526
+ {
527
+ "name": "emptyText",
528
+ "description": "Specifies the message displayed on a chart without displayable data.",
529
+ "value": {
530
+ "type": [
531
+ "string"
532
+ ]
533
+ }
534
+ },
535
+ {
536
+ "name": "additionalOptions",
537
+ "description": "Represents additional JSON configuration.",
538
+ "value": {
539
+ "type": [
540
+ "Options",
541
+ "undefined"
542
+ ]
543
+ }
544
+ },
545
+ {
546
+ "name": "polar",
547
+ "description": "When present, cartesian charts like line, spline, area and column are transformed\ninto the polar coordinate system.",
548
+ "value": {
549
+ "type": [
550
+ "boolean",
551
+ "null",
552
+ "undefined"
553
+ ]
554
+ }
555
+ }
556
+ ],
557
+ "events": [
558
+ {
559
+ "name": "chart-add-series",
560
+ "description": "Fired when a new series is added."
561
+ },
562
+ {
563
+ "name": "chart-after-export",
564
+ "description": "Fired after a chart is exported."
565
+ },
566
+ {
567
+ "name": "chart-after-print",
568
+ "description": "Fired after a chart is printed."
569
+ },
570
+ {
571
+ "name": "chart-before-export",
572
+ "description": "Fired before a chart is exported."
573
+ },
574
+ {
575
+ "name": "chart-before-print",
576
+ "description": "Fired before a chart is printed."
577
+ },
578
+ {
579
+ "name": "chart-click",
580
+ "description": "Fired when clicking on the plot background."
581
+ },
582
+ {
583
+ "name": "chart-drilldown",
584
+ "description": "Fired when drilldown point is clicked."
585
+ },
586
+ {
587
+ "name": "chart-drillup",
588
+ "description": "Fired when drilling up from a drilldown series."
589
+ },
590
+ {
591
+ "name": "chart-drillupall",
592
+ "description": "Fired after all the series has been drilled up if chart has multiple drilldown series."
593
+ },
594
+ {
595
+ "name": "chart-load",
596
+ "description": "Fired when the chart is finished loading."
597
+ },
598
+ {
599
+ "name": "chart-redraw",
600
+ "description": "Fired when the chart is redraw. Can be called after a `Chart.configuration.redraw()`\nor after an axis, series or point is modified with the `redraw` option set to `true`."
601
+ },
602
+ {
603
+ "name": "chart-selection",
604
+ "description": "Fired when an area of the chart has been selected."
605
+ },
606
+ {
607
+ "name": "point-click",
608
+ "description": "Fired when the point is clicked."
609
+ },
610
+ {
611
+ "name": "point-legend-item-click",
612
+ "description": "Fired when the legend item belonging to the point is clicked."
613
+ },
614
+ {
615
+ "name": "point-mouse-out",
616
+ "description": "Fired when the mouse leaves the area close to the point."
617
+ },
618
+ {
619
+ "name": "point-mouse-over",
620
+ "description": "Fired when the mouse enters the area close to the point."
621
+ },
622
+ {
623
+ "name": "point-remove",
624
+ "description": "Fired when the point is removed from the series."
625
+ },
626
+ {
627
+ "name": "point-select",
628
+ "description": "Fired when the point is selected either programmatically or by clicking on the point."
629
+ },
630
+ {
631
+ "name": "point-unselect",
632
+ "description": "Fired when the point is unselected either programmatically or by clicking on the point"
633
+ },
634
+ {
635
+ "name": "point-update",
636
+ "description": "Fired when the point is updated programmatically through `.updateConfiguration()` method."
637
+ },
638
+ {
639
+ "name": "series-after-animate",
640
+ "description": "Fired when the series has finished its initial animation."
641
+ },
642
+ {
643
+ "name": "series-checkbox-click",
644
+ "description": "Fired when the checkbox next to the series' name in the legend is clicked."
645
+ },
646
+ {
647
+ "name": "series-click",
648
+ "description": "Fired when the series is clicked."
649
+ },
650
+ {
651
+ "name": "series-hide",
652
+ "description": "Fired when the series is hidden after chart generation time."
653
+ },
654
+ {
655
+ "name": "series-legend-item-click",
656
+ "description": "Fired when the legend item belonging to the series is clicked."
657
+ },
658
+ {
659
+ "name": "series-mouse-out",
660
+ "description": "Fired when the mouses leave the graph."
661
+ },
662
+ {
663
+ "name": "series-mouse-over",
664
+ "description": "Fired when the mouse enters the graph."
665
+ },
666
+ {
667
+ "name": "series-show",
668
+ "description": "Fired when the series is show after chart generation time."
669
+ },
670
+ {
671
+ "name": "xaxes-extremes-set",
672
+ "description": "Fired when when the minimum and maximum is set for the x axis."
673
+ },
674
+ {
675
+ "name": "yaxes-extremes-set",
676
+ "description": "Fired when when the minimum and maximum is set for the y axis."
677
+ }
678
+ ]
679
+ }
680
+ }
681
+ ]
682
+ }
683
+ }
684
+ }
@@ -0,0 +1,433 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/web-types",
3
+ "name": "@vaadin/charts",
4
+ "version": "23.2.0-alpha4",
5
+ "description-markup": "markdown",
6
+ "framework": "lit",
7
+ "framework-config": {
8
+ "enable-when": {
9
+ "node-packages": [
10
+ "lit"
11
+ ]
12
+ }
13
+ },
14
+ "contributions": {
15
+ "html": {
16
+ "elements": [
17
+ {
18
+ "name": "vaadin-chart-series",
19
+ "description": "`<vaadin-chart-series>` is a custom element for creating series for Vaadin Charts.\n\n### Basic use\n\nTo use `<vaadin-chart-series>`, add it inside a `<vaadin-chart>` element:\n\n```html\n <vaadin-chart>\n <vaadin-chart-series></vaadin-chart-series>\n </vaadin-chart>\n```\n\n`<vaadin-chart-series>` accepts `values` as an array attribute, so you can add it to your element definition:\n\n```html\n <vaadin-chart-series values=\"[10,20,30,40,50]\"></vaadin-chart-series>\n```\n\nwhich will add a new line series, where each value will be a data point.\nLook for the Properties session to see all available attributes.\n\n### Dynamically adding and removing series\n\nYou are also able to add and remove series by using DOM API.\n\nTo create a new series, call `document.createElement('vaadin-chart-series')` and append it to your `<vaadin-chart>`:\n\n```js\n const chart = \\* a <vaadin-chart> reference *\\\n const newSeries = document.createElement('vaadin-chart-series');\n newSeries.values = [10,20,30,40,50];\n chart.appendChild(newSeries);\n```\n\nIn order to remove it, you should use the series to be removed as a reference for the `#removeChild()` call:\n\n```js\n const chart = \\* a <vaadin-chart> reference *\\\n const seriesToBeRemoved = \\* a <vaadin-chart-series> reference to remove*\\\n chart.removeChild(seriesToBeRemoved);\n```",
20
+ "extension": true,
21
+ "attributes": [
22
+ {
23
+ "name": ".values",
24
+ "description": "An array of data used by the series.\nFormat depends on the chart type and can be:\n - An array of numerical values `[y0, y1, y2, y3,...]`\n - An array of arrays with 2 values (`x`, `y`) `[ [x0, y0], [x1, y1], [x2, y2], ... ]`\n - An array of objects, each one describing one point `[ {x: x0, y: y0, name: 'Point0', color: '#FF0000'}, {...}, ...]`\n\n See more in [API Site](https://api.highcharts.com/highcharts/series)\n\nNote that you should always use [Polymer API](https://www.polymer-project.org/2.0/docs/devguide/model-data#array-mutation)\nto mutate the values array in order to make the component aware of the\nchange and be able to synchronize it.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": ".valueMin",
31
+ "description": "Value-axis minimum-value.\nSets the value to a series bound by 'unit' property.\nOtherwise sets the value to the first series.\nUndefined by default (determined from data).",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
36
+ {
37
+ "name": ".valueMax",
38
+ "description": "Value-axis maximum-value.\nSee the 'valueMin'",
39
+ "value": {
40
+ "kind": "expression"
41
+ }
42
+ },
43
+ {
44
+ "name": ".type",
45
+ "description": "A string with the type of the series.\nDefaults to `'line'` in case no type is set for the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type on `<vaadin-chart>`.",
46
+ "value": {
47
+ "kind": "expression"
48
+ }
49
+ },
50
+ {
51
+ "name": ".title",
52
+ "description": "The name of the series as shown in the legend, tooltip etc.",
53
+ "value": {
54
+ "kind": "expression"
55
+ }
56
+ },
57
+ {
58
+ "name": ".markers",
59
+ "description": "Shows/hides data-point markers for line-like series.\nAcceptable input are:\n - `shown`: markers are always visible\n - `hidden`: markers are always hidden\n - `auto`: markers are visible for widespread data and hidden, when data is dense *(default)*",
60
+ "value": {
61
+ "kind": "expression"
62
+ }
63
+ },
64
+ {
65
+ "name": ".unit",
66
+ "description": "Used to connect the series to an axis; if multiple series have the same “unit”, they will share axis.\nDisplayed as a title for the axis.\nIf no unit is defined, then series will be connected to the first axis.",
67
+ "value": {
68
+ "kind": "expression"
69
+ }
70
+ },
71
+ {
72
+ "name": ".stack",
73
+ "description": "Used to group series in a different stacks.\n\"stacking\" property should be specified either for each series or in plotOptions.\nIt is recommended to place series in a single stack, when they belong to the same yAxis.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ },
78
+ {
79
+ "name": ".neckPosition",
80
+ "description": "The height of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area height. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
81
+ "value": {
82
+ "kind": "expression"
83
+ }
84
+ },
85
+ {
86
+ "name": ".neckWidth",
87
+ "description": "The width of the neck, the lower part of the funnel.\nA number defines pixel width, a percentage string defines a percentage of the plot area width. Defaults to 30%.\nNote that this property only applies for \"funnel\" charts.",
88
+ "value": {
89
+ "kind": "expression"
90
+ }
91
+ },
92
+ {
93
+ "name": ".additionalOptions",
94
+ "description": "Represents additional JSON configuration.",
95
+ "value": {
96
+ "kind": "expression"
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ {
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\nUsing as a base the project created with in Quick Start and an `additionalOptions` in order to make RTL adjustments:\n\n```html\n <vaadin-chart title=\"۱- عنوان نمودار\" subtitle=\"۲- عنوان فرعی نمودار\"\n additional-options='{\"title\": {\"useHTML\": true}, \"tooltip\": {\"useHTML\": true}, \"subtitle\": {\"useHTML\": true},\n \"legend\": {\"rtl\": true}, \"yAxis\": [{\"id\": \"۴- مقادیر\", \"title\": {\"text\": \"۴- مقادیر\", \"useHTML\": true}}],\n \"xAxis\": {\"reversed\": true}}'>\n <vaadin-chart-series\n type= \"column\"\n title=\"۳- عنوان ردیف\"\n unit=\"۴- مقادیر\"\n values=\"[10,20,30]\">\n </vaadin-chart-series>\n </vaadin-chart>\n```\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.",
104
+ "extension": true,
105
+ "attributes": [
106
+ {
107
+ "name": "?noLegend",
108
+ "description": "Specifies whether to hide legend or show.\nLegend configuration can be set up via additionalOptions property",
109
+ "value": {
110
+ "kind": "expression"
111
+ }
112
+ },
113
+ {
114
+ "name": "?timeline",
115
+ "description": "Specifies whether the chart is a normal chart or a timeline chart.",
116
+ "value": {
117
+ "kind": "expression"
118
+ }
119
+ },
120
+ {
121
+ "name": "?tooltip",
122
+ "description": "Whether or not to show tooltip when hovering data points.",
123
+ "value": {
124
+ "kind": "expression"
125
+ }
126
+ },
127
+ {
128
+ "name": "?chart3d",
129
+ "description": "Specifies whether to show chart in 3 or in 2 dimensions.\nSome display angles are added by default to the \"chart.options3d\" (`{alpha: 15, beta: 15, depth: 50}`).\n3D display options can be modified via `additionalOptions`.\nThe thickness of a Pie chart can be set on `additionalOptions` through `plotOptions.pie.depth`.\n3D is supported by Bar, Column, Pie and Scatter3D charts.\nMore info available at [Highcharts](https://www.highcharts.com/docs/chart-concepts/3d-charts).",
130
+ "value": {
131
+ "kind": "expression"
132
+ }
133
+ },
134
+ {
135
+ "name": "?polar",
136
+ "description": "When present, cartesian charts like line, spline, area and column are transformed\ninto the polar coordinate system.",
137
+ "value": {
138
+ "kind": "expression"
139
+ }
140
+ },
141
+ {
142
+ "name": ".configuration",
143
+ "description": "Configuration object that exposes the JS Api to configure the chart.\n\nMost important methods are:\n- `addSeries (Object options, [Boolean redraw], [Mixed animation])`\n- `addAxis (Object options, [Boolean isX], [Boolean redraw], [Mixed animation])`\n- `setTitle (Object title, object subtitle, Boolean redraw)`\n\nMost important properties are:\n- `configuration.series`: An array of the chart's series. Detailed API for Series object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Series)\n- `configuration.xAxis`: An array of the chart's x axes. Detailed API for Axis object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Axis)\n- `configuration.yAxis`: An array of the chart's y axes. Detailed API for Axis object is\n available in [API Site](http://api.highcharts.com/class-reference/Highcharts.Axis)\n- `configuration.title`: The chart title.\n\nFor detailed documentation of available API check the [API site](http://api.highcharts.com/class-reference/classes.list)",
144
+ "value": {
145
+ "kind": "expression"
146
+ }
147
+ },
148
+ {
149
+ "name": ".categories",
150
+ "description": "If categories are present names are used instead of numbers for the category axis.\nThe format of categories can be an `Array` with a list of categories, such as `['2010', '2011', '2012']`\nor a mapping `Object`, like `{0:'1',9:'Target (10)', 15: 'Max'}`.",
151
+ "value": {
152
+ "kind": "expression"
153
+ }
154
+ },
155
+ {
156
+ "name": ".categoryMax",
157
+ "description": "Category-axis maximum value. Defaults to `undefined`.",
158
+ "value": {
159
+ "kind": "expression"
160
+ }
161
+ },
162
+ {
163
+ "name": ".categoryMin",
164
+ "description": "Category-axis minimum value. Defaults to `undefined`.",
165
+ "value": {
166
+ "kind": "expression"
167
+ }
168
+ },
169
+ {
170
+ "name": ".categoryPosition",
171
+ "description": "The position of the category axis. Acceptable values are `left`, `right`, `top` and `bottom`\nexcept for bar charts which only accept `left` and `right`.\nWith the default value, charts appear as though they have `category-position=\"bottom\"`\nexcept for bar charts that appear as though they have `category-position=\"left\"`.\n\nDefaults to `undefined`",
172
+ "value": {
173
+ "kind": "expression"
174
+ }
175
+ },
176
+ {
177
+ "name": ".stacking",
178
+ "description": "Specifies how series are stacked on top of each other.\nPossible values are null, \"normal\" or \"percent\".\nIf \"stack\" property is not defined on the vaadin-chart-series elements, then series will be put into\nthe default stack.",
179
+ "value": {
180
+ "kind": "expression"
181
+ }
182
+ },
183
+ {
184
+ "name": ".title",
185
+ "description": "Represents the title of the chart.",
186
+ "value": {
187
+ "kind": "expression"
188
+ }
189
+ },
190
+ {
191
+ "name": ".type",
192
+ "description": "Sets the default series type of the chart.\nNote that `'bar'`, `'gauge'` and `'solidgauge'` should be set as default series type.",
193
+ "value": {
194
+ "kind": "expression"
195
+ }
196
+ },
197
+ {
198
+ "name": ".subtitle",
199
+ "description": "Represents the subtitle of the chart.",
200
+ "value": {
201
+ "kind": "expression"
202
+ }
203
+ },
204
+ {
205
+ "name": ".emptyText",
206
+ "description": "Specifies the message displayed on a chart without displayable data.",
207
+ "value": {
208
+ "kind": "expression"
209
+ }
210
+ },
211
+ {
212
+ "name": ".additionalOptions",
213
+ "description": "Represents additional JSON configuration.",
214
+ "value": {
215
+ "kind": "expression"
216
+ }
217
+ },
218
+ {
219
+ "name": "@chart-add-series",
220
+ "description": "Fired when a new series is added.",
221
+ "value": {
222
+ "kind": "expression"
223
+ }
224
+ },
225
+ {
226
+ "name": "@chart-after-export",
227
+ "description": "Fired after a chart is exported.",
228
+ "value": {
229
+ "kind": "expression"
230
+ }
231
+ },
232
+ {
233
+ "name": "@chart-after-print",
234
+ "description": "Fired after a chart is printed.",
235
+ "value": {
236
+ "kind": "expression"
237
+ }
238
+ },
239
+ {
240
+ "name": "@chart-before-export",
241
+ "description": "Fired before a chart is exported.",
242
+ "value": {
243
+ "kind": "expression"
244
+ }
245
+ },
246
+ {
247
+ "name": "@chart-before-print",
248
+ "description": "Fired before a chart is printed.",
249
+ "value": {
250
+ "kind": "expression"
251
+ }
252
+ },
253
+ {
254
+ "name": "@chart-click",
255
+ "description": "Fired when clicking on the plot background.",
256
+ "value": {
257
+ "kind": "expression"
258
+ }
259
+ },
260
+ {
261
+ "name": "@chart-drilldown",
262
+ "description": "Fired when drilldown point is clicked.",
263
+ "value": {
264
+ "kind": "expression"
265
+ }
266
+ },
267
+ {
268
+ "name": "@chart-drillup",
269
+ "description": "Fired when drilling up from a drilldown series.",
270
+ "value": {
271
+ "kind": "expression"
272
+ }
273
+ },
274
+ {
275
+ "name": "@chart-drillupall",
276
+ "description": "Fired after all the series has been drilled up if chart has multiple drilldown series.",
277
+ "value": {
278
+ "kind": "expression"
279
+ }
280
+ },
281
+ {
282
+ "name": "@chart-load",
283
+ "description": "Fired when the chart is finished loading.",
284
+ "value": {
285
+ "kind": "expression"
286
+ }
287
+ },
288
+ {
289
+ "name": "@chart-redraw",
290
+ "description": "Fired when the chart is redraw. Can be called after a `Chart.configuration.redraw()`\nor after an axis, series or point is modified with the `redraw` option set to `true`.",
291
+ "value": {
292
+ "kind": "expression"
293
+ }
294
+ },
295
+ {
296
+ "name": "@chart-selection",
297
+ "description": "Fired when an area of the chart has been selected.",
298
+ "value": {
299
+ "kind": "expression"
300
+ }
301
+ },
302
+ {
303
+ "name": "@point-click",
304
+ "description": "Fired when the point is clicked.",
305
+ "value": {
306
+ "kind": "expression"
307
+ }
308
+ },
309
+ {
310
+ "name": "@point-legend-item-click",
311
+ "description": "Fired when the legend item belonging to the point is clicked.",
312
+ "value": {
313
+ "kind": "expression"
314
+ }
315
+ },
316
+ {
317
+ "name": "@point-mouse-out",
318
+ "description": "Fired when the mouse leaves the area close to the point.",
319
+ "value": {
320
+ "kind": "expression"
321
+ }
322
+ },
323
+ {
324
+ "name": "@point-mouse-over",
325
+ "description": "Fired when the mouse enters the area close to the point.",
326
+ "value": {
327
+ "kind": "expression"
328
+ }
329
+ },
330
+ {
331
+ "name": "@point-remove",
332
+ "description": "Fired when the point is removed from the series.",
333
+ "value": {
334
+ "kind": "expression"
335
+ }
336
+ },
337
+ {
338
+ "name": "@point-select",
339
+ "description": "Fired when the point is selected either programmatically or by clicking on the point.",
340
+ "value": {
341
+ "kind": "expression"
342
+ }
343
+ },
344
+ {
345
+ "name": "@point-unselect",
346
+ "description": "Fired when the point is unselected either programmatically or by clicking on the point",
347
+ "value": {
348
+ "kind": "expression"
349
+ }
350
+ },
351
+ {
352
+ "name": "@point-update",
353
+ "description": "Fired when the point is updated programmatically through `.updateConfiguration()` method.",
354
+ "value": {
355
+ "kind": "expression"
356
+ }
357
+ },
358
+ {
359
+ "name": "@series-after-animate",
360
+ "description": "Fired when the series has finished its initial animation.",
361
+ "value": {
362
+ "kind": "expression"
363
+ }
364
+ },
365
+ {
366
+ "name": "@series-checkbox-click",
367
+ "description": "Fired when the checkbox next to the series' name in the legend is clicked.",
368
+ "value": {
369
+ "kind": "expression"
370
+ }
371
+ },
372
+ {
373
+ "name": "@series-click",
374
+ "description": "Fired when the series is clicked.",
375
+ "value": {
376
+ "kind": "expression"
377
+ }
378
+ },
379
+ {
380
+ "name": "@series-hide",
381
+ "description": "Fired when the series is hidden after chart generation time.",
382
+ "value": {
383
+ "kind": "expression"
384
+ }
385
+ },
386
+ {
387
+ "name": "@series-legend-item-click",
388
+ "description": "Fired when the legend item belonging to the series is clicked.",
389
+ "value": {
390
+ "kind": "expression"
391
+ }
392
+ },
393
+ {
394
+ "name": "@series-mouse-out",
395
+ "description": "Fired when the mouses leave the graph.",
396
+ "value": {
397
+ "kind": "expression"
398
+ }
399
+ },
400
+ {
401
+ "name": "@series-mouse-over",
402
+ "description": "Fired when the mouse enters the graph.",
403
+ "value": {
404
+ "kind": "expression"
405
+ }
406
+ },
407
+ {
408
+ "name": "@series-show",
409
+ "description": "Fired when the series is show after chart generation time.",
410
+ "value": {
411
+ "kind": "expression"
412
+ }
413
+ },
414
+ {
415
+ "name": "@xaxes-extremes-set",
416
+ "description": "Fired when when the minimum and maximum is set for the x axis.",
417
+ "value": {
418
+ "kind": "expression"
419
+ }
420
+ },
421
+ {
422
+ "name": "@yaxes-extremes-set",
423
+ "description": "Fired when when the minimum and maximum is set for the y axis.",
424
+ "value": {
425
+ "kind": "expression"
426
+ }
427
+ }
428
+ ]
429
+ }
430
+ ]
431
+ }
432
+ }
433
+ }