@operato/scene-chartjs 0.0.9 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/@types/global/index.d.ts +1 -0
  2. package/CHANGELOG.md +47 -0
  3. package/dist/templates/bar-chart.d.ts +91 -0
  4. package/dist/templates/bar-chart.js +121 -0
  5. package/dist/templates/bar-chart.js.map +1 -0
  6. package/dist/templates/doughnut-chart.d.ts +41 -0
  7. package/dist/templates/doughnut-chart.js +55 -0
  8. package/dist/templates/doughnut-chart.js.map +1 -0
  9. package/dist/templates/horizontal-bar-chart.d.ts +75 -0
  10. package/dist/templates/horizontal-bar-chart.js +118 -0
  11. package/dist/templates/horizontal-bar-chart.js.map +1 -0
  12. package/dist/templates/index.d.ts +498 -0
  13. package/dist/templates/index.js +19 -0
  14. package/dist/templates/index.js.map +1 -0
  15. package/dist/templates/line-chart.d.ts +97 -0
  16. package/dist/templates/line-chart.js +152 -0
  17. package/dist/templates/line-chart.js.map +1 -0
  18. package/dist/templates/mixed-chart.d.ts +113 -0
  19. package/dist/templates/mixed-chart.js +149 -0
  20. package/dist/templates/mixed-chart.js.map +1 -0
  21. package/dist/templates/pie-chart.d.ts +41 -0
  22. package/dist/templates/pie-chart.js +55 -0
  23. package/dist/templates/pie-chart.js.map +1 -0
  24. package/dist/templates/polar-area-chart.d.ts +45 -0
  25. package/dist/templates/polar-area-chart.js +89 -0
  26. package/dist/templates/polar-area-chart.js.map +1 -0
  27. package/dist/templates/radar-chart.d.ts +48 -0
  28. package/dist/templates/radar-chart.js +95 -0
  29. package/dist/templates/radar-chart.js.map +1 -0
  30. package/global/index.d.ts +1 -0
  31. package/package.json +6 -6
  32. package/{templates/bar-chart.js → src/templates/bar-chart.ts} +1 -1
  33. package/{templates/doughnut-chart.js → src/templates/doughnut-chart.ts} +1 -1
  34. package/{templates/horizontal-bar-chart.js → src/templates/horizontal-bar-chart.ts} +1 -1
  35. package/{templates/index.js → src/templates/index.ts} +0 -0
  36. package/{templates/line-chart.js → src/templates/line-chart.ts} +1 -1
  37. package/{templates/mixed-chart.js → src/templates/mixed-chart.ts} +1 -1
  38. package/{templates/pie-chart.js → src/templates/pie-chart.ts} +1 -1
  39. package/{templates/polar-area-chart.js → src/templates/polar-area-chart.ts} +1 -1
  40. package/{templates/radar-chart.js → src/templates/radar-chart.ts} +1 -1
  41. package/things-scene.config.js +1 -1
  42. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1 @@
