├── .stylelintrc
├── screenshot.png
├── vaadin-chart-default-theme.html
├── demo
├── 404
│ └── 404.html
├── images
│ ├── favicon.ico
│ ├── empty-background.png
│ └── charts-logo.svg
├── .eslintrc.json
├── charts-demo.js
├── demos
│ ├── spline.html
│ ├── area-spline-range.html
│ ├── column-range.html
│ ├── bubble.html
│ ├── ohlc.html
│ ├── area-range.html
│ ├── pyramid.html
│ ├── candlestick.html
│ ├── funnel.html
│ ├── area-spline.html
│ ├── area.html
│ ├── polar.html
│ ├── line.html
│ ├── flags.html
│ ├── bar.html
│ ├── column.html
│ ├── spiderweb.html
│ ├── box-plot.html
│ ├── solid-gauge.html
│ ├── pie.html
│ ├── waterfall.html
│ ├── error-bar.html
│ ├── treemap.html
│ ├── heat-map.html
│ ├── windrose.html
│ ├── polygon.html
│ ├── gauge.html
│ ├── gauge-dual.html
│ └── scatter.html
├── demos.json
├── index.html
├── my-icons.html
├── common
│ ├── demo-area.html
│ ├── header-bar.html
│ ├── demo-snippet.html
│ ├── demo-styles.html
│ └── demo-plus-sources-area.html
├── chart-demo
│ └── chart-demo.html
├── charts-js-api.html
├── demo-menu.html
├── charts-js-json-api.html
└── data
│ ├── male-height-weight.json
│ ├── height-weight.json
│ ├── female-height-weight.json
│ └── aapl-date-price.json
├── .gitignore
├── vaadin-chart.html
├── polymer.json
├── test
├── visual
│ ├── screens
│ │ └── vaadin-charts
│ │ │ └── empty-chart
│ │ │ └── empty-chart
│ │ │ ├── edge.png
│ │ │ ├── ie.png
│ │ │ ├── chrome.png
│ │ │ └── firefox.png
│ ├── default.html
│ └── test.js
├── .eslintrc.json
├── index.html
├── test-suites.js
├── chart-in-rtl-test.html
├── empty-chart-test.html
├── element-api-chart-gauge-test.html
├── moving-chart-test.html
├── utils.js
├── theme-test.html
├── element-height-test.html
├── element-dom-api-test.html
├── element-api-chart-series-json-test.html
├── js-private-api-chart-test.html
├── chart-in-layout-test.html
├── element-json-merge-test.html
├── chart-in-grid-test.html
├── style-test.html
├── performance.html
├── js-api-chart-test.html
├── custom-property-test.html
├── element-api-chart-series-dom-repeat-test.html
├── exporting-test.html
├── element-events-test.html
├── charts-options-test.html
└── js-json-api-chart-test.html
├── .npmignore
├── .eslintrc.json
├── .github
├── ISSUE_TEMPLATE
│ └── config.yml
└── workflows
│ ├── visual-tests.yml.disabled
│ └── unit-tests.yml
├── chart-3d-stacking.js
├── chart-exporting.js
├── chart-deep-merger.js
├── vaadin-directory-description.md
├── .gemini.yml
├── magi-p3-post.js
├── index.html
├── package.json
├── bower.json
├── wct.conf.js
├── options-sanitizer.js
└── README.md
/.stylelintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "stylelint-config-vaadin"
3 | }
4 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/screenshot.png
--------------------------------------------------------------------------------
/vaadin-chart-default-theme.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/demo/images/favicon.ico
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bower_components
2 | node_modules
3 | yarn.lock
4 | build
5 | .DS_Store
6 | .idea/
7 | analysis.json
8 |
--------------------------------------------------------------------------------
/demo/images/empty-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/demo/images/empty-background.png
--------------------------------------------------------------------------------
/vaadin-chart.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/polymer.json:
--------------------------------------------------------------------------------
1 | {
2 | "lint": {
3 | "warningsToIgnore": [
4 | "multiple-global-declarations"
5 | ]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/demo/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | },
4 | "globals": {
5 | "ElementDemo": false,
6 | "DemoReadyEventEmitter": false,
7 | "ChartsDemo": false
8 | }
9 | }
--------------------------------------------------------------------------------
/test/visual/screens/vaadin-charts/empty-chart/empty-chart/edge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/test/visual/screens/vaadin-charts/empty-chart/empty-chart/edge.png
--------------------------------------------------------------------------------
/test/visual/screens/vaadin-charts/empty-chart/empty-chart/ie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/test/visual/screens/vaadin-charts/empty-chart/empty-chart/ie.png
--------------------------------------------------------------------------------
/test/visual/screens/vaadin-charts/empty-chart/empty-chart/chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/test/visual/screens/vaadin-charts/empty-chart/empty-chart/chrome.png
--------------------------------------------------------------------------------
/test/visual/screens/vaadin-charts/empty-chart/empty-chart/firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vaadin/vaadin-charts/HEAD/test/visual/screens/vaadin-charts/empty-chart/empty-chart/firefox.png
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | bower_components
2 | .bowerrc
3 | .eslintrc.json
4 | .stylelintrc
5 | .travis.deploy.sh
6 | .travis.yml
7 | .gemini.yml
8 | .gemini-ie.yml
9 | .gemini-ff.yml
10 | deploy_rsa.enc
11 | wct.conf.js
12 | analysis.json
13 | bower.json
14 | gulpfile.js
15 | index.html
16 | screenshot.png
17 |
--------------------------------------------------------------------------------
/demo/charts-demo.js:
--------------------------------------------------------------------------------
1 | window.ChartsDemo = superClass => {
2 | return class extends superClass {
3 | static get properties() {
4 | return {
5 | };
6 | }
7 | };
8 | };
9 |
10 | window.addEventListener('WebComponentsReady', () => {
11 | document.body.removeAttribute('unresolved');
12 | });
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "vaadin",
3 | "env": {
4 | "browser": true,
5 | "node": true,
6 | "es6": true
7 | },
8 | "plugins": [
9 | "html"
10 | ],
11 | "globals": {
12 | "Polymer": false,
13 | "Vaadin": false,
14 | "Highcharts": false,
15 | "ChartDeepMerger": false
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/test/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "globals": {
3 | "WCT": false,
4 | "HTMLImports": false,
5 | "describe": false,
6 | "xdescribe": false,
7 | "beforeEach": false,
8 | "before": false,
9 | "fixture": false,
10 | "it": false,
11 | "expect": false,
12 | "gemini": false,
13 | "sinon": false,
14 | "onChartRender": false
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/test/visual/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: "Web Components: Bugs and Feature Requests"
4 | url: https://github.com/vaadin/web-components/issues/new/choose
5 | about: Please report issues related to the TypeScript and HTML API of Vaadin components here.
6 | - name: "Flow Components: Bugs and Feature Requests"
7 | url: https://github.com/vaadin/flow-components/issues/new/choose
8 | about: Please report issues related to the Java API of Vaadin components here.
9 |
--------------------------------------------------------------------------------
/chart-3d-stacking.js:
--------------------------------------------------------------------------------
1 | // Workaround for https://github.com/highcharts/highcharts/issues/8417
2 | (function() {
3 | if (Highcharts) {
4 | Highcharts.wrap(
5 | Highcharts.seriesTypes.column.prototype,
6 | 'plotGroup',
7 | function(proceed, prop, name, visibility, zIndex, parent) {
8 | if (this.chart.is3d() && this[prop]) {
9 | delete this[prop];
10 | }
11 | return proceed.apply(this, Array.prototype.slice.call(arguments, 1));
12 | }
13 | );
14 | }
15 | }());
16 |
--------------------------------------------------------------------------------
/demo/demos/spline.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | vaadin-chart tests
8 |
9 |
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/chart-exporting.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-invalid-this */
2 | // Workaround for https://github.com/vaadin/vaadin-charts/issues/389
3 | (function() {
4 | if (Highcharts) {
5 | ['exportChart', 'exportChartLocal', 'getSVG'].forEach(methodName => {
6 | Highcharts.wrap(
7 | Highcharts.Chart.prototype,
8 | methodName,
9 | function(proceed) {
10 | Highcharts.fireEvent(this, 'beforeExport');
11 | const result = proceed.apply(this, Array.prototype.slice.call(arguments, 1));
12 | Highcharts.fireEvent(this, 'afterExport');
13 | return result;
14 | }
15 | );
16 | });
17 | }
18 | }());
19 |
--------------------------------------------------------------------------------
/demo/demos/area-spline-range.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test/visual/test.js:
--------------------------------------------------------------------------------
1 | gemini.suite('vaadin-charts', function(rootSuite) {
2 | function wait(actions, find) {
3 | actions.wait(7000);
4 | }
5 |
6 | function goToAboutBlank(actions, find) {
7 | // Firefox stops responding on socket after a test, workaround:
8 | return actions.executeJS(function(window) {
9 | window.location.href = 'about:blank'; // just go away, please!
10 | });
11 | }
12 |
13 | rootSuite
14 | .before(wait)
15 | .after(goToAboutBlank);
16 |
17 | gemini.suite('empty-chart', function(suite) {
18 | suite
19 | .setUrl('/default.html')
20 | .setCaptureElements('vaadin-chart')
21 | .capture('empty-chart');
22 | });
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/demo/demos/column-range.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/demo/demos/bubble.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/demo/demos/ohlc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/demo/demos/area-range.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/test/test-suites.js:
--------------------------------------------------------------------------------
1 | window.VaadinChartsSuites = [
2 | 'chart-in-grid-test.html',
3 | 'chart-in-layout-test.html',
4 | 'custom-property-test.html',
5 | 'empty-chart-test.html',
6 | 'element-api-chart-test.html',
7 | 'element-api-chart-gauge-test.html',
8 | 'element-api-chart-series-dom-repeat-test.html',
9 | 'element-api-chart-series-test.html',
10 | 'element-api-chart-series-json-test.html',
11 | 'element-dom-api-test.html',
12 | 'element-height-test.html',
13 | 'element-events-test.html',
14 | // 'exporting-test.html',
15 | 'js-api-chart-test.html',
16 | 'js-json-api-chart-test.html',
17 | 'js-private-api-chart-test.html',
18 | 'style-test.html',
19 | 'element-json-merge-test.html',
20 | 'theme-test.html',
21 | 'moving-chart-test.html',
22 | 'chart-in-rtl-test.html',
23 | 'performance.html',
24 | 'charts-options-test.html',
25 | ];
26 |
--------------------------------------------------------------------------------
/demo/demos/pyramid.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/demo/demos/candlestick.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/demo/demos.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Vaadin Charts",
3 | "pages": [
4 | {
5 | "name": "High-level Element API",
6 | "url": "charts-high-level-element-api",
7 | "src": "charts-high-level-element-api.html",
8 | "meta": {
9 | "title": "vaadin-charts High-level Element API",
10 | "description": "",
11 | "image": ""
12 | }
13 | }
14 | ,
15 | {
16 | "name": "JS API",
17 | "url": "charts-js-api",
18 | "src": "charts-js-api.html",
19 | "meta": {
20 | "title": "vaadin-charts JS API",
21 | "description": "",
22 | "image": ""
23 | }
24 | }
25 | ,
26 | {
27 | "name": "JS JSON API",
28 | "url": "charts-js-json-api",
29 | "src": "charts-js-json-api.html",
30 | "meta": {
31 | "title": "vaadin-charts JS JSON API",
32 | "description": "",
33 | "image": ""
34 | }
35 | }
36 | ]
37 | }
--------------------------------------------------------------------------------
/chart-deep-merger.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @namespace Vaadin
3 | */
4 | window.Vaadin = window.Vaadin || {};
5 | /**
6 | * @namespace Vaadin.Charts
7 | */
8 | Vaadin.Charts = Vaadin.Charts || {};
9 | /** @private */
10 | // eslint-disable-next-line no-unused-vars
11 | Vaadin.Charts.ChartDeepMerger = (() => class {
12 |
13 | static __isObject(item) {
14 | return (item && typeof item === 'object' && !Array.isArray(item));
15 | }
16 |
17 | static __deepMerge(target, source) {
18 | if (this.__isObject(source) && this.__isObject(target)) {
19 | for (const key in source) {
20 | if (this.__isObject(source[key])) {
21 | if (!target[key]) {
22 | Object.assign(target, {[key]: {}});
23 | }
24 |
25 | this.__deepMerge(target[key], source[key]);
26 | } else {
27 | Object.assign(target, {[key]: source[key]});
28 | }
29 | }
30 | }
31 |
32 | return target;
33 | }
34 | })();
35 |
--------------------------------------------------------------------------------
/demo/demos/funnel.html:
--------------------------------------------------------------------------------
1 |
2 |
21 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/demo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | vaadin-charts Examples
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/vaadin-directory-description.md:
--------------------------------------------------------------------------------
1 | [](https://vaadin.com/directory/component/vaadinvaadin-charts)
2 | [](https://vaadin.com/directory/component/vaadinvaadin-charts)
3 |
4 | # <vaadin-charts>
5 |
6 | [Vaadin Charts](https://vaadin.com/charts) is a Web Component for creating high quality charts, part of [Vaadin components](https://vaadin.com/components).
7 |
8 | [
](https://vaadin.com/components/vaadin-charts)
9 |
10 |
11 | ### Example Usage
12 | ```html
13 |
14 |
21 |
22 |
23 | ```
24 |
--------------------------------------------------------------------------------
/demo/demos/area-spline.html:
--------------------------------------------------------------------------------
1 |
2 |
25 |
27 |
28 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/demo/demos/area.html:
--------------------------------------------------------------------------------
1 |
2 |
9 |
11 |
12 |
14 |
15 |
17 |
18 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/demo/demos/polar.html:
--------------------------------------------------------------------------------
1 |
2 |
26 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/.gemini.yml:
--------------------------------------------------------------------------------
1 | rootUrl: http://localhost:8080/components/vaadin-charts/test/visual/
2 | gridUrl: http://localhost:4444/wd/hub
3 | screenshotsDir: ./test/visual/screens
4 |
5 | system:
6 | plugins:
7 | polyserve:
8 | port: 8080
9 | sauce: true
10 |
11 | browsers:
12 | chrome:
13 | desiredCapabilities:
14 | browserName: "chrome"
15 | version: "67.0"
16 | platform: "Windows 10"
17 |
18 | edge:
19 | desiredCapabilities:
20 | browserName: "microsoftedge"
21 | version: "15"
22 | platform: "Windows 10"
23 |
24 |
25 | # The following setups don't currently work due to Selenium SafariDriver issue
26 | # https://github.com/vaadin/vaadin-element-skeleton/issues/19
27 | #
28 | # safari:
29 | # desiredCapabilities:
30 | # browserName: "safari"
31 | # version: "10.0"
32 | # platform: "OS X 10.11"
33 | #
34 | # iphone:
35 | # desiredCapabilities:
36 | # browserName: "iphone"
37 | # version: "9.2"
38 | # platform: "OS X 10.11"
39 | #
40 | # ipad:
41 | # desiredCapabilities:
42 | # browserName: "ipad"
43 | # version: "9.2"
44 | # platform: "OS X 10.11"
45 |
--------------------------------------------------------------------------------
/magi-p3-post.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | files: [
3 | 'src/vaadin-chart.js',
4 | 'theme/vaadin-chart-default-theme.js',
5 | 'test/exporting-test.html'
6 | ],
7 |
8 | from: [
9 | `window.ShadyCSS.nativeShadow`,
10 |
11 | /window.ShadyCSS.ScopingShim/g,
12 |
13 | 'import \'highcharts/js/es-modules/masters/highstock.src.js\';',
14 |
15 | '/*\n' +
16 | ' FIXME(polymer-modulizer): the above comments were extracted\n' +
17 | ' from HTML and may be out of place here. Review them and\n' +
18 | ' then delete this comment!\n' +
19 | '*/',
20 |
21 | /import '..\/vaadin-chart.js';/g,
22 |
23 | 'import \'dompurify/dist/purify.min.js\';'
24 | ],
25 |
26 | to: [
27 | `nativeShadow`,
28 |
29 | `ScopingShim.prototype`,
30 |
31 | `import { nativeShadow } from '@webcomponents/shadycss/src/style-settings.js';
32 |
33 | import ScopingShim from '@webcomponents/shadycss/src/scoping-shim.js';
34 |
35 | import Highcharts from 'highcharts/js/es-modules/masters/highstock.src.js';`,
36 |
37 | ``,
38 |
39 | `import Highcharts from 'highcharts/js/es-modules/masters/highstock.src.js';
40 | import '../vaadin-chart.js';`,
41 |
42 | `import DOMPurify from 'dompurify';`
43 | ]
44 | };
45 |
--------------------------------------------------------------------------------
/demo/demos/line.html:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/demo/demos/flags.html:
--------------------------------------------------------------------------------
1 |
2 |
11 |
13 |
14 |
17 |
18 |
31 |
32 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/test/chart-in-rtl-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
40 |
41 |
--------------------------------------------------------------------------------
/demo/demos/bar.html:
--------------------------------------------------------------------------------
1 |
2 |
25 |
27 |
28 |
30 |
31 |
33 |
34 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/demo/demos/column.html:
--------------------------------------------------------------------------------
1 |
2 |
21 |
23 |
24 |
26 |
27 |
29 |
30 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/test/empty-chart-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
47 |
48 |
--------------------------------------------------------------------------------
/demo/demos/spiderweb.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
35 |
38 |
41 |
42 |
--------------------------------------------------------------------------------
/demo/my-icons.html:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
22 |
--------------------------------------------------------------------------------
/demo/404/404.html:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
26 |
27 |
31 |
34 |
35 |
36 |
45 |
46 |
--------------------------------------------------------------------------------
/.github/workflows/visual-tests.yml.disabled:
--------------------------------------------------------------------------------
1 | name: Visual Tests
2 |
3 | # all pull requests
4 | on: pull_request
5 |
6 | jobs:
7 | visual-tests:
8 | name: Polymer 2 on SauceLabs
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Set up Node 12.x
12 | uses: actions/setup-node@v4
13 | with:
14 | node-version: 12.x
15 |
16 | - name: Check out the source code
17 | uses: actions/checkout@v4
18 |
19 | - name: Install latest npm
20 | # magi-cli 1.0 requires npm 7 or higher
21 | run: "npm install -g npm@8"
22 |
23 | - name: Install global npm dependencies
24 | # bower is needed to run 'bower install'
25 | # gemini is needed to run the visual tests step
26 | run: "npm install --quiet --no-progress --global bower"
27 |
28 | - name: Install project npm dependencies
29 | run: "npm ci"
30 |
31 | - name: Install project Bower dependencies
32 | run: "bower install --quiet"
33 |
34 | - name: Run visual tests on SauceLabs
35 | run: "npm run test:visual"
36 | env:
37 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
38 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
39 |
40 | - name: Publish the Visual Tests failures report as an Artifact for this Workflow run
41 | if: ${{ failure() }}
42 | uses: actions/upload-artifact@v4
43 | with:
44 | name: Visual tests failures report
45 | path: gemini-report/
46 |
--------------------------------------------------------------------------------
/demo/images/charts-logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/demos/box-plot.html:
--------------------------------------------------------------------------------
1 |
2 |
26 |
40 |
41 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/demo/demos/solid-gauge.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
40 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Vaadin Charts for Frontend
10 |
11 |
12 |
13 |
14 |
27 |
28 |
29 |
30 |
31 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/demo/common/demo-area.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
20 |
21 |
22 |
59 |
60 |
--------------------------------------------------------------------------------
/test/element-api-chart-gauge-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
46 |
47 |
--------------------------------------------------------------------------------
/test/moving-chart-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
49 |
50 |
--------------------------------------------------------------------------------
/demo/demos/pie.html:
--------------------------------------------------------------------------------
1 |
2 |
21 |
63 |
64 |
--------------------------------------------------------------------------------
/demo/demos/waterfall.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
25 |
26 |
27 |
42 |
55 |
56 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@vaadin/vaadin-charts",
3 | "version": "6.3.8",
4 | "description": "vaadin-charts",
5 | "main": "vaadin-chart.html",
6 | "repository": "vaadin/vaadin-charts",
7 | "keywords": [
8 | "Vaadin",
9 | "vaadin-charts",
10 | "web-components",
11 | "web-component",
12 | "polymer"
13 | ],
14 | "author": "Vaadin Ltd",
15 | "license": "SEE LICENSE IN LICENSE.txt",
16 | "cvdlName": "vaadin-chart",
17 | "bugs": {
18 | "url": "https://github.com/vaadin/vaadin-charts/issues"
19 | },
20 | "homepage": "https://vaadin.com/charts",
21 | "files": [
22 | "vaadin-*.js",
23 | "src",
24 | "theme"
25 | ],
26 | "husky": {
27 | "hooks": {
28 | "pre-commit": "npm run lint"
29 | }
30 | },
31 | "scripts": {
32 | "test": "wct",
33 | "test:visual": "gemini test --reporter html --reporter flat test/visual",
34 | "check": "npm-run-all --parallel check:*",
35 | "check:bower": "magi check-bower",
36 | "check:version": "magi check-version",
37 | "lint": "npm-run-all --parallel lint:*",
38 | "lint:css": "stylelint *.html src/*.html demo/*.html theme/**/*.html test/*html",
39 | "lint:html": "eslint *.html src demo test --ext .html",
40 | "lint:js": "eslint *.js test",
41 | "lint:polymer": "polymer lint --rules polymer-2 --input ./src/*.html ./theme/**/*.html",
42 | "prestart": "polymer analyze vaadin-* > analysis.json",
43 | "start": "polymer serve --port 3000 --open",
44 | "preversion": "magi update-version"
45 | },
46 | "devDependencies": {
47 | "@vaadin/vaadin-component-dev-dependencies": "^3.2.0"
48 | },
49 | "overrides": {
50 | "wct-sauce": {
51 | "sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5"
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/demo/demos/error-bar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
30 |
38 |
39 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vaadin-charts",
3 | "homepage": "https://vaadin.com/charts",
4 | "authors": [
5 | "Vaadin Ltd"
6 | ],
7 | "description": "vaadin-charts",
8 | "main": [
9 | "vaadin-chart.html",
10 | "vaadin-chart-series.html"
11 | ],
12 | "keywords": [
13 | "Vaadin",
14 | "vaadin-chart",
15 | "charts",
16 | "highcharts",
17 | "web-components",
18 | "web-component",
19 | "polymer"
20 | ],
21 | "license": "https://raw.githubusercontent.com/vaadin/vaadin-charts/master/LICENSE.txt",
22 | "repository": {
23 | "type": "git",
24 | "url": "git@github.com:vaadin/vaadin-charts.git"
25 | },
26 | "ignore": [
27 | "**/.*",
28 | "node_modules",
29 | "bower_components",
30 | "test",
31 | "package-lock.json",
32 | "wct.conf.js"
33 | ],
34 | "dependencies": {
35 | "highcharts": "6.1.4",
36 | "polymer": "^2.0.0",
37 | "DOMPurify": "2.5.7",
38 | "vaadin-themable-mixin": "vaadin/vaadin-themable-mixin#^1.5.2",
39 | "vaadin-license-checker": "vaadin/license-checker#^2.1.0",
40 | "vaadin-element-mixin": "vaadin/vaadin-element-mixin#^2.3.2"
41 | },
42 | "devDependencies": {
43 | "iron-component-page": "^3.0.0",
44 | "webcomponentsjs": "1.2.4",
45 | "web-component-tester": "^6.1.5",
46 | "vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.1.0",
47 | "vaadin-grid": "vaadin/vaadin-grid#^5.6.0",
48 | "app-route": "PolymerElements/app-route#^2.0.0",
49 | "app-menu": "^2.0.0",
50 | "iron-icon": "^2.1.0",
51 | "iron-icons": "^2.0.0",
52 | "iron-iconset-svg": "^2.1.0",
53 | "iron-pages": "2.0.0",
54 | "paper-button": "2.0.0",
55 | "test-fixture": "^3.0.0",
56 | "vaadin-split-layout": "^4.2.0",
57 | "vaadin-icons": "^4.2.0",
58 | "vaadin-button": "^2.3.0-alpha1",
59 | "vaadin-ordered-layout": "^1.3.0"
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/demo/demos/treemap.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
72 |
73 |
--------------------------------------------------------------------------------
/test/utils.js:
--------------------------------------------------------------------------------
1 | window.onChartRender = (function() {
2 | const evt = 'test-load';
3 |
4 | function mergeAdditionalOptions(vaadinChartEl) {
5 | const opts = vaadinChartEl.additionalOptions || {};
6 |
7 | const chart = opts.chart || {};
8 | const events = chart.events || {};
9 | const prevOnRender = events.render || (() => {
10 | });
11 |
12 | const plotOptions = opts.plotOptions || {};
13 | const series = plotOptions.series || {};
14 |
15 | const drilldown = opts.drilldown || {};
16 |
17 | const newEvents = Object.assign(events, {
18 | render: () => {
19 | prevOnRender();
20 | vaadinChartEl.dispatchEvent(new CustomEvent(evt));
21 | },
22 | });
23 |
24 | const newChart = Object.assign(chart, {
25 | animation: false,
26 | events: newEvents
27 | });
28 |
29 | const newSeries = Object.assign(series, {
30 | animation: {
31 | duration: 0
32 | }
33 | });
34 |
35 | const newPlotOptions = Object.assign(plotOptions, {
36 | series: newSeries,
37 | });
38 |
39 | const newDrilldown = Object.assign(drilldown, {
40 | animation: {
41 | duration: 0
42 | }
43 | });
44 |
45 | vaadinChartEl.additionalOptions = Object.assign(opts, {
46 | chart: newChart,
47 | plotOptions: newPlotOptions,
48 | drilldown: newDrilldown
49 | });
50 | }
51 |
52 | return function onChartRender(vaadinChartEl, cb, wait) {
53 | mergeAdditionalOptions(vaadinChartEl);
54 |
55 | let timeoutId = null;
56 |
57 | vaadinChartEl.addEventListener(evt, () => {
58 | clearTimeout(timeoutId);
59 | timeoutId = setTimeout(() => {
60 | setTimeout(cb, 0);
61 | }, wait || 50);
62 | }, {once: true});
63 |
64 | if (vaadinChartEl.configuration && vaadinChartEl.configuration.hasRendered) {
65 | vaadinChartEl.dispatchEvent(new CustomEvent(evt));
66 | }
67 | };
68 | }());
69 |
--------------------------------------------------------------------------------
/demo/chart-demo/chart-demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
57 |
58 |
--------------------------------------------------------------------------------
/wct.conf.js:
--------------------------------------------------------------------------------
1 | var envIndex = process.argv.indexOf('--env') + 1;
2 | var env = envIndex ? process.argv[envIndex] : undefined;
3 |
4 | // workaround for Android 7+ blocking all HTTP traffic
5 | // see https://wiki.saucelabs.com/display/DOCS/Known+Issues
6 | // add it to your own local `/etc/hosts` to run SauceLabs tests locally
7 | var tunneledLocalhost = 'localhost-for-saucelabs';
8 |
9 | module.exports = {
10 | testTimeout: 360 * 1000,
11 | verbose: false,
12 | plugins: {
13 | local: {
14 | browserOptions: {
15 | chrome: [
16 | 'headless',
17 | 'disable-gpu',
18 | 'no-sandbox'
19 | ]
20 | }
21 | },
22 | },
23 |
24 | registerHooks: function(context) {
25 | const testBrowsers = [
26 | {
27 | deviceName: 'Android GoogleAPI Emulator',
28 | platformName: 'Android',
29 | platformVersion: '11.0',
30 | browserName: 'Chrome',
31 | },
32 | 'iOS Simulator/iphone@10.3', // should be 9.x, but SauceLabs does not provide that
33 | 'macOS 11/safari@latest',
34 | 'Windows 10/microsoftedge@latest',
35 | 'Windows 10/internet explorer@11',
36 | 'Windows 10/chrome@latest',
37 | 'Windows 10/firefox@latest',
38 | ];
39 |
40 | if (env === 'saucelabs') {
41 | context.options.webserver = context.options.webserver || {};
42 | context.options.webserver.hostname = tunneledLocalhost;
43 | context.options.plugins.sauce.tunnelOptions = {
44 | tunnelDomains: tunneledLocalhost
45 | };
46 |
47 | context.options.plugins.sauce.browsers = testBrowsers;
48 | }
49 |
50 | // Map legacy tunnel-identifier option to new tunnel-name option
51 | context.hookLate('prepare', (done) => {
52 | context.options.activeBrowsers.forEach((browser) => {
53 | browser['tunnel-name'] = browser['tunnel-identifier'];
54 | delete browser['tunnel-identifier'];
55 | });
56 | done();
57 | });
58 | }
59 | };
60 |
--------------------------------------------------------------------------------
/demo/demos/heat-map.html:
--------------------------------------------------------------------------------
1 |
2 |
33 |
55 |
56 |
--------------------------------------------------------------------------------
/demo/demos/windrose.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
21 |
22 |
24 |
25 |
27 |
28 |
30 |
31 |
33 |
34 |
36 |
37 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/test/theme-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
56 |
57 |
--------------------------------------------------------------------------------
/test/element-height-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
64 |
65 |
--------------------------------------------------------------------------------
/demo/demos/polygon.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
36 |
45 |
46 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/demo/common/header-bar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
86 |
--------------------------------------------------------------------------------
/demo/charts-js-api.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | Using configuration property and JS API
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
45 |
46 |
47 |
48 |
49 |
50 |
58 |
--------------------------------------------------------------------------------
/test/element-dom-api-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
68 |
69 |
--------------------------------------------------------------------------------
/test/element-api-chart-series-json-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
38 |
39 |
40 |
41 |
74 |
75 |
--------------------------------------------------------------------------------
/test/js-private-api-chart-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
70 |
71 |
--------------------------------------------------------------------------------
/test/chart-in-layout-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
74 |
75 |
--------------------------------------------------------------------------------
/test/element-json-merge-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
88 |
89 |
--------------------------------------------------------------------------------
/demo/demos/gauge.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
39 |
40 |
41 |
81 |
87 |
88 |
--------------------------------------------------------------------------------
/demo/demos/gauge-dual.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
31 |
32 |
33 |
72 |
81 |
82 |
--------------------------------------------------------------------------------
/.github/workflows/unit-tests.yml:
--------------------------------------------------------------------------------
1 | name: Unit Tests
2 |
3 | # all pull requests
4 | on: pull_request
5 |
6 | jobs:
7 | # Running local tests is disabled due to outdated dependencies
8 | # see https://github.com/vaadin/components-team-tasks/issues/628
9 | # unit-tests-p2:
10 | # name: Polymer 2 on the CI agent
11 | # runs-on: ubuntu-latest
12 | # steps:
13 | # - name: Set up Node 16.x
14 | # uses: actions/setup-node@v4
15 | # with:
16 | # node-version: 16.x
17 | #
18 | # - name: Check out the source code
19 | # uses: actions/checkout@v2
20 | #
21 | # - name: Install global npm dependencies
22 | # # bower is needed to run 'bower install'
23 | # # polymer-cli is needed to run the lint step
24 | # run: "npm install --quiet --no-progress --global bower polymer-cli"
25 | #
26 | # - name: Install project npm dependencies
27 | # run: "npm ci"
28 | #
29 | # - name: Install project Bower dependencies
30 | # run: "bower install --quiet"
31 | #
32 | # - name: Run automated magi-cli checks
33 | # run: "npm run check"
34 | #
35 | # - name: Run a linter
36 | # run: "npm run lint"
37 | #
38 | # # the full set of environments is tested with Polymer 3 below
39 | # - name: Run unit tests locally (in the VM instance running this job)
40 | # run: "xvfb-run -s '-screen 0 1024x768x24' npm test"
41 |
42 | unit-tests-p3:
43 | name: Polymer 3 on SauceLabs
44 | runs-on: ubuntu-latest
45 | steps:
46 | - name: Set up Node 16.x
47 | uses: actions/setup-node@v4
48 | with:
49 | node-version: 16.x
50 |
51 | - name: Check out the (Polymer 2) source code
52 | uses: actions/checkout@v2
53 |
54 | - name: Install global npm dependencies
55 | # bower and polymer-modulizer are needed to run the Polymer 3 conversion step
56 | run: "npm install --quiet --no-progress --global bower magi-cli polymer-modulizer"
57 |
58 | - name: Convert the source code to Polymer 3
59 | run: |
60 | git config --local user.email "github-actions[bot]@users.noreply.github.com"
61 | git config --local user.name "github-actions[bot]"
62 | magi p3-convert --out . --import-style=name
63 |
64 | # workaround for running tests on Android on SauceLabs (see wct.conf.js)
65 | - name: Add 'localhost-for-saucelabs' to /etc/hosts
66 | run: echo "127.0.0.1 localhost-for-saucelabs" | sudo tee -a /etc/hosts
67 |
68 | - name: Run unit tests on SauceLabs
69 | run: "npm test -- --env saucelabs"
70 | env:
71 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
72 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
73 |
--------------------------------------------------------------------------------
/test/chart-in-grid-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
52 |
53 |
54 |
55 |
83 |
84 |
--------------------------------------------------------------------------------
/demo/demos/scatter.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
25 |
26 |
27 |
60 |
66 |
67 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/demo/common/demo-snippet.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
30 |
31 |
34 |
35 |
36 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/test/style-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
51 |
52 |
53 |
54 |
80 |
81 |
--------------------------------------------------------------------------------
/test/performance.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
110 |
111 |
--------------------------------------------------------------------------------
/options-sanitizer.js:
--------------------------------------------------------------------------------
1 | window.sanitizeHighchartsAPI = (Highcharts, DOMPurify) => {
2 | var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
3 | if (isIE11) {
4 | DOMPurify.setConfig({
5 | FORCE_BODY: true,
6 | });
7 | }
8 | // This function will recursively sanitize all strings in the options object
9 | // Source: https://jsfiddle.net/highcharts/zd3wcm5L/
10 | function stripHTMLRecurse(obj) {
11 | if (obj === null || obj === undefined) {
12 | return obj;
13 | }
14 |
15 | if (typeof obj === 'string') {
16 | return DOMPurify.sanitize(obj);
17 | }
18 |
19 | if (typeof obj !== 'object') {
20 | return obj;
21 | }
22 |
23 | Object.keys(obj).forEach((key) => {
24 | if (typeof obj[key] === 'string') {
25 | obj[key] = DOMPurify.sanitize(obj[key]);
26 | } else if (Array.isArray(obj[key])) {
27 | obj[key].forEach((item, i) => {
28 | obj[key][i] = stripHTMLRecurse(item);
29 | });
30 | } else if (typeof obj[key] === 'object') {
31 | obj[key] = stripHTMLRecurse(obj[key]);
32 | }
33 | });
34 | return obj;
35 | }
36 |
37 | const update = Highcharts.Chart.prototype.update;
38 | Highcharts.Chart.prototype.update = function(
39 | options,
40 | redraw,
41 | oneToOne,
42 | animation
43 | ) {
44 | options = stripHTMLRecurse(options);
45 | return update.call(this, options, redraw, oneToOne, animation);
46 | };
47 |
48 | const newChart = Highcharts.chart;
49 | Highcharts.chart = function(renderTo, options, callback) {
50 | options = stripHTMLRecurse(options);
51 | return newChart.call(this, renderTo, options, callback);
52 | };
53 |
54 | const newHighstock = Highcharts.stockChart;
55 | Highcharts.stockChart = function(renderTo, options, callback) {
56 | options = stripHTMLRecurse(options);
57 | return newHighstock.call(this, renderTo, options, callback);
58 | };
59 |
60 | const axisUpdate = Highcharts.Axis.prototype.update;
61 | Highcharts.Axis.prototype.update = function(options, redraw) {
62 | options = stripHTMLRecurse(options);
63 | return axisUpdate.call(this, options, redraw);
64 | };
65 |
66 | const seriesUpdate = Highcharts.Series.prototype.update;
67 | Highcharts.Series.prototype.update = function(options, redraw) {
68 | options = stripHTMLRecurse(options);
69 | return seriesUpdate.call(this, options, redraw);
70 | };
71 |
72 | const legendUpdate = Highcharts.Legend.prototype.update;
73 | Highcharts.Legend.prototype.update = function(options, redraw) {
74 | options = stripHTMLRecurse(options);
75 | return legendUpdate.call(this, options, redraw);
76 | };
77 |
78 | const addCredits = Highcharts.Chart.prototype.addCredits;
79 | Highcharts.Chart.prototype.addCredits = function(credits) {
80 | credits = stripHTMLRecurse(credits);
81 | return addCredits.call(this, credits);
82 | };
83 |
84 | const setTitle = Highcharts.Chart.prototype.setTitle;
85 | Highcharts.Chart.prototype.setTitle = function(
86 | titleOptions,
87 | subtitleOptions,
88 | redraw
89 | ) {
90 | titleOptions = stripHTMLRecurse(titleOptions);
91 | subtitleOptions = stripHTMLRecurse(subtitleOptions);
92 | return setTitle.call(this, titleOptions, subtitleOptions, redraw);
93 | };
94 |
95 | const tooltipUpdate = Highcharts.Tooltip.prototype.update;
96 | Highcharts.Tooltip.prototype.update = function(options) {
97 | options = stripHTMLRecurse(options);
98 | return tooltipUpdate.call(this, options);
99 | };
100 | };
101 |
--------------------------------------------------------------------------------
/test/js-api-chart-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
41 |
42 |
43 |
44 |
96 |
97 |
--------------------------------------------------------------------------------
/test/custom-property-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
58 |
59 |
60 |
61 |
97 |
98 |
--------------------------------------------------------------------------------
/demo/demo-menu.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
110 |
--------------------------------------------------------------------------------
/demo/charts-js-json-api.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | Using JS JSON API
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
48 |
49 |
50 |
51 |
52 |
53 | Using JS JSON API with bar type
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
89 |
90 |
91 |
92 |
93 |
94 |
102 |
--------------------------------------------------------------------------------
/test/element-api-chart-series-dom-repeat-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
48 |
49 |
50 |
51 |
112 |
113 |
--------------------------------------------------------------------------------
/demo/common/demo-styles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
132 |
133 |
--------------------------------------------------------------------------------
/demo/data/male-height-weight.json:
--------------------------------------------------------------------------------
1 | [
2 | [174.0, 65.6],
3 | [175.3, 71.8],
4 | [193.5, 80.7],
5 | [186.5, 72.6],
6 | [187.2, 78.8],
7 | [181.5, 74.8],
8 | [184.0, 86.4],
9 | [184.5, 78.4],
10 | [175.0, 62.0],
11 | [184.0, 81.6],
12 | [180.0, 76.6],
13 | [177.8, 83.6],
14 | [192.0, 90.0],
15 | [176.0, 74.6],
16 | [174.0, 71.0],
17 | [184.0, 79.6],
18 | [192.7, 93.8],
19 | [171.5, 70.0],
20 | [173.0, 72.4],
21 | [176.0, 85.9],
22 | [176.0, 78.8],
23 | [180.5, 77.8],
24 | [172.7, 66.2],
25 | [176.0, 86.4],
26 | [173.5, 81.8],
27 | [178.0, 89.6],
28 | [180.3, 82.8],
29 | [180.3, 76.4],
30 | [164.5, 63.2],
31 | [173.0, 60.9],
32 | [183.5, 74.8],
33 | [175.5, 70.0],
34 | [188.0, 72.4],
35 | [189.2, 84.1],
36 | [172.8, 69.1],
37 | [170.0, 59.5],
38 | [182.0, 67.2],
39 | [170.0, 61.3],
40 | [177.8, 68.6],
41 | [184.2, 80.1],
42 | [186.7, 87.8],
43 | [171.4, 84.7],
44 | [172.7, 73.4],
45 | [175.3, 72.1],
46 | [180.3, 82.6],
47 | [182.9, 88.7],
48 | [188.0, 84.1],
49 | [177.2, 94.1],
50 | [172.1, 74.9],
51 | [167.0, 59.1],
52 | [169.5, 75.6],
53 | [174.0, 86.2],
54 | [172.7, 75.3],
55 | [182.2, 87.1],
56 | [164.1, 55.2],
57 | [163.0, 57.0],
58 | [171.5, 61.4],
59 | [184.2, 76.8],
60 | [174.0, 86.8],
61 | [174.0, 72.2],
62 | [177.0, 71.6],
63 | [186.0, 84.8],
64 | [167.0, 68.2],
65 | [171.8, 66.1],
66 | [182.0, 72.0],
67 | [167.0, 64.6],
68 | [177.8, 74.8],
69 | [164.5, 70.0],
70 | [192.0, 101.6],
71 | [175.5, 63.2],
72 | [171.2, 79.1],
73 | [181.6, 78.9],
74 | [167.4, 67.7],
75 | [181.1, 66.0],
76 | [177.0, 68.2],
77 | [174.5, 63.9],
78 | [177.5, 72.0],
79 | [170.5, 56.8],
80 | [182.4, 74.5],
81 | [197.1, 90.9],
82 | [180.1, 93.0],
83 | [175.5, 80.9],
84 | [180.6, 72.7],
85 | [184.4, 68.0],
86 | [175.5, 70.9],
87 | [180.6, 72.5],
88 | [177.0, 72.5],
89 | [177.1, 83.4],
90 | [181.6, 75.5],
91 | [176.5, 73.0],
92 | [175.0, 70.2],
93 | [174.0, 73.4],
94 | [165.1, 70.5],
95 | [177.0, 68.9],
96 | [192.0, 102.3],
97 | [176.5, 68.4],
98 | [169.4, 65.9],
99 | [182.1, 75.7],
100 | [179.8, 84.5],
101 | [175.3, 87.7],
102 | [184.9, 86.4],
103 | [177.3, 73.2],
104 | [167.4, 53.9],
105 | [178.1, 72.0],
106 | [168.9, 55.5],
107 | [157.2, 58.4],
108 | [180.3, 83.2],
109 | [170.2, 72.7],
110 | [177.8, 64.1],
111 | [172.7, 72.3],
112 | [165.1, 65.0],
113 | [186.7, 86.4],
114 | [165.1, 65.0],
115 | [174.0, 88.6],
116 | [175.3, 84.1],
117 | [185.4, 66.8],
118 | [177.8, 75.5],
119 | [180.3, 93.2],
120 | [180.3, 82.7],
121 | [177.8, 58.0],
122 | [177.8, 79.5],
123 | [177.8, 78.6],
124 | [177.8, 71.8],
125 | [177.8, 116.4],
126 | [163.8, 72.2],
127 | [188.0, 83.6],
128 | [198.1, 85.5],
129 | [175.3, 90.9],
130 | [166.4, 85.9],
131 | [190.5, 89.1],
132 | [166.4, 75.0],
133 | [177.8, 77.7],
134 | [179.7, 86.4],
135 | [172.7, 90.9],
136 | [190.5, 73.6],
137 | [185.4, 76.4],
138 | [168.9, 69.1],
139 | [167.6, 84.5],
140 | [175.3, 64.5],
141 | [170.2, 69.1],
142 | [190.5, 108.6],
143 | [177.8, 86.4],
144 | [190.5, 80.9],
145 | [177.8, 87.7],
146 | [184.2, 94.5],
147 | [176.5, 80.2],
148 | [177.8, 72.0],
149 | [180.3, 71.4],
150 | [171.4, 72.7],
151 | [172.7, 84.1],
152 | [172.7, 76.8],
153 | [177.8, 63.6],
154 | [177.8, 80.9],
155 | [182.9, 80.9],
156 | [170.2, 85.5],
157 | [167.6, 68.6],
158 | [175.3, 67.7],
159 | [165.1, 66.4],
160 | [185.4, 102.3],
161 | [181.6, 70.5],
162 | [172.7, 95.9],
163 | [190.5, 84.1],
164 | [179.1, 87.3],
165 | [175.3, 71.8],
166 | [170.2, 65.9],
167 | [193.0, 95.9],
168 | [171.4, 91.4],
169 | [177.8, 81.8],
170 | [177.8, 96.8],
171 | [167.6, 69.1],
172 | [167.6, 82.7],
173 | [180.3, 75.5],
174 | [182.9, 79.5],
175 | [176.5, 73.6],
176 | [186.7, 91.8],
177 | [188.0, 84.1],
178 | [188.0, 85.9],
179 | [177.8, 81.8],
180 | [174.0, 82.5],
181 | [177.8, 80.5],
182 | [171.4, 70.0],
183 | [185.4, 81.8],
184 | [185.4, 84.1],
185 | [188.0, 90.5],
186 | [188.0, 91.4],
187 | [182.9, 89.1],
188 | [176.5, 85.0],
189 | [175.3, 69.1],
190 | [175.3, 73.6],
191 | [188.0, 80.5],
192 | [188.0, 82.7],
193 | [175.3, 86.4],
194 | [170.5, 67.7],
195 | [179.1, 92.7],
196 | [177.8, 93.6],
197 | [175.3, 70.9],
198 | [182.9, 75.0],
199 | [170.8, 93.2],
200 | [188.0, 93.2],
201 | [180.3, 77.7],
202 | [177.8, 61.4],
203 | [185.4, 94.1],
204 | [168.9, 75.0],
205 | [185.4, 83.6],
206 | [180.3, 85.5],
207 | [174.0, 73.9],
208 | [167.6, 66.8],
209 | [182.9, 87.3],
210 | [160.0, 72.3],
211 | [180.3, 88.6],
212 | [167.6, 75.5],
213 | [186.7, 101.4],
214 | [175.3, 91.1],
215 | [175.3, 67.3],
216 | [175.9, 77.7],
217 | [175.3, 81.8],
218 | [179.1, 75.5],
219 | [181.6, 84.5],
220 | [177.8, 76.6],
221 | [182.9, 85.0],
222 | [177.8, 102.5],
223 | [184.2, 77.3],
224 | [179.1, 71.8],
225 | [176.5, 87.9],
226 | [188.0, 94.3],
227 | [174.0, 70.9],
228 | [167.6, 64.5],
229 | [170.2, 77.3],
230 | [167.6, 72.3],
231 | [188.0, 87.3],
232 | [174.0, 80.0],
233 | [176.5, 82.3],
234 | [180.3, 73.6],
235 | [167.6, 74.1],
236 | [188.0, 85.9],
237 | [180.3, 73.2],
238 | [167.6, 76.3],
239 | [183.0, 65.9],
240 | [183.0, 90.9],
241 | [179.1, 89.1],
242 | [170.2, 62.3],
243 | [177.8, 82.7],
244 | [179.1, 79.1],
245 | [190.5, 98.2],
246 | [177.8, 84.1],
247 | [180.3, 83.2],
248 | [180.3, 83.2]
249 | ]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Vaadin Charts
2 |
3 | > ⚠️ Starting from Vaadin 20, the source code and issues for this component are migrated to the [`vaadin/web-components`](https://github.com/vaadin/web-components/tree/master/packages/vaadin-charts) monorepository.
4 | > This repository contains the source code and releases of `` for the Vaadin versions 10 to 19.
5 |
6 | [Vaadin Charts](https://vaadin.com/components/vaadin-charts) is a Web Component for creating high quality charts, part of the [Vaadin components](https://vaadin.com/components).
7 |
8 | [Live Demo ↗](https://vaadin.com/components/vaadin-charts/examples)
9 | |
10 | [API documentation ↗](https://vaadin.com/components/vaadin-charts/html-api)
11 |
12 | [](https://www.npmjs.com/package/@vaadin/vaadin-charts)
13 | [](https://vaadin.com/directory/component/vaadinvaadin-element)
14 | [](https://discord.gg/PHmkCKC)
15 |
16 |
27 | ```html
28 |
29 |
36 |
37 |
38 | ```
39 |
40 | [
](https://vaadin.com/components/vaadin-chart)
41 |
42 | ## Relevant links
43 |
44 | - **Product page** https://vaadin.com/charts
45 | - **Trial license** https://vaadin.com/pro/licenses
46 |
47 |
48 | ## Installation
49 |
50 | Vaadin components are distributed as Bower and npm packages.
51 | Please note that the version range is the same, as the API has not changed.
52 | You should not mix Bower and npm versions in the same application, though.
53 |
54 | Unlike the official Polymer Elements, the converted Polymer 3 compatible Vaadin components
55 | are only published on npm, not pushed to GitHub repositories.
56 |
57 | ### Polymer 2 and HTML Imports compatible version
58 |
59 | Install `vaadin-charts`:
60 |
61 | ```sh
62 | bower i vaadin/vaadin-charts --save
63 | ```
64 |
65 | Once installed, import it in your application:
66 |
67 | ```html
68 |
69 | ```
70 |
71 | ### Polymer 3 and ES Modules compatible version
72 |
73 |
74 | Install `vaadin-charts`:
75 |
76 | ```sh
77 | npm i @vaadin/vaadin-charts --save
78 | ```
79 |
80 | Once installed, import it in your application:
81 |
82 | ```js
83 | import '@vaadin/vaadin-charts/vaadin-chart.js';
84 | ```
85 |
86 | ### Install License Key
87 | After one day using Vaadin Charts in a development environment you will see a pop-up that asks you to enter the license key.
88 | You can get your trial key from [https://vaadin.com/pro/licenses](https://vaadin.com/pro/licenses).
89 | If the license is valid, it will be saved to the local storage of the browser and you will not see the pop-up again.
90 |
91 | [
](https://vaadin.com/elements/-/element/vaadin-chart)
92 |
93 |
94 | ## Running demos and tests in browser
95 |
96 | 1. Fork the `vaadin-charts` repository and clone it locally.
97 |
98 | 1. Make sure you have [npm](https://www.npmjs.com/) installed.
99 |
100 | 1. When in the `vaadin-charts` directory, run `npm install` and then `bower install` to install dependencies.
101 |
102 | 1. Make sure you have [polymer-cli](https://www.npmjs.com/package/polymer-cli) installed globally: `npm i -g polymer-cli`.
103 |
104 | 1. Run `polymer serve --open`, browser will automatically open the component API documentation.
105 |
106 | 1. You can also open demo or in-browser tests by adding **demo** or **test** to the URL, for example:
107 |
108 | - http://127.0.0.1:8080/components/vaadin-charts/demo
109 | - http://127.0.0.1:8080/components/vaadin-charts/test
110 |
111 |
112 | ## Running tests from the command line
113 |
114 | > [!WARNING]
115 | > Running tests locally from the CLI does not work due to outdated dependencies. Run tests via SauceLabs or in the browser instead.
116 |
117 | 1. When in the `vaadin-charts` directory, run `polymer test`
118 |
119 |
120 | ## Following the coding style
121 |
122 | We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files.
123 |
124 |
125 | ## Contributing
126 |
127 | To contribute to the component, please read [the guideline](https://github.com/vaadin/vaadin-core/blob/master/CONTRIBUTING.md) first.
128 |
129 |
130 | ## License
131 |
132 | _Vaadin Charts_ is distributed under the terms of
133 | [Commercial Vaadin Add-On License version 3.0](https://vaadin.com/license/cval-3) ("CVALv3"). A copy of the license is included as ```LICENSE.txt``` in this software package.
134 |
135 | Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
136 |
--------------------------------------------------------------------------------
/demo/data/height-weight.json:
--------------------------------------------------------------------------------
1 | [
2 | [161.2, 51.6],
3 | [167.5, 59.0],
4 | [159.5, 49.2],
5 | [157.0, 63.0],
6 | [155.8, 53.6],
7 | [170.0, 59.0],
8 | [159.1, 47.6],
9 | [166.0, 69.8],
10 | [176.2, 66.8],
11 | [160.2, 75.2],
12 | [172.5, 55.2],
13 | [170.9, 54.2],
14 | [172.9, 62.5],
15 | [153.4, 42.0],
16 | [160.0, 50.0],
17 | [147.2, 49.8],
18 | [168.2, 49.2],
19 | [175.0, 73.2],
20 | [157.0, 47.8],
21 | [167.6, 68.8],
22 | [159.5, 50.6],
23 | [175.0, 82.5],
24 | [166.8, 57.2],
25 | [176.5, 87.8],
26 | [170.2, 72.8],
27 | [174.0, 54.5],
28 | [173.0, 59.8],
29 | [179.9, 67.3],
30 | [170.5, 67.8],
31 | [160.0, 47.0],
32 | [154.4, 46.2],
33 | [162.0, 55.0],
34 | [176.5, 83.0],
35 | [160.0, 54.4],
36 | [152.0, 45.8],
37 | [162.1, 53.6],
38 | [170.0, 73.2],
39 | [160.2, 52.1],
40 | [161.3, 67.9],
41 | [166.4, 56.6],
42 | [168.9, 62.3],
43 | [163.8, 58.5],
44 | [167.6, 54.5],
45 | [160.0, 50.2],
46 | [161.3, 60.3],
47 | [167.6, 58.3],
48 | [165.1, 56.2],
49 | [160.0, 50.2],
50 | [170.0, 72.9],
51 | [157.5, 59.8],
52 | [167.6, 61.0],
53 | [160.7, 69.1],
54 | [163.2, 55.9],
55 | [152.4, 46.5],
56 | [157.5, 54.3],
57 | [168.3, 54.8],
58 | [180.3, 60.7],
59 | [165.5, 60.0],
60 | [165.0, 62.0],
61 | [164.5, 60.3],
62 | [156.0, 52.7],
63 | [160.0, 74.3],
64 | [163.0, 62.0],
65 | [165.7, 73.1],
66 | [161.0, 80.0],
67 | [162.0, 54.7],
68 | [166.0, 53.2],
69 | [174.0, 75.7],
70 | [172.7, 61.1],
71 | [167.6, 55.7],
72 | [151.1, 48.7],
73 | [164.5, 52.3],
74 | [163.5, 50.0],
75 | [152.0, 59.3],
76 | [169.0, 62.5],
77 | [164.0, 55.7],
78 | [161.2, 54.8],
79 | [155.0, 45.9],
80 | [170.0, 70.6],
81 | [176.2, 67.2],
82 | [170.0, 69.4],
83 | [162.5, 58.2],
84 | [170.3, 64.8],
85 | [164.1, 71.6],
86 | [169.5, 52.8],
87 | [163.2, 59.8],
88 | [154.5, 49.0],
89 | [159.8, 50.0],
90 | [173.2, 69.2],
91 | [170.0, 55.9],
92 | [161.4, 63.4],
93 | [169.0, 58.2],
94 | [166.2, 58.6],
95 | [159.4, 45.7],
96 | [162.5, 52.2],
97 | [159.0, 48.6],
98 | [162.8, 57.8],
99 | [159.0, 55.6],
100 | [179.8, 66.8],
101 | [162.9, 59.4],
102 | [161.0, 53.6],
103 | [151.1, 73.2],
104 | [168.2, 53.4],
105 | [168.9, 69.0],
106 | [173.2, 58.4],
107 | [171.8, 56.2],
108 | [178.0, 70.6],
109 | [164.3, 59.8],
110 | [163.0, 72.0],
111 | [168.5, 65.2],
112 | [166.8, 56.6],
113 | [172.7, 105.2],
114 | [163.5, 51.8],
115 | [169.4, 63.4],
116 | [167.8, 59.0],
117 | [159.5, 47.6],
118 | [167.6, 63.0],
119 | [161.2, 55.2],
120 | [160.0, 45.0],
121 | [163.2, 54.0],
122 | [162.2, 50.2],
123 | [161.3, 60.2],
124 | [149.5, 44.8],
125 | [157.5, 58.8],
126 | [163.2, 56.4],
127 | [172.7, 62.0],
128 | [155.0, 49.2],
129 | [156.5, 67.2],
130 | [164.0, 53.8],
131 | [160.9, 54.4],
132 | [162.8, 58.0],
133 | [167.0, 59.8],
134 | [160.0, 54.8],
135 | [160.0, 43.2],
136 | [168.9, 60.5],
137 | [158.2, 46.4],
138 | [156.0, 64.4],
139 | [160.0, 48.8],
140 | [167.1, 62.2],
141 | [158.0, 55.5],
142 | [167.6, 57.8],
143 | [156.0, 54.6],
144 | [162.1, 59.2],
145 | [173.4, 52.7],
146 | [159.8, 53.2],
147 | [170.5, 64.5],
148 | [159.2, 51.8],
149 | [157.5, 56.0],
150 | [161.3, 63.6],
151 | [162.6, 63.2],
152 | [160.0, 59.5],
153 | [168.9, 56.8],
154 | [165.1, 64.1],
155 | [162.6, 50.0],
156 | [165.1, 72.3],
157 | [166.4, 55.0],
158 | [160.0, 55.9],
159 | [152.4, 60.4],
160 | [170.2, 69.1],
161 | [162.6, 84.5],
162 | [170.2, 55.9],
163 | [158.8, 55.5],
164 | [172.7, 69.5],
165 | [167.6, 76.4],
166 | [162.6, 61.4],
167 | [167.6, 65.9],
168 | [156.2, 58.6],
169 | [175.2, 66.8],
170 | [172.1, 56.6],
171 | [162.6, 58.6],
172 | [160.0, 55.9],
173 | [165.1, 59.1],
174 | [182.9, 81.8],
175 | [166.4, 70.7],
176 | [165.1, 56.8],
177 | [177.8, 60.0],
178 | [165.1, 58.2],
179 | [175.3, 72.7],
180 | [154.9, 54.1],
181 | [158.8, 49.1],
182 | [172.7, 75.9],
183 | [168.9, 55.0],
184 | [161.3, 57.3],
185 | [167.6, 55.0],
186 | [165.1, 65.5],
187 | [175.3, 65.5],
188 | [157.5, 48.6],
189 | [163.8, 58.6],
190 | [167.6, 63.6],
191 | [165.1, 55.2],
192 | [165.1, 62.7],
193 | [168.9, 56.6],
194 | [162.6, 53.9],
195 | [164.5, 63.2],
196 | [176.5, 73.6],
197 | [168.9, 62.0],
198 | [175.3, 63.6],
199 | [159.4, 53.2],
200 | [160.0, 53.4],
201 | [170.2, 55.0],
202 | [162.6, 70.5],
203 | [167.6, 54.5],
204 | [162.6, 54.5],
205 | [160.7, 55.9],
206 | [160.0, 59.0],
207 | [157.5, 63.6],
208 | [162.6, 54.5],
209 | [152.4, 47.3],
210 | [170.2, 67.7],
211 | [165.1, 80.9],
212 | [172.7, 70.5],
213 | [165.1, 60.9],
214 | [170.2, 63.6],
215 | [170.2, 54.5],
216 | [170.2, 59.1],
217 | [161.3, 70.5],
218 | [167.6, 52.7],
219 | [167.6, 62.7],
220 | [165.1, 86.3],
221 | [162.6, 66.4],
222 | [152.4, 67.3],
223 | [168.9, 63.0],
224 | [170.2, 73.6],
225 | [175.2, 62.3],
226 | [175.2, 57.7],
227 | [160.0, 55.4],
228 | [165.1, 104.1],
229 | [174.0, 55.5],
230 | [170.2, 77.3],
231 | [160.0, 80.5],
232 | [167.6, 64.5],
233 | [167.6, 72.3],
234 | [167.6, 61.4],
235 | [154.9, 58.2],
236 | [162.6, 81.8],
237 | [175.3, 63.6],
238 | [171.4, 53.4],
239 | [157.5, 54.5],
240 | [165.1, 53.6],
241 | [160.0, 60.0],
242 | [174.0, 73.6],
243 | [162.6, 61.4],
244 | [174.0, 55.5],
245 | [162.6, 63.6],
246 | [161.3, 60.9],
247 | [156.2, 60.0],
248 | [149.9, 46.8],
249 | [169.5, 57.3],
250 | [160.0, 64.1],
251 | [175.3, 63.6],
252 | [169.5, 67.3],
253 | [160.0, 75.5],
254 | [172.7, 68.2],
255 | [162.6, 61.4],
256 | [157.5, 76.8],
257 | [176.5, 71.8],
258 | [164.4, 55.5],
259 | [160.7, 48.6],
260 | [174.0, 66.4],
261 | [163.8, 67.3]
262 | ]
--------------------------------------------------------------------------------
/demo/data/female-height-weight.json:
--------------------------------------------------------------------------------
1 | [
2 | [161.2, 51.6],
3 | [167.5, 59.0],
4 | [159.5, 49.2],
5 | [157.0, 63.0],
6 | [155.8, 53.6],
7 | [170.0, 59.0],
8 | [159.1, 47.6],
9 | [166.0, 69.8],
10 | [176.2, 66.8],
11 | [160.2, 75.2],
12 | [172.5, 55.2],
13 | [170.9, 54.2],
14 | [172.9, 62.5],
15 | [153.4, 42.0],
16 | [160.0, 50.0],
17 | [147.2, 49.8],
18 | [168.2, 49.2],
19 | [175.0, 73.2],
20 | [157.0, 47.8],
21 | [167.6, 68.8],
22 | [159.5, 50.6],
23 | [175.0, 82.5],
24 | [166.8, 57.2],
25 | [176.5, 87.8],
26 | [170.2, 72.8],
27 | [174.0, 54.5],
28 | [173.0, 59.8],
29 | [179.9, 67.3],
30 | [170.5, 67.8],
31 | [160.0, 47.0],
32 | [154.4, 46.2],
33 | [162.0, 55.0],
34 | [176.5, 83.0],
35 | [160.0, 54.4],
36 | [152.0, 45.8],
37 | [162.1, 53.6],
38 | [170.0, 73.2],
39 | [160.2, 52.1],
40 | [161.3, 67.9],
41 | [166.4, 56.6],
42 | [168.9, 62.3],
43 | [163.8, 58.5],
44 | [167.6, 54.5],
45 | [160.0, 50.2],
46 | [161.3, 60.3],
47 | [167.6, 58.3],
48 | [165.1, 56.2],
49 | [160.0, 50.2],
50 | [170.0, 72.9],
51 | [157.5, 59.8],
52 | [167.6, 61.0],
53 | [160.7, 69.1],
54 | [163.2, 55.9],
55 | [152.4, 46.5],
56 | [157.5, 54.3],
57 | [168.3, 54.8],
58 | [180.3, 60.7],
59 | [165.5, 60.0],
60 | [165.0, 62.0],
61 | [164.5, 60.3],
62 | [156.0, 52.7],
63 | [160.0, 74.3],
64 | [163.0, 62.0],
65 | [165.7, 73.1],
66 | [161.0, 80.0],
67 | [162.0, 54.7],
68 | [166.0, 53.2],
69 | [174.0, 75.7],
70 | [172.7, 61.1],
71 | [167.6, 55.7],
72 | [151.1, 48.7],
73 | [164.5, 52.3],
74 | [163.5, 50.0],
75 | [152.0, 59.3],
76 | [169.0, 62.5],
77 | [164.0, 55.7],
78 | [161.2, 54.8],
79 | [155.0, 45.9],
80 | [170.0, 70.6],
81 | [176.2, 67.2],
82 | [170.0, 69.4],
83 | [162.5, 58.2],
84 | [170.3, 64.8],
85 | [164.1, 71.6],
86 | [169.5, 52.8],
87 | [163.2, 59.8],
88 | [154.5, 49.0],
89 | [159.8, 50.0],
90 | [173.2, 69.2],
91 | [170.0, 55.9],
92 | [161.4, 63.4],
93 | [169.0, 58.2],
94 | [166.2, 58.6],
95 | [159.4, 45.7],
96 | [162.5, 52.2],
97 | [159.0, 48.6],
98 | [162.8, 57.8],
99 | [159.0, 55.6],
100 | [179.8, 66.8],
101 | [162.9, 59.4],
102 | [161.0, 53.6],
103 | [151.1, 73.2],
104 | [168.2, 53.4],
105 | [168.9, 69.0],
106 | [173.2, 58.4],
107 | [171.8, 56.2],
108 | [178.0, 70.6],
109 | [164.3, 59.8],
110 | [163.0, 72.0],
111 | [168.5, 65.2],
112 | [166.8, 56.6],
113 | [172.7, 105.2],
114 | [163.5, 51.8],
115 | [169.4, 63.4],
116 | [167.8, 59.0],
117 | [159.5, 47.6],
118 | [167.6, 63.0],
119 | [161.2, 55.2],
120 | [160.0, 45.0],
121 | [163.2, 54.0],
122 | [162.2, 50.2],
123 | [161.3, 60.2],
124 | [149.5, 44.8],
125 | [157.5, 58.8],
126 | [163.2, 56.4],
127 | [172.7, 62.0],
128 | [155.0, 49.2],
129 | [156.5, 67.2],
130 | [164.0, 53.8],
131 | [160.9, 54.4],
132 | [162.8, 58.0],
133 | [167.0, 59.8],
134 | [160.0, 54.8],
135 | [160.0, 43.2],
136 | [168.9, 60.5],
137 | [158.2, 46.4],
138 | [156.0, 64.4],
139 | [160.0, 48.8],
140 | [167.1, 62.2],
141 | [158.0, 55.5],
142 | [167.6, 57.8],
143 | [156.0, 54.6],
144 | [162.1, 59.2],
145 | [173.4, 52.7],
146 | [159.8, 53.2],
147 | [170.5, 64.5],
148 | [159.2, 51.8],
149 | [157.5, 56.0],
150 | [161.3, 63.6],
151 | [162.6, 63.2],
152 | [160.0, 59.5],
153 | [168.9, 56.8],
154 | [165.1, 64.1],
155 | [162.6, 50.0],
156 | [165.1, 72.3],
157 | [166.4, 55.0],
158 | [160.0, 55.9],
159 | [152.4, 60.4],
160 | [170.2, 69.1],
161 | [162.6, 84.5],
162 | [170.2, 55.9],
163 | [158.8, 55.5],
164 | [172.7, 69.5],
165 | [167.6, 76.4],
166 | [162.6, 61.4],
167 | [167.6, 65.9],
168 | [156.2, 58.6],
169 | [175.2, 66.8],
170 | [172.1, 56.6],
171 | [162.6, 58.6],
172 | [160.0, 55.9],
173 | [165.1, 59.1],
174 | [182.9, 81.8],
175 | [166.4, 70.7],
176 | [165.1, 56.8],
177 | [177.8, 60.0],
178 | [165.1, 58.2],
179 | [175.3, 72.7],
180 | [154.9, 54.1],
181 | [158.8, 49.1],
182 | [172.7, 75.9],
183 | [168.9, 55.0],
184 | [161.3, 57.3],
185 | [167.6, 55.0],
186 | [165.1, 65.5],
187 | [175.3, 65.5],
188 | [157.5, 48.6],
189 | [163.8, 58.6],
190 | [167.6, 63.6],
191 | [165.1, 55.2],
192 | [165.1, 62.7],
193 | [168.9, 56.6],
194 | [162.6, 53.9],
195 | [164.5, 63.2],
196 | [176.5, 73.6],
197 | [168.9, 62.0],
198 | [175.3, 63.6],
199 | [159.4, 53.2],
200 | [160.0, 53.4],
201 | [170.2, 55.0],
202 | [162.6, 70.5],
203 | [167.6, 54.5],
204 | [162.6, 54.5],
205 | [160.7, 55.9],
206 | [160.0, 59.0],
207 | [157.5, 63.6],
208 | [162.6, 54.5],
209 | [152.4, 47.3],
210 | [170.2, 67.7],
211 | [165.1, 80.9],
212 | [172.7, 70.5],
213 | [165.1, 60.9],
214 | [170.2, 63.6],
215 | [170.2, 54.5],
216 | [170.2, 59.1],
217 | [161.3, 70.5],
218 | [167.6, 52.7],
219 | [167.6, 62.7],
220 | [165.1, 86.3],
221 | [162.6, 66.4],
222 | [152.4, 67.3],
223 | [168.9, 63.0],
224 | [170.2, 73.6],
225 | [175.2, 62.3],
226 | [175.2, 57.7],
227 | [160.0, 55.4],
228 | [165.1, 104.1],
229 | [174.0, 55.5],
230 | [170.2, 77.3],
231 | [160.0, 80.5],
232 | [167.6, 64.5],
233 | [167.6, 72.3],
234 | [167.6, 61.4],
235 | [154.9, 58.2],
236 | [162.6, 81.8],
237 | [175.3, 63.6],
238 | [171.4, 53.4],
239 | [157.5, 54.5],
240 | [165.1, 53.6],
241 | [160.0, 60.0],
242 | [174.0, 73.6],
243 | [162.6, 61.4],
244 | [174.0, 55.5],
245 | [162.6, 63.6],
246 | [161.3, 60.9],
247 | [156.2, 60.0],
248 | [149.9, 46.8],
249 | [169.5, 57.3],
250 | [160.0, 64.1],
251 | [175.3, 63.6],
252 | [169.5, 67.3],
253 | [160.0, 75.5],
254 | [172.7, 68.2],
255 | [162.6, 61.4],
256 | [157.5, 76.8],
257 | [176.5, 71.8],
258 | [164.4, 55.5],
259 | [160.7, 48.6],
260 | [174.0, 66.4],
261 | [163.8, 67.3]
262 | ]
--------------------------------------------------------------------------------
/test/exporting-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
62 |
63 |
64 |
65 |
156 |
157 |
--------------------------------------------------------------------------------
/demo/common/demo-plus-sources-area.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
85 |
86 |
87 |
88 |
HTML
90 |
Java
92 |
94 | Hide source
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
189 |
190 |
--------------------------------------------------------------------------------
/test/element-events-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
51 |
52 |
53 |
54 |
176 |
177 |
--------------------------------------------------------------------------------
/test/charts-options-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
191 |
192 |
--------------------------------------------------------------------------------
/demo/data/aapl-date-price.json:
--------------------------------------------------------------------------------
1 | [
2 | [1498483800000, 145.82],
3 | [1498570200000, 143.73],
4 | [1498656600000, 145.83],
5 | [1498743000000, 143.68],
6 | [1498829400000, 144.02],
7 | [1499088600000, 143.5],
8 | [1499261400000, 144.09],
9 | [1499347800000, 142.73],
10 | [1499434200000, 144.18],
11 | [1499693400000, 145.06],
12 | [1499779800000, 145.53],
13 | [1499866200000, 145.74],
14 | [1499952600000, 147.77],
15 | [1500039000000, 149.04],
16 | [1500298200000, 149.56],
17 | [1500384600000, 150.08],
18 | [1500471000000, 151.02],
19 | [1500557400000, 150.34],
20 | [1500643800000, 150.27],
21 | [1500903000000, 152.09],
22 | [1500989400000, 152.74],
23 | [1501075800000, 153.46],
24 | [1501162200000, 150.56],
25 | [1501248600000, 149.5],
26 | [1501507800000, 148.73],
27 | [1501594200000, 150.05],
28 | [1501680600000, 157.14],
29 | [1501767000000, 155.57],
30 | [1501853400000, 156.39],
31 | [1502112600000, 158.81],
32 | [1502199000000, 160.08],
33 | [1502285400000, 161.06],
34 | [1502371800000, 155.32],
35 | [1502458200000, 157.48],
36 | [1502717400000, 159.85],
37 | [1502803800000, 161.6],
38 | [1502890200000, 160.95],
39 | [1502976600000, 157.86],
40 | [1503063000000, 157.5],
41 | [1503322200000, 157.21],
42 | [1503408600000, 159.78],
43 | [1503495000000, 159.98],
44 | [1503581400000, 159.27],
45 | [1503667800000, 159.86],
46 | [1503927000000, 161.47],
47 | [1504013400000, 162.91],
48 | [1504099800000, 163.35],
49 | [1504186200000, 164],
50 | [1504272600000, 164.05],
51 | [1504618200000, 162.08],
52 | [1504704600000, 161.91],
53 | [1504791000000, 161.26],
54 | [1504877400000, 158.63],
55 | [1505136600000, 161.5],
56 | [1505223000000, 160.86],
57 | [1505309400000, 159.65],
58 | [1505395800000, 158.28],
59 | [1505482200000, 159.88],
60 | [1505741400000, 158.67],
61 | [1505827800000, 158.73],
62 | [1505914200000, 156.07],
63 | [1506000600000, 153.39],
64 | [1506087000000, 151.89],
65 | [1506346200000, 150.55],
66 | [1506432600000, 153.14],
67 | [1506519000000, 154.23],
68 | [1506605400000, 153.28],
69 | [1506691800000, 154.12],
70 | [1506951000000, 153.81],
71 | [1507037400000, 154.48],
72 | [1507123800000, 153.48],
73 | [1507210200000, 155.39],
74 | [1507296600000, 155.3],
75 | [1507555800000, 155.84],
76 | [1507642200000, 155.9],
77 | [1507728600000, 156.55],
78 | [1507815000000, 156],
79 | [1507901400000, 156.99],
80 | [1508160600000, 159.88],
81 | [1508247000000, 160.47],
82 | [1508333400000, 159.76],
83 | [1508419800000, 155.98],
84 | [1508506200000, 156.25],
85 | [1508765400000, 156.17],
86 | [1508851800000, 157.1],
87 | [1508938200000, 156.41],
88 | [1509024600000, 157.41],
89 | [1509111000000, 163.05],
90 | [1509370200000, 166.72],
91 | [1509456600000, 169.04],
92 | [1509543000000, 166.89],
93 | [1509629400000, 168.11],
94 | [1509715800000, 172.5],
95 | [1509978600000, 174.25],
96 | [1510065000000, 174.81],
97 | [1510151400000, 176.24],
98 | [1510237800000, 175.88],
99 | [1510324200000, 174.67],
100 | [1510583400000, 173.97],
101 | [1510669800000, 171.34],
102 | [1510756200000, 169.08],
103 | [1510842600000, 171.1],
104 | [1510929000000, 170.15],
105 | [1511188200000, 169.98],
106 | [1511274600000, 173.14],
107 | [1511361000000, 174.96],
108 | [1511533800000, 174.97],
109 | [1511793000000, 174.09],
110 | [1511879400000, 173.07],
111 | [1511965800000, 169.48],
112 | [1512052200000, 171.85],
113 | [1512138600000, 171.05],
114 | [1512397800000, 169.8],
115 | [1512484200000, 169.64],
116 | [1512570600000, 169.01],
117 | [1512657000000, 169.32],
118 | [1512743400000, 169.37],
119 | [1513002600000, 172.67],
120 | [1513089000000, 171.7],
121 | [1513175400000, 172.27],
122 | [1513261800000, 172.22],
123 | [1513348200000, 173.97],
124 | [1513607400000, 176.42],
125 | [1513693800000, 174.54],
126 | [1513780200000, 174.35],
127 | [1513866600000, 175.01],
128 | [1513953000000, 175.01],
129 | [1514298600000, 170.57],
130 | [1514385000000, 170.6],
131 | [1514471400000, 171.08],
132 | [1514557800000, 169.23],
133 | [1514903400000, 172.26],
134 | [1514989800000, 172.23],
135 | [1515076200000, 173.03],
136 | [1515162600000, 175],
137 | [1515421800000, 174.35],
138 | [1515508200000, 174.33],
139 | [1515594600000, 174.29],
140 | [1515681000000, 175.28],
141 | [1515767400000, 177.09],
142 | [1516113000000, 176.19],
143 | [1516199400000, 179.1],
144 | [1516285800000, 179.26],
145 | [1516372200000, 178.46],
146 | [1516631400000, 177],
147 | [1516717800000, 177.04],
148 | [1516804200000, 174.22],
149 | [1516890600000, 171.11],
150 | [1516977000000, 171.51],
151 | [1517236200000, 167.96],
152 | [1517322600000, 166.97],
153 | [1517409000000, 167.43],
154 | [1517495400000, 167.78],
155 | [1517581800000, 160.5],
156 | [1517841000000, 156.49],
157 | [1517927400000, 163.03],
158 | [1518013800000, 159.54],
159 | [1518100200000, 155.15],
160 | [1518186600000, 156.41],
161 | [1518445800000, 162.71],
162 | [1518532200000, 164.34],
163 | [1518618600000, 167.37],
164 | [1518705000000, 172.99],
165 | [1518791400000, 172.43],
166 | [1519137000000, 171.85],
167 | [1519223400000, 171.07],
168 | [1519309800000, 172.5],
169 | [1519396200000, 175.5],
170 | [1519655400000, 178.97],
171 | [1519741800000, 178.39],
172 | [1519828200000, 178.12],
173 | [1519914600000, 175],
174 | [1520001000000, 176.21],
175 | [1520260200000, 176.82],
176 | [1520346600000, 176.67],
177 | [1520433000000, 175.03],
178 | [1520519400000, 176.94],
179 | [1520605800000, 179.98],
180 | [1520861400000, 181.72],
181 | [1520947800000, 179.97],
182 | [1521034200000, 178.44],
183 | [1521120600000, 178.65],
184 | [1521207000000, 178.02],
185 | [1521466200000, 175.3],
186 | [1521552600000, 175.24],
187 | [1521639000000, 171.27],
188 | [1521725400000, 168.85],
189 | [1521811800000, 164.94],
190 | [1522071000000, 172.77],
191 | [1522157400000, 168.34],
192 | [1522243800000, 166.48],
193 | [1522330200000, 167.78],
194 | [1522675800000, 166.68],
195 | [1522762200000, 168.39],
196 | [1522848600000, 171.61],
197 | [1522935000000, 172.8],
198 | [1523021400000, 168.38],
199 | [1523280600000, 170.05],
200 | [1523367000000, 173.25],
201 | [1523453400000, 172.44],
202 | [1523539800000, 174.14],
203 | [1523626200000, 174.73],
204 | [1523885400000, 175.82],
205 | [1523971800000, 178.24],
206 | [1524058200000, 177.84],
207 | [1524144600000, 172.8],
208 | [1524231000000, 165.72],
209 | [1524490200000, 165.24],
210 | [1524576600000, 162.94],
211 | [1524663000000, 163.65],
212 | [1524749400000, 164.22],
213 | [1524835800000, 162.32],
214 | [1525095000000, 165.26],
215 | [1525181400000, 169.1],
216 | [1525267800000, 176.57],
217 | [1525354200000, 176.89],
218 | [1525440600000, 183.83],
219 | [1525699800000, 185.16],
220 | [1525786200000, 186.05],
221 | [1525872600000, 187.36],
222 | [1525959000000, 190.04],
223 | [1526045400000, 188.59],
224 | [1526304600000, 188.15],
225 | [1526391000000, 186.44],
226 | [1526477400000, 188.18],
227 | [1526563800000, 186.99],
228 | [1526650200000, 186.31],
229 | [1526909400000, 187.63],
230 | [1526995800000, 187.16],
231 | [1527082200000, 188.36],
232 | [1527168600000, 188.15],
233 | [1527255000000, 188.58],
234 | [1527600600000, 187.9],
235 | [1527687000000, 187.5],
236 | [1527773400000, 186.87],
237 | [1527859800000, 190.24],
238 | [1528119000000, 191.83],
239 | [1528205400000, 193.31],
240 | [1528291800000, 193.98],
241 | [1528378200000, 193.46],
242 | [1528464600000, 191.7],
243 | [1528723800000, 191.23],
244 | [1528810200000, 192.28],
245 | [1528896600000, 190.7],
246 | [1528983000000, 190.8],
247 | [1529069400000, 188.84],
248 | [1529328600000, 188.74],
249 | [1529415000000, 185.69],
250 | [1529501400000, 186.5],
251 | [1529587800000, 185.46],
252 | [1529674200000, 184.92],
253 | [1529933400000, 182.17],
254 | [1530019800000, 184.43],
255 | [1530106200000, 184.16],
256 | [1530192600000, 185.5],
257 | [1530279000000, 185.11],
258 | [1530538200000, 187.18],
259 | [1530624600000, 183.92],
260 | [1530797400000, 185.4],
261 | [1530883800000, 187.97],
262 | [1531143000000, 190.58],
263 | [1531229400000, 190.35],
264 | [1531315800000, 187.88],
265 | [1531402200000, 191.03],
266 | [1531488600000, 191.33],
267 | [1531747800000, 190.91],
268 | [1531834200000, 191.45],
269 | [1531920600000, 190.4],
270 | [1532007000000, 191.88],
271 | [1532093400000, 191.44],
272 | [1532352600000, 191.61],
273 | [1532439000000, 193],
274 | [1532525400000, 194.82],
275 | [1532611800000, 194.21],
276 | [1532698200000, 190.98],
277 | [1532957400000, 189.91],
278 | [1533043800000, 190.29],
279 | [1533130200000, 201.5],
280 | [1533216600000, 207.39],
281 | [1533303000000, 207.99]
282 | ]
--------------------------------------------------------------------------------
/test/js-json-api-chart-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vaadin-chart tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
226 |
227 |
--------------------------------------------------------------------------------