1
+ declare module '*.png'
package/CHANGELOG.md CHANGED
@@ -3,6 +3,53 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [0.0.13](https://github.com/things-scene/operato-scene/compare/v0.0.12...v0.0.13) (2021-12-07)
7
+
8
+
9
+ ### :rocket: New Features
10
+
11
+ * scene-grist complete ([cf87cb7](https://github.com/things-scene/operato-scene/commit/cf87cb7df0ae276341b16dee5c2e0f949703ff02))
12
+
13
+
14
+ ### :bug: Bug Fix
15
+
16
+ * upgrade operato version ([e5ec388](https://github.com/things-scene/operato-scene/commit/e5ec38843b215be144a06ee65dfce22acff4ca1c))
17
+
18
+
19
+
20
+ ### [0.0.12](https://github.com/things-scene/operato-scene/compare/v0.0.11...v0.0.12) (2021-12-06)
21
+
22
+ **Note:** Version bump only for package @operato/scene-chartjs
23
+
24
+
25
+
26
+
27
+
28
+ ### [0.0.11](https://github.com/things-scene/operato-scene/compare/v0.0.10...v0.0.11) (2021-12-06)
29
+
30
+
31
+ ### :rocket: New Features
32
+
33
+ * add wheel-sorter, legend, timer and compass ([dc90f73](https://github.com/things-scene/operato-scene/commit/dc90f73054424c0867a1c4a28d51da6e7fab8b85))
34
+ * add wheel-sorter, legend, timer and compass ([518950c](https://github.com/things-scene/operato-scene/commit/518950cb5476048504a415a1dd0a1fd2d4359a77))
35
+
36
+
37
+
38
+ ### [0.0.10](https://github.com/things-scene/operato-scene/compare/v0.0.9...v0.0.10) (2021-12-06)
39
+
40
+
41
+ ### :bug: Bug Fix
42
+
43
+ * module things-factory for test upgraded ([6a4a853](https://github.com/things-scene/operato-scene/commit/6a4a853f6beb80403c29bd8f423902f6e9ecdd81))
44
+
45
+
46
+ ### :rocket: New Features
47
+
48
+ * add @operato/scene-clock ([74da632](https://github.com/things-scene/operato-scene/commit/74da632211643f47f50a886ca7173bced0132b62))
49
+ * add @operato/scene-clock ([8b0d55c](https://github.com/things-scene/operato-scene/commit/8b0d55ce3ce35f0b4e8aee02703370937a30275a))
50
+
51
+
52
+
6
53
  ### [0.0.9](https://github.com/things-scene/operato-scene/compare/v0.0.8...v0.0.9) (2021-12-03)
7
54
 
8
55
 
@@ -0,0 +1,91 @@
1
+ declare const _default: {
2
+ type: string;
3
+ description: string;
4
+ icon: any;
5
+ group: string;
6
+ model: {
7
+ type: string;
8
+ top: number;
9
+ left: number;
10
+ width: number;
11
+ height: number;
12
+ chart: {
13
+ type: string;
14
+ data: {
15
+ labels: never[];
16
+ datasets: {
17
+ label: string;
18
+ type: string;
19
+ data: never[];
20
+ backgroundColor: string;
21
+ borderColor: string;
22
+ borderWidth: number;
23
+ dataKey: string;
24
+ yAxisID: string;
25
+ }[];
26
+ labelDataKey: string;
27
+ };
28
+ options: {
29
+ theme: string;
30
+ xGridLine: boolean;
31
+ yGridLine: boolean;
32
+ legend: {
33
+ display: boolean;
34
+ position: string;
35
+ };
36
+ scales: {
37
+ xAxes: {
38
+ gridLines: {
39
+ display: boolean;
40
+ };
41
+ scaleLabel: {
42
+ labelString: string;
43
+ display: boolean;
44
+ };
45
+ ticks: {
46
+ display: boolean;
47
+ };
48
+ }[];
49
+ yAxes: ({
50
+ id: string;
51
+ position: string;
52
+ gridLines: {
53
+ display: boolean;
54
+ };
55
+ scaleLabel: {
56
+ labelString: string;
57
+ display: boolean;
58
+ };
59
+ ticks: {
60
+ autoMin: boolean;
61
+ autoMax: boolean;
62
+ display: boolean;
63
+ };
64
+ display?: undefined;
65
+ } | {
66
+ id: string;
67
+ position: string;
68
+ display: boolean;
69
+ gridLines: {
70
+ display: boolean;
71
+ };
72
+ scaleLabel: {
73
+ labelString: string;
74
+ display: boolean;
75
+ };
76
+ ticks: {
77
+ autoMin: boolean;
78
+ autoMax: boolean;
79
+ display: boolean;
80
+ };
81
+ })[];
82
+ };
83
+ };
84
+ };
85
+ data: {
86
+ color: string;
87
+ value: number;
88
+ }[];
89
+ };
90
+ };
91
+ export default _default;
@@ -0,0 +1,121 @@
1
+ import icon from '../../assets/bar-chart.png';
2
+ export default {
3
+ type: 'bar chart',
4
+ description: 'ChartJS - barchart',
5
+ icon: icon,
6
+ group: 'chartAndGauge',
7
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
+ model: {
9
+ type: 'chartjs',
10
+ top: 200,
11
+ left: 300,
12
+ width: 200,
13
+ height: 200,
14
+ chart: {
15
+ type: 'bar',
16
+ data: {
17
+ labels: [],
18
+ datasets: [
19
+ {
20
+ label: 'series 1',
21
+ type: 'bar',
22
+ data: [],
23
+ backgroundColor: 'rgb(66, 110, 164)',
24
+ borderColor: 'rgb(66, 110, 164)',
25
+ borderWidth: 0,
26
+ dataKey: 'value',
27
+ yAxisID: 'left'
28
+ }
29
+ ],
30
+ labelDataKey: 'color'
31
+ },
32
+ options: {
33
+ theme: 'dark',
34
+ xGridLine: false,
35
+ yGridLine: true,
36
+ legend: {
37
+ display: true,
38
+ position: 'top'
39
+ },
40
+ scales: {
41
+ xAxes: [
42
+ {
43
+ gridLines: {
44
+ display: false
45
+ },
46
+ scaleLabel: {
47
+ labelString: '',
48
+ display: false
49
+ },
50
+ ticks: {
51
+ display: true
52
+ }
53
+ }
54
+ ],
55
+ yAxes: [
56
+ {
57
+ id: 'left',
58
+ position: 'left',
59
+ gridLines: {
60
+ display: true
61
+ },
62
+ scaleLabel: {
63
+ labelString: '',
64
+ display: false
65
+ },
66
+ ticks: {
67
+ autoMin: true,
68
+ autoMax: true,
69
+ display: true
70
+ }
71
+ },
72
+ {
73
+ id: 'right',
74
+ position: 'right',
75
+ display: false,
76
+ gridLines: {
77
+ display: false
78
+ },
79
+ scaleLabel: {
80
+ labelString: '',
81
+ display: false
82
+ },
83
+ ticks: {
84
+ autoMin: true,
85
+ autoMax: true,
86
+ display: true
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ },
93
+ data: [
94
+ {
95
+ color: 'Red',
96
+ value: 12
97
+ },
98
+ {
99
+ color: 'Blue',
100
+ value: 19
101
+ },
102
+ {
103
+ color: 'Yellow',
104
+ value: 3
105
+ },
106
+ {
107
+ color: 'Green',
108
+ value: 5
109
+ },
110
+ {
111
+ color: 'Purple',
112
+ value: 2
113
+ },
114
+ {
115
+ color: 'Orange',
116
+ value: 3
117
+ }
118
+ ]
119
+ }
120
+ };
121
+ //# sourceMappingURL=bar-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-chart.js","sourceRoot":"","sources":["../../src/templates/bar-chart.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAA;AAE7C,eAAe;IACb,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,eAAe;IACtB,gGAAgG;IAChG,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE;YACL,IAAI,EAAE,KAAK;YACX,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,UAAU;wBACjB,IAAI,EAAE,KAAK;wBACX,IAAI,EAAE,EAAE;wBACR,eAAe,EAAE,mBAAmB;wBACpC,WAAW,EAAE,mBAAmB;wBAChC,WAAW,EAAE,CAAC;wBACd,OAAO,EAAE,OAA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EAAE,QAAQ;gBACf,KAAK,EAAE,CAAC;aACT;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,CAAC;aACT;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,CAAC;aACT;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,CAAC;aACT;SACF;KACF;CACF,CAAA","sourcesContent":["import icon from '../../assets/bar-chart.png'\n\nexport default {\n type: 'bar chart',\n description: 'ChartJS - barchart',\n icon: icon,\n group: 'chartAndGauge',\n /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n model: {\n type: 'chartjs',\n top: 200,\n left: 300,\n width: 200,\n height: 200,\n chart: {\n type: 'bar',\n data: {\n labels: [],\n datasets: [\n {\n label: 'series 1',\n type: 'bar',\n data: [],\n backgroundColor: 'rgb(66, 110, 164)',\n borderColor: 'rgb(66, 110, 164)',\n borderWidth: 0,\n dataKey: 'value',\n yAxisID: 'left'\n }\n ],\n labelDataKey: 'color'\n },\n options: {\n theme: 'dark',\n xGridLine: false,\n yGridLine: true,\n legend: {\n display: true,\n position: 'top'\n },\n scales: {\n xAxes: [\n {\n gridLines: {\n display: false\n },\n scaleLabel: {\n labelString: '',\n display: false\n },\n ticks: {\n display: true\n }\n }\n ],\n yAxes: [\n {\n id: 'left',\n position: 'left',\n gridLines: {\n display: true\n },\n scaleLabel: {\n labelString: '',\n display: false\n },\n ticks: {\n autoMin: true,\n autoMax: true,\n display: true\n }\n },\n {\n id: 'right',\n position: 'right',\n display: false,\n gridLines: {\n display: false\n },\n scaleLabel: {\n labelString: '',\n display: false\n },\n ticks: {\n autoMin: true,\n autoMax: true,\n display: true\n }\n }\n ]\n }\n }\n },\n data: [\n {\n color: 'Red',\n value: 12\n },\n {\n color: 'Blue',\n value: 19\n },\n {\n color: 'Yellow',\n value: 3\n },\n {\n color: 'Green',\n value: 5\n },\n {\n color: 'Purple',\n value: 2\n },\n {\n color: 'Orange',\n value: 3\n }\n ]\n }\n}\n"]}
@@ -0,0 +1,41 @@
1
+ declare const _default: {
2
+ type: string;
3
+ description: string;
4
+ icon: any;
5
+ group: string;
6
+ model: {
7
+ type: string;
8
+ top: number;
9
+ left: number;
10
+ width: number;
11
+ height: number;
12
+ chart: {
13
+ type: string;
14
+ data: {
15
+ labels: never[];
16
+ datasets: {
17
+ data: never[];
18
+ backgroundColor: string[];
19
+ borderWidth: number;
20
+ dataKey: string;
21
+ }[];
22
+ labelDataKey: string;
23
+ };
24
+ options: {
25
+ theme: string;
26
+ legend: {
27
+ display: boolean;
28
+ position: string;
29
+ };
30
+ animation: {
31
+ animateScale: boolean;
32
+ };
33
+ };
34
+ };
35
+ data: {
36
+ label: string;
37
+ value: number;
38
+ }[];
39
+ };
40
+ };
41
+ export default _default;
@@ -0,0 +1,55 @@
1
+ import icon from '../../assets/doughnut-chart.png';
2
+ export default {
3
+ type: 'doughnut chart',
4
+ description: 'ChartJS - doughnut',
5
+ icon: icon,
6
+ group: 'chartAndGauge',
7
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
+ model: {
9
+ type: 'chartjs',
10
+ top: 0,
11
+ left: 0,
12
+ width: 200,
13
+ height: 200,
14
+ chart: {
15
+ type: 'doughnut',
16
+ data: {
17
+ labels: [],
18
+ datasets: [
19
+ {
20
+ data: [],
21
+ backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
22
+ borderWidth: 0,
23
+ dataKey: 'value'
24
+ }
25
+ ],
26
+ labelDataKey: 'label'
27
+ },
28
+ options: {
29
+ theme: 'dark',
30
+ legend: {
31
+ display: true,
32
+ position: 'top'
33
+ },
34
+ animation: {
35
+ animateScale: true
36
+ }
37
+ }
38
+ },
39
+ data: [
40
+ {
41
+ label: 'Red',
42
+ value: 300
43
+ },
44
+ {
45
+ label: 'Blue',
46
+ value: 50
47
+ },
48
+ {
49
+ label: 'Yellow',
50
+ value: 100
51
+ }
52
+ ]
53
+ }
54
+ };
55
+ //# sourceMappingURL=doughnut-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doughnut-chart.js","sourceRoot":"","sources":["../../src/templates/doughnut-chart.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,iCAAiC,CAAA;AAElD,eAAe;IACb,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,eAAe;IACtB,gGAAgG;IAChG,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,EAAE;wBACR,eAAe,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;wBAClD,WAAW,EAAE,CAAC;wBACd,OAAO,EAAE,OAAO;qBACjB;iBACF;gBACD,YAAY,EAAE,OAAO;aACtB;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE;oBACN,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,KAAK;iBAChB;gBACD,SAAS,EAAE;oBACT,YAAY,EAAE,IAAI;iBACnB;aACF;SACF;QACD,IAAI,EAAE;YACJ;gBACE,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,GAAG;aACX;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,EAAE;aACV;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,GAAG;aACX;SACF;KACF;CACF,CAAA","sourcesContent":["import icon from '../../assets/doughnut-chart.png'\n\nexport default {\n type: 'doughnut chart',\n description: 'ChartJS - doughnut',\n icon: icon,\n group: 'chartAndGauge',\n /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n model: {\n type: 'chartjs',\n top: 0,\n left: 0,\n width: 200,\n height: 200,\n chart: {\n type: 'doughnut',\n data: {\n labels: [],\n datasets: [\n {\n data: [],\n backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],\n borderWidth: 0,\n dataKey: 'value'\n }\n ],\n labelDataKey: 'label'\n },\n options: {\n theme: 'dark',\n legend: {\n display: true,\n position: 'top'\n },\n animation: {\n animateScale: true\n }\n }\n },\n data: [\n {\n label: 'Red',\n value: 300\n },\n {\n label: 'Blue',\n value: 50\n },\n {\n label: 'Yellow',\n value: 100\n }\n ]\n }\n}\n"]}
@@ -0,0 +1,75 @@
1
+ declare const _default: {
2
+ type: string;
3
+ description: string;
4
+ icon: any;
5
+ group: string;
6
+ model: {
7
+ type: string;
8
+ top: number;
9
+ left: number;
10
+ width: number;
11
+ height: number;
12
+ chart: {
13
+ type: string;
14
+ data: {
15
+ labels: never[];
16
+ datasets: {
17
+ label: string;
18
+ data: never[];
19
+ backgroundColor: string;
20
+ borderColor: string;
21
+ borderWidth: number;
22
+ dataKey: string;
23
+ }[];
24
+ labelDataKey: string;
25
+ };
26
+ options: {
27
+ theme: string;
28
+ xGridLine: boolean;
29
+ yGridLine: boolean;
30
+ legend: {
31
+ display: boolean;
32
+ position: string;
33
+ };
34
+ scales: {
35
+ xAxes: {
36
+ gridLines: {
37
+ display: boolean;
38
+ };
39
+ scaleLabel: {
40
+ labelString: string;
41
+ display: boolean;
42
+ };
43
+ ticks: {
44
+ autoMin: boolean;
45
+ autoMax: boolean;
46
+ display: boolean;
47
+ };
48
+ }[];
49
+ yAxes: {
50
+ id: string;
51
+ position: string;
52
+ gridLines: {
53
+ display: boolean;
54
+ };
55
+ scaleLabel: {
56
+ labelString: string;
57
+ display: boolean;
58
+ };
59
+ ticks: {
60
+ autoMin: boolean;
61
+ autoMax: boolean;
62
+ display: boolean;
63
+ };
64
+ }[];
65
+ };
66
+ };
67
+ };
68
+ data: {
69
+ color: string;
70
+ value1: number;
71
+ value2: number;
72
+ }[];
73
+ };
74
+ };
75
+ export default _default;
@@ -0,0 +1,118 @@
1
+ import icon from '../../assets/horizontal-bar-chart.png';
2
+ export default {
3
+ type: 'horizontal bar chart',
4
+ description: 'ChartJS - horizontal barchart',
5
+ icon: icon,
6
+ group: 'chartAndGauge',
7
+ /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
+ model: {
9
+ type: 'chartjs',
10
+ top: 200,
11
+ left: 300,
12
+ width: 200,
13
+ height: 200,
14
+ chart: {
15
+ type: 'horizontalBar',
16
+ data: {
17
+ labels: [],
18
+ datasets: [
19
+ {
20
+ label: 'series 1',
21
+ data: [],
22
+ backgroundColor: 'rgb(66, 110, 164)',
23
+ borderColor: 'rgb(66, 110, 164)',
24
+ borderWidth: 0,
25
+ dataKey: 'value1'
26
+ },
27
+ {
28
+ label: 'series 2',
29
+ data: [],
30
+ backgroundColor: 'rgb(62, 196, 221)',
31
+ borderColor: 'rgb(62, 196, 221)',
32
+ borderWidth: 0,
33
+ dataKey: 'value2'
34
+ }
35
+ ],
36
+ labelDataKey: 'color'
37
+ },
38
+ options: {
39
+ theme: 'dark',
40
+ xGridLine: true,
41
+ yGridLine: false,
42
+ legend: {
43
+ display: true,
44
+ position: 'top'
45
+ },
46
+ scales: {
47
+ xAxes: [
48
+ {
49
+ gridLines: {
50
+ display: true
51
+ },
52
+ scaleLabel: {
53
+ labelString: '',
54
+ display: false
55
+ },
56
+ ticks: {
57
+ autoMin: true,
58
+ autoMax: true,
59
+ display: true
60
+ }
61
+ }
62
+ ],
63
+ yAxes: [
64
+ {
65
+ id: 'left',
66
+ position: 'left',
67
+ gridLines: {
68
+ display: false
69
+ },
70
+ scaleLabel: {
71
+ labelString: '',
72
+ display: false
73
+ },
74
+ ticks: {
75
+ autoMin: true,
76
+ autoMax: true,
77
+ display: true
78
+ }
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ data: [
85
+ {
86
+ color: 'Red',
87
+ value1: 12,
88
+ value2: 24
89
+ },
90
+ {
91
+ color: 'Blue',
92
+ value1: 19,
93
+ value2: 9
94
+ },
95
+ {
96
+ color: 'Yellow',
97
+ value1: 3,
98
+ value2: 6
99
+ },
100
+ {
101
+ color: 'Green',
102
+ value1: 5,
103
+ value2: 2
104
+ },
105
+ {
106
+ color: 'Purple',
107
+ value1: 2,
108
+ value2: 4
109
+ },
110
+ {
111
+ color: 'Orange',
112
+ value1: 3,
113
+ value2: 1
114
+ }
115
+ ]
116
+ }
117
+ };
118
+ //# sourceMappingURL=horizontal-bar-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"horizontal-bar-chart.js","sourceRoot":"","sources":["../../src/templates/horizontal-bar-chart.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,uCAAuC,CAAA;AAExD,eAAe;IACb,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,+BAA+B;IAC5C,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,eAAe;IACtB,gGAAgG;IAChG,KAAK,EAAE;QACL,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,KAAK,EAAE;YACL,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE;gBACV,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,UAAU;wBACjB,IAAI,EAAE,EAAE;wBACR,eAAe,EAAE,mBAAmB;wBACpC,WAAW,EAAE,mBAAmB;wBAChC,WAAW,EAAE,CAAC;wBACd,OAAO,EAAE,QAAQ;qBAClB;oBACD;wBACE,KAAK,EAAE,UAAU;wBACjB,IAAI,EAAE,EAAE;wBACR,eAAe,EAAE,mBAAmB;wBACpC,WAAW,EAAE,mBAAmB;wBAChC,WAAW,EAAE,CAAC;wBACd,O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AE,CAAC;aACV;YACD;gBACE,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;aACV;SACF;KACF;CACF,CAAA","sourcesContent":["import icon from '../../assets/horizontal-bar-chart.png'\n\nexport default {\n type: 'horizontal bar chart',\n description: 'ChartJS - horizontal barchart',\n icon: icon,\n group: 'chartAndGauge',\n /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n model: {\n type: 'chartjs',\n top: 200,\n left: 300,\n width: 200,\n height: 200,\n chart: {\n type: 'horizontalBar',\n data: {\n labels: [],\n datasets: [\n {\n label: 'series 1',\n data: [],\n backgroundColor: 'rgb(66, 110, 164)',\n borderColor: 'rgb(66, 110, 164)',\n borderWidth: 0,\n dataKey: 'value1'\n },\n {\n label: 'series 2',\n data: [],\n backgroundColor: 'rgb(62, 196, 221)',\n borderColor: 'rgb(62, 196, 221)',\n borderWidth: 0,\n dataKey: 'value2'\n }\n ],\n labelDataKey: 'color'\n },\n options: {\n theme: 'dark',\n xGridLine: true,\n yGridLine: false,\n legend: {\n display: true,\n position: 'top'\n },\n scales: {\n xAxes: [\n {\n gridLines: {\n display: true\n },\n scaleLabel: {\n labelString: '',\n display: false\n },\n ticks: {\n autoMin: true,\n autoMax: true,\n display: true\n }\n }\n ],\n yAxes: [\n {\n id: 'left',\n position: 'left',\n gridLines: {\n display: false\n },\n scaleLabel: {\n labelString: '',\n display: false\n },\n ticks: {\n autoMin: true,\n autoMax: true,\n display: true\n }\n }\n ]\n }\n }\n },\n data: [\n {\n color: 'Red',\n value1: 12,\n value2: 24\n },\n {\n color: 'Blue',\n value1: 19,\n value2: 9\n },\n {\n color: 'Yellow',\n value1: 3,\n value2: 6\n },\n {\n color: 'Green',\n value1: 5,\n value2: 2\n },\n {\n color: 'Purple',\n value1: 2,\n value2: 4\n },\n {\n color: 'Orange',\n value1: 3,\n value2: 1\n }\n ]\n }\n}\n"]}