@operato/chart 8.0.0-alpha.5 → 8.0.0-alpha.51

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 (30) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/dist/src/editors/ox-input-chart-hbar.js +6 -1
  3. package/dist/src/editors/ox-input-chart-hbar.js.map +1 -1
  4. package/dist/src/editors/ox-input-chart-mixed.js +6 -1
  5. package/dist/src/editors/ox-input-chart-mixed.js.map +1 -1
  6. package/dist/src/editors/ox-input-chart-radar.js +6 -1
  7. package/dist/src/editors/ox-input-chart-radar.js.map +1 -1
  8. package/dist/src/editors/ox-input-chart-timeseries.js +7 -1
  9. package/dist/src/editors/ox-input-chart-timeseries.js.map +1 -1
  10. package/dist/src/editors/templates/annotations.d.ts +1 -0
  11. package/dist/src/editors/templates/annotations.js +5 -0
  12. package/dist/src/editors/templates/annotations.js.map +1 -1
  13. package/dist/src/editors/templates/series.d.ts +1 -0
  14. package/dist/src/editors/templates/series.js +5 -0
  15. package/dist/src/editors/templates/series.js.map +1 -1
  16. package/dist/src/scichart/scichart-builder.js +23 -8
  17. package/dist/src/scichart/scichart-builder.js.map +1 -1
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/package.json +14 -14
  20. package/src/editors/ox-input-chart-hbar.ts +6 -1
  21. package/src/editors/ox-input-chart-mixed.ts +6 -1
  22. package/src/editors/ox-input-chart-radar.ts +6 -1
  23. package/src/editors/ox-input-chart-timeseries.ts +7 -1
  24. package/src/editors/templates/annotations.ts +8 -0
  25. package/src/editors/templates/series.ts +8 -0
  26. package/src/scichart/scichart-builder.ts +26 -8
  27. package/assets/images/icon-editor-gradient-direction.png +0 -0
  28. package/assets/images/icon-properties-label.png +0 -0
  29. package/assets/images/icon-properties-line-type.png +0 -0
  30. package/assets/images/icon-properties-table.png +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,186 @@
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
+ ## [8.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.50...v8.0.0-alpha.51) (2024-11-29)
7
+
8
+ **Note:** Version bump only for package @operato/chart
9
+
10
+
11
+
12
+
13
+
14
+ ## [8.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.49...v8.0.0-alpha.50) (2024-11-16)
15
+
16
+ **Note:** Version bump only for package @operato/chart
17
+
18
+
19
+
20
+
21
+
22
+ ## [8.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.48...v8.0.0-alpha.49) (2024-11-13)
23
+
24
+ **Note:** Version bump only for package @operato/chart
25
+
26
+
27
+
28
+
29
+
30
+ ## [8.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.47...v8.0.0-alpha.48) (2024-11-13)
31
+
32
+ **Note:** Version bump only for package @operato/chart
33
+
34
+
35
+
36
+
37
+
38
+ ## [8.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.45...v8.0.0-alpha.46) (2024-10-23)
39
+
40
+ **Note:** Version bump only for package @operato/chart
41
+
42
+
43
+
44
+
45
+
46
+ ## [8.0.0-alpha.45](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.44...v8.0.0-alpha.45) (2024-10-23)
47
+
48
+ **Note:** Version bump only for package @operato/chart
49
+
50
+
51
+
52
+
53
+
54
+ ## [8.0.0-alpha.41](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.40...v8.0.0-alpha.41) (2024-10-21)
55
+
56
+ **Note:** Version bump only for package @operato/chart
57
+
58
+
59
+
60
+
61
+
62
+ ## [8.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.36...v8.0.0-alpha.37) (2024-10-20)
63
+
64
+
65
+ ### :bug: Bug Fix
66
+
67
+ * update dev-dependencies version ([d6fe342](https://github.com/hatiolab/operato/commit/d6fe342de738c6bad3528550a862b5a1d2573161))
68
+
69
+
70
+
71
+ ## [8.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.33...v8.0.0-alpha.34) (2024-10-15)
72
+
73
+ **Note:** Version bump only for package @operato/chart
74
+
75
+
76
+
77
+
78
+
79
+ ## [8.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.32...v8.0.0-alpha.33) (2024-10-14)
80
+
81
+ **Note:** Version bump only for package @operato/chart
82
+
83
+
84
+
85
+
86
+
87
+ ## [8.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.30...v8.0.0-alpha.31) (2024-10-13)
88
+
89
+
90
+ ### :bug: Bug Fix
91
+
92
+ * missing datasets and annotations change event notification ([073b10d](https://github.com/hatiolab/operato/commit/073b10de469cd82f61cfdfb217f36eb939398288))
93
+
94
+
95
+
96
+ ## [8.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.29...v8.0.0-alpha.30) (2024-10-11)
97
+
98
+ **Note:** Version bump only for package @operato/chart
99
+
100
+
101
+
102
+
103
+
104
+ ## [8.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.28...v8.0.0-alpha.29) (2024-10-10)
105
+
106
+ **Note:** Version bump only for package @operato/chart
107
+
108
+
109
+
110
+
111
+
112
+ ## [8.0.0-alpha.27](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.26...v8.0.0-alpha.27) (2024-10-06)
113
+
114
+ **Note:** Version bump only for package @operato/chart
115
+
116
+
117
+
118
+
119
+
120
+ ## [8.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.25...v8.0.0-alpha.26) (2024-10-06)
121
+
122
+ **Note:** Version bump only for package @operato/chart
123
+
124
+
125
+
126
+
127
+
128
+ ## [8.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.20...v8.0.0-alpha.21) (2024-10-05)
129
+
130
+ **Note:** Version bump only for package @operato/chart
131
+
132
+
133
+
134
+
135
+
136
+ ## [8.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.19...v8.0.0-alpha.20) (2024-10-04)
137
+
138
+ **Note:** Version bump only for package @operato/chart
139
+
140
+
141
+
142
+
143
+
144
+ ## [8.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.18...v8.0.0-alpha.19) (2024-10-04)
145
+
146
+ **Note:** Version bump only for package @operato/chart
147
+
148
+
149
+
150
+
151
+
152
+ ## [8.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.9...v8.0.0-alpha.10) (2024-09-18)
153
+
154
+
155
+ ### :bug: Bug Fix
156
+
157
+ * remove unused files ([7c84a82](https://github.com/hatiolab/operato/commit/7c84a82e62897f0844423f6e2cb27d8f4ef0942f))
158
+
159
+
160
+
161
+ ## [8.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.8...v8.0.0-alpha.9) (2024-09-15)
162
+
163
+ **Note:** Version bump only for package @operato/chart
164
+
165
+
166
+
167
+
168
+
169
+ ## [8.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.7...v8.0.0-alpha.8) (2024-09-15)
170
+
171
+ **Note:** Version bump only for package @operato/chart
172
+
173
+
174
+
175
+
176
+
177
+ ## [8.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.5...v8.0.0-alpha.6) (2024-09-14)
178
+
179
+
180
+ ### :bug: Bug Fix
181
+
182
+ * safe Intl.DateTimeFormat(..) ([0df6827](https://github.com/hatiolab/operato/commit/0df6827b18b3819336c6518e19d63a77a0c4f919))
183
+
184
+
185
+
6
186
  ## [8.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.4...v8.0.0-alpha.5) (2024-09-12)
7
187
 
8
188
  **Note:** Version bump only for package @operato/chart
@@ -13,7 +13,12 @@ let OxInputChartHBar = class OxInputChartHBar extends InputChartAbstract {
13
13
  const configurer = this.configurer;
14
14
  return html `
15
15
  <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
16
- <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>
16
+ <ox-chart-series
17
+ .configurer=${configurer}
18
+ .chartType=${this.chartType}
19
+ value-key="datasets"
20
+ fullwidth
21
+ ></ox-chart-series>
17
22
 
18
23
  <legend><ox-i18n msgid="label.y-axes">Y Axes</ox-i18n></legend>
19
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-chart-hbar.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-hbar.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AACzC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,2BAA2B,CAAA;AAG3B,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,kBAAkB;aAC/C,WAAM,GAAG,kBAAkB,CAAC,MAAM,AAA5B,CAA4B;IAEzC,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;;qCAEsB,UAAU,eAAe,IAAI,CAAC,SAAS;;;;;8EAKE,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;;;;;;;gBAOhG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;;;;;;;;;;;gBAWtC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;;;;;;;;;;gBAUvC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC;;;;;;;mBAOzC,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS;;;;;;;;mBAQpC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;iBAWlC,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE;;;;;;;mBAO/B,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;;;;;;;;mBAQhC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;;;;QAI3C,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;YACjC,CAAC,CAAC,IAAI,CAAA;;;;;;sBAMQ,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;;WAElD;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;YACjC,CAAC,CAAC,IAAI,CAAA;;;;;;sBAMQ,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;;WAElD;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;;;gBAOA,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC;;;;;;;mBAOzC,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS;;;;;;;;mBAQpC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO;;;KAG9C,CAAA;IACH,CAAC;IAED,kBAAkB;QAChB,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAA;IAClD,CAAC;;AAzIU,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA0I5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/display-value'\n\n@customElement('ox-input-chart-hbar')\nexport class OxInputChartHBar extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"label-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"label-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${ifDefined(configurer.yAxes0.axisTitle)}\n />\n\n <label for=\"y-axes0-bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"y-axes0-bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.barSpacing\"\n value=${ifDefined(configurer.yAxes0.barSpacing)}\n />\n <label for=\"y-axes0-category-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"y-axes0-category-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.categorySpacing\"\n value=${ifDefined(configurer.yAxes0.categorySpacing)}\n />\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n .value=${configurer.xAxes0.axisTitle || ''}\n />\n\n <input\n id=\"x-axes0-axis-min-auto\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.autoMin\"\n ?checked=${configurer.xAxes0.ticks?.autoMin}\n />\n <label for=\"x-axes0-axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Axis Min Auto</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.autoMax\"\n ?checked=${configurer.xAxes0.ticks?.autoMax}\n />\n <label for=\"x-axes0-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Axis Max Auto</ox-i18n> </label>\n\n ${!configurer.xAxes0.ticks?.autoMin\n ? html`\n <label for=\"x-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Axis Min</ox-i18n> </label>\n <input\n id=\"x-axes0-ticks-min\"\n type=\"number\"\n value-key=\"xAxes0.ticks.min\"\n value=${ifDefined(configurer.xAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.xAxes0.ticks?.autoMax\n ? html`\n <label for=\"x-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Axis Max</ox-i18n> </label>\n <input\n id=\"x-axes0-ticks-max\"\n type=\"number\"\n value-key=\"xAxes0.ticks.max\"\n value=${ifDefined(configurer.xAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">Axis Step Size</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [this.getDefaultDataset('horizontalBar')]\n }\n}\n"]}
1
+ {"version":3,"file":"ox-input-chart-hbar.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-hbar.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AACzC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,2BAA2B,CAAA;AAG3B,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,kBAAkB;aAC/C,WAAM,GAAG,kBAAkB,CAAC,MAAM,AAA5B,CAA4B;IAEzC,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;;;sBAGO,UAAU;qBACX,IAAI,CAAC,SAAS;;;;;;;;8EAQ2C,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;;;;;;;gBAOhG,SA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qBAAqB,CAAC;GACxB,gBAAgB,CA+I5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/display-value'\n\n@customElement('ox-input-chart-hbar')\nexport class OxInputChartHBar extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series\n .configurer=${configurer}\n .chartType=${this.chartType}\n value-key=\"datasets\"\n fullwidth\n ></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"label-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"label-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${ifDefined(configurer.yAxes0.axisTitle)}\n />\n\n <label for=\"y-axes0-bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"y-axes0-bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.barSpacing\"\n value=${ifDefined(configurer.yAxes0.barSpacing)}\n />\n <label for=\"y-axes0-category-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"y-axes0-category-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.categorySpacing\"\n value=${ifDefined(configurer.yAxes0.categorySpacing)}\n />\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n .value=${configurer.xAxes0.axisTitle || ''}\n />\n\n <input\n id=\"x-axes0-axis-min-auto\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.autoMin\"\n ?checked=${configurer.xAxes0.ticks?.autoMin}\n />\n <label for=\"x-axes0-axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Axis Min Auto</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.autoMax\"\n ?checked=${configurer.xAxes0.ticks?.autoMax}\n />\n <label for=\"x-axes0-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Axis Max Auto</ox-i18n> </label>\n\n ${!configurer.xAxes0.ticks?.autoMin\n ? html`\n <label for=\"x-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Axis Min</ox-i18n> </label>\n <input\n id=\"x-axes0-ticks-min\"\n type=\"number\"\n value-key=\"xAxes0.ticks.min\"\n value=${ifDefined(configurer.xAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.xAxes0.ticks?.autoMax\n ? html`\n <label for=\"x-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Axis Max</ox-i18n> </label>\n <input\n id=\"x-axes0-ticks-max\"\n type=\"number\"\n value-key=\"xAxes0.ticks.max\"\n value=${ifDefined(configurer.xAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">Axis Step Size</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [this.getDefaultDataset('horizontalBar')]\n }\n}\n"]}
@@ -14,7 +14,12 @@ let OxInputChartMixed = class OxInputChartMixed extends InputChartAbstract {
14
14
  <label for="multi-axis"> <ox-i18n msgid="label.multi-axis">Multi Axis</ox-i18n> </label>
15
15
 
16
16
  <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
17
- <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>
17
+ <ox-chart-series
18
+ .configurer=${configurer}
19
+ .chartType=${this.chartType}
20
+ value-key="datasets"
21
+ fullwidth
22
+ ></ox-chart-series>
18
23
 
19
24
  <legend><ox-i18n msgid="label.x-axes">X Axes</ox-i18n></legend>
20
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-chart-mixed.js","sourceRoot":"","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,CAAC;;iBAEnD;gBACH,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;;;sBAOA,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;;;;;;;yBAO1C,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,YAAY;;;;;;;;yBAQvC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO;;;WAG/C;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;KACX,CAAA;IACH,CAAC;IAED,aAAa,CAAC,MAAW;QACvB,IAAI,YAAY,GAAG,KAAK,CAAA;QACxB,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAA;QAEtE,OAAO,YAAY,CAAA;IACrB,CAAC;;AAhOU,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAiO7B","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\nimport './templates/series'\n\n@customElement('ox-input-chart-mixed')\nexport class OxInputChartMixed extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n value=${ifDefined(configurer.xAxes0.axisTitle)}\n />\n\n ${this._hasBarSeries(configurer.value)\n ? html`\n <label for=\"bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.barSpacing\"\n value=${ifDefined(configurer.xAxes0.barSpacing)}\n />\n <label for=\"tick-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"tick-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.categorySpacing\"\n value=${ifDefined(configurer.xAxes0.categorySpacing)}\n />\n `\n : html``}\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n value=${ifDefined(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n value=${ifDefined(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n value=${ifDefined(configurer.yAxes1?.axisTitle)}\n />\n\n <input\n id=\"y-axes1-ticks-auto-min\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1?.ticks?.autoMin}\n />\n <label for=\"y-axes1-ticks-auto-min\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1?.ticks?.autoMax}\n />\n <label for=\"y-axes1-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1?.ticks?.autoMin\n ? html`\n <label for=\"y-axes1-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n value=${ifDefined(configurer.yAxes1?.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1?.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n value=${ifDefined(configurer.yAxes1?.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}\n />\n\n <input\n id=\"y-2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options?.y2ndGridLine}\n />\n <label for=\"y-2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1?.ticks?.display}\n />\n <label for=\"y-axes1-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n _hasBarSeries(config: any) {\n var hasBarSeries = false\n hasBarSeries = config.data.datasets?.some((s: any) => s.type == 'bar')\n\n return hasBarSeries\n }\n}\n"]}
1
+ {"version":3,"file":"ox-input-chart-mixed.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-mixed.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,oBAAoB,CAAA;AAGpB,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,kBAAkB;aAChD,WAAM,GAAG,kBAAkB,CAAC,MAAM,AAA5B,CAA4B;IAEzC,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;8EAC+D,UAAU,CAAC,SAAS;;;;;sBAK5E,UAAU;qBACX,IAAI,CAAC,SAAS;;;;;;;;+EAQ4C,SAAS,CAAC,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C;GACzB,iBAAiB,CAsO7B","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\nimport './templates/series'\n\n@customElement('ox-input-chart-mixed')\nexport class OxInputChartMixed extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series\n .configurer=${configurer}\n .chartType=${this.chartType}\n value-key=\"datasets\"\n fullwidth\n ></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n value=${ifDefined(configurer.xAxes0.axisTitle)}\n />\n\n ${this._hasBarSeries(configurer.value)\n ? html`\n <label for=\"bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.barSpacing\"\n value=${ifDefined(configurer.xAxes0.barSpacing)}\n />\n <label for=\"tick-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"tick-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.categorySpacing\"\n value=${ifDefined(configurer.xAxes0.categorySpacing)}\n />\n `\n : html``}\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n value=${ifDefined(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n value=${ifDefined(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n value=${ifDefined(configurer.yAxes1?.axisTitle)}\n />\n\n <input\n id=\"y-axes1-ticks-auto-min\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1?.ticks?.autoMin}\n />\n <label for=\"y-axes1-ticks-auto-min\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1?.ticks?.autoMax}\n />\n <label for=\"y-axes1-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1?.ticks?.autoMin\n ? html`\n <label for=\"y-axes1-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n value=${ifDefined(configurer.yAxes1?.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1?.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n value=${ifDefined(configurer.yAxes1?.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}\n />\n\n <input\n id=\"y-2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options?.y2ndGridLine}\n />\n <label for=\"y-2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1?.ticks?.display}\n />\n <label for=\"y-axes1-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n _hasBarSeries(config: any) {\n var hasBarSeries = false\n hasBarSeries = config.data.datasets?.some((s: any) => s.type == 'bar')\n\n return hasBarSeries\n }\n}\n"]}
@@ -11,7 +11,12 @@ let OxInputChartRadar = class OxInputChartRadar extends InputChartAbstract {
11
11
  const configurer = this.configurer;
12
12
  return html `
13
13
  <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
14
- <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>
14
+ <ox-chart-series
15
+ .configurer=${configurer}
16
+ .chartType=${this.chartType}
17
+ value-key="datasets"
18
+ fullwidth
19
+ ></ox-chart-series>
15
20
 
16
21
  <legend><ox-i18n msgid="label.axes">Axes</ox-i18n></legend>
17
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-chart-radar.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-radar.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,oBAAoB,CAAA;AAGZ,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,kBAAkB;aACxD,WAAM,GAAG,kBAAkB,CAAC,MAAM,AAA5B,CAA4B;IAEzC,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;;qCAEsB,UAAU,eAAe,IAAI,CAAC,SAAS;;;;;+EAKG,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;KAC5G,CAAA;IACH,CAAC;IAED,kBAAkB;QAChB,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;gBAClB,eAAe,EAAE,yBAAyB;gBAC1C,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,CAAC;aACf;YACD;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;gBAClB,eAAe,EAAE,yBAAyB;gBAC1C,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,CAAC;aACf;SACF,CAAA;IACH,CAAC;;AAtCkB,iBAAiB;IADrC,aAAa,CAAC,sBAAsB,CAAC;GACjB,iBAAiB,CAuCrC;eAvCoB,iBAAiB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/series'\n\n@customElement('ox-input-chart-radar')\nexport default class OxInputChartRadar extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.axes\">Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n `\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [\n {\n label: 'Radar Series 1',\n data: [10, 20, 30],\n backgroundColor: 'rgba(255, 99, 132, 0.2)',\n borderColor: 'rgba(255, 99, 132, 1)',\n borderWidth: 1,\n pointStyle: 'circle',\n pointRadius: 3\n },\n {\n label: 'Radar Series 2',\n data: [15, 25, 35],\n backgroundColor: 'rgba(54, 162, 235, 0.2)',\n borderColor: 'rgba(54, 162, 235, 1)',\n borderWidth: 1,\n pointStyle: 'circle',\n pointRadius: 3\n }\n ]\n }\n}\n"]}
1
+ {"version":3,"file":"ox-input-chart-radar.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-radar.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,oBAAoB,CAAA;AAGZ,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,kBAAkB;aACxD,WAAM,GAAG,kBAAkB,CAAC,MAAM,AAA5B,CAA4B;IAEzC,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;;;sBAGO,UAAU;qBACX,IAAI,CAAC,SAAS;;;;;;;;+EAQ4C,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;KAC5G,CAAA;IACH,CAAC;IAED,kBAAkB;QAChB,OAAO;YACL;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;gBAClB,eAAe,EAAE,yBAAyB;gBAC1C,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,CAAC;aACf;YACD;gBACE,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;gBAClB,eAAe,EAAE,yBAAyB;gBAC1C,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,QAAQ;gBACpB,WAAW,EAAE,CAAC;aACf;SACF,CAAA;IACH,CAAC;;AA3CkB,iBAAiB;IADrC,aAAa,CAAC,sBAAsB,CAAC;GACjB,iBAAiB,CA4CrC;eA5CoB,iBAAiB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/series'\n\n@customElement('ox-input-chart-radar')\nexport default class OxInputChartRadar extends InputChartAbstract {\n static styles = InputChartAbstract.styles\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series\n .configurer=${configurer}\n .chartType=${this.chartType}\n value-key=\"datasets\"\n fullwidth\n ></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.axes\">Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n `\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [\n {\n label: 'Radar Series 1',\n data: [10, 20, 30],\n backgroundColor: 'rgba(255, 99, 132, 0.2)',\n borderColor: 'rgba(255, 99, 132, 1)',\n borderWidth: 1,\n pointStyle: 'circle',\n pointRadius: 3\n },\n {\n label: 'Radar Series 2',\n data: [15, 25, 35],\n backgroundColor: 'rgba(54, 162, 235, 0.2)',\n borderColor: 'rgba(54, 162, 235, 1)',\n borderWidth: 1,\n pointStyle: 'circle',\n pointRadius: 3\n }\n ]\n }\n}\n"]}
@@ -37,7 +37,12 @@ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbst
37
37
  <label for="multi-axis"> <ox-i18n msgid="label.multi-axis">Multi Axis</ox-i18n> </label>
38
38
 
39
39
  <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
40
- <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>
40
+ <ox-chart-series
41
+ .configurer=${configurer}
42
+ .chartType=${this.chartType}
43
+ value-key="datasets"
44
+ fullwidth
45
+ ></ox-chart-series>
41
46
 
42
47
  <legend><ox-i18n msgid="label.x-axes">X Axes</ox-i18n></legend>
43
48
 
@@ -255,6 +260,7 @@ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbst
255
260
  <ox-chart-annotations
256
261
  .configurer=${configurer}
257
262
  ?collapsed=${!this.annotationExpanded}
263
+ value-key="annotations"
258
264
  fullwidth
259
265
  ></ox-chart-annotations>
260
266
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-input-chart-timeseries.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-timeseries.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,yBAAyB,CAAA;AAChC,OAAO,oBAAoB,CAAA;AAGpB,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,kBAAkB;IAAvD;;QAqBI,uBAAkB,GAAG,KAAK,CAAA;IA+OrC,CAAC;aAnQQ,WAAM,GAAG;QACd,GAAG,kBAAkB,CAAC,MAAM;QAC5B,GAAG,CAAA;;;;;;;;;;;;;;;KAeF;KACF,AAlBY,CAkBZ;IAID,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;QAElC,OAAO,IAAI,CAAA;8EAC+D,UAAU,CAAC,SAAS;;;;qCAI7D,UAAU,eAAe,IAAI,CAAC,SAAS;;;;;+EAKG,SAAS,CAAC,UAAU,CAAC,YAAY,C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AG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAA;QAEtE,OAAO,YAAY,CAAA;IACrB,CAAC;;AA9OQ;IAAR,KAAK,EAAE;kEAA2B;AArBxB,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAoQlC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/annotations'\nimport './templates/series'\n\n@customElement('ox-input-chart-timeseries')\nexport class OxInputChartTimeseries extends InputChartAbstract {\n static styles = [\n ...InputChartAbstract.styles,\n css`\n legend[collapsable] {\n box-sizing: border-box;\n width: 100%;\n }\n\n legend[collapsable] md-icon {\n float: right;\n font-size: medium;\n margin: 0;\n }\n\n [collapsed] {\n display: none;\n }\n `\n ]\n\n @state() annotationExpanded = false\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series .configurer=${configurer} .chartType=${this.chartType} fullwidth></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n value=${ifDefined(configurer.xAxes0.axisTitle)}\n />\n\n ${this._hasBarSeries(configurer.value)\n ? html`\n <label for=\"bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.barSpacing\"\n value=${ifDefined(configurer.xAxes0.barSpacing)}\n />\n <label for=\"tick-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"tick-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.categorySpacing\"\n value=${ifDefined(configurer.xAxes0.categorySpacing)}\n />\n `\n : html``}\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n value=${ifDefined(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n value=${ifDefined(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n value=${ifDefined(configurer.yAxes1?.axisTitle)}\n />\n\n <input\n id=\"y-axes1-ticks-auto-min\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1?.ticks?.autoMin}\n />\n <label for=\"y-axes1-ticks-auto-min\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1?.ticks?.autoMax}\n />\n <label for=\"y-axes1-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1?.ticks?.autoMin\n ? html`\n <label for=\"y-axes1-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n value=${ifDefined(configurer.yAxes1?.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1?.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n value=${ifDefined(configurer.yAxes1?.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}\n />\n\n <input\n id=\"y-2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options?.y2ndGridLine}\n />\n <label for=\"y-2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1?.ticks?.display}\n />\n <label for=\"y-axes1-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n\n <legend collapsable>\n <ox-i18n msgid=\"label.chart-annotation\">Annotations</ox-i18n>\n <md-icon\n @tap=${() => {\n this.annotationExpanded = !this.annotationExpanded\n }}\n >${this.annotationExpanded ? 'expand_less' : 'expand_more'}</md-icon\n >\n </legend>\n <ox-chart-annotations\n .configurer=${configurer}\n ?collapsed=${!this.annotationExpanded}\n fullwidth\n ></ox-chart-annotations>\n `\n }\n\n _hasBarSeries(config: any) {\n var hasBarSeries = false\n hasBarSeries = config.data.datasets?.some((s: any) => s.type == 'bar')\n\n return hasBarSeries\n }\n}\n"]}
1
+ {"version":3,"file":"ox-input-chart-timeseries.js","sourceRoot":"","sources":["../../../src/editors/ox-input-chart-timeseries.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,yBAAyB,CAAA;AAChC,OAAO,oBAAoB,CAAA;AAGpB,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,kBAAkB;IAAvD;;QAqBI,uBAAkB,GAAG,KAAK,CAAA;IAqPrC,CAAC;aAzQQ,WAAM,GAAG;QACd,GAAG,kBAAkB,CAAC,MAAM;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,IAAI,CAAC,kBAAkB,CAAA;QACpD,CAAC;aACE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa;;;;sBAI9C,UAAU;qBACX,CAAC,IAAI,CAAC,kBAAkB;;;;KAIxC,CAAA;IACH,CAAC;IAED,aAAa,CAAC,MAAW;QACvB,IAAI,YAAY,GAAG,KAAK,CAAA;QACxB,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,CAAC,CAAA;QAEtE,OAAO,YAAY,CAAA;IACrB,CAAC;;AApPQ;IAAR,KAAK,EAAE;kEAA2B;AArBxB,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CA0QlC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html, css } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\nimport './templates/annotations'\nimport './templates/series'\n\n@customElement('ox-input-chart-timeseries')\nexport class OxInputChartTimeseries extends InputChartAbstract {\n static styles = [\n ...InputChartAbstract.styles,\n css`\n legend[collapsable] {\n box-sizing: border-box;\n width: 100%;\n }\n\n legend[collapsable] md-icon {\n float: right;\n font-size: medium;\n margin: 0;\n }\n\n [collapsed] {\n display: none;\n }\n `\n ]\n\n @state() annotationExpanded = false\n\n subTemplate() {\n const configurer = this.configurer\n\n return html`\n <input id=\"multi-axis\" type=\"checkbox\" value-key=\"multiAxis\" ?checked=${configurer.multiAxis} />\n <label for=\"multi-axis\"> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n <ox-chart-series\n .configurer=${configurer}\n .chartType=${this.chartType}\n value-key=\"datasets\"\n fullwidth\n ></ox-chart-series>\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label for=\"series-data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"series-data-key\" type=\"text\" value-key=\"labelDataKey\" value=${ifDefined(configurer.labelDataKey)} />\n\n <label for=\"x-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"x-axes0-axis-title\"\n type=\"text\"\n value-key=\"xAxes0.axisTitle\"\n value=${ifDefined(configurer.xAxes0.axisTitle)}\n />\n\n ${this._hasBarSeries(configurer.value)\n ? html`\n <label for=\"bar-spacing\"><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n id=\"bar-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.barSpacing\"\n value=${ifDefined(configurer.xAxes0.barSpacing)}\n />\n <label for=\"tick-spacing\"><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n id=\"tick-spacing\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"xAxes0.categorySpacing\"\n value=${ifDefined(configurer.xAxes0.categorySpacing)}\n />\n `\n : html``}\n\n <input\n id=\"x-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.xGridLine\"\n ?checked=${configurer.config.options?.xGridLine}\n />\n <label for=\"x-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"x-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"xAxes0.ticks.display\"\n ?checked=${configurer.xAxes0.ticks?.display}\n />\n <label for=\"x-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label for=\"y-axes0-axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes0-axis-title\"\n type=\"text\"\n value-key=\"yAxes0.axisTitle\"\n value=${configurer.yAxes0.axisTitle || ''}\n />\n\n <input\n id=\"axis-min-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMin\"\n ?checked=${configurer.yAxes0.ticks?.autoMin}\n />\n <label for=\"axis-min-auto\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"axis-max-auto\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.autoMax\"\n ?checked=${configurer.yAxes0.ticks?.autoMax}\n />\n <label for=\"axis-max-auto\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes0.ticks?.autoMin\n ? html`\n <label for=\"y-axes0-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-min\"\n type=\"number\"\n value-key=\"yAxes0.ticks.min\"\n value=${ifDefined(configurer.yAxes0.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes0.ticks?.autoMax\n ? html`\n <label for=\"y-axes0-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-max\"\n type=\"number\"\n value-key=\"yAxes0.ticks.max\"\n value=${ifDefined(configurer.yAxes0.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes0-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes0-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes0.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes0.ticks?.stepSize)}\n />\n\n <input\n id=\"y-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.yGridLine\"\n ?checked=${configurer.config.options?.yGridLine}\n />\n <label for=\"y-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes0-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes0.ticks.display\"\n ?checked=${configurer.yAxes0.ticks?.display}\n />\n <label for=\"y-axes0-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${configurer.config.options?.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label for=\"y-axes1.axis-title\"> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input\n id=\"y-axes1.axis-title\"\n type=\"text\"\n value-key=\"yAxes1.axisTitle\"\n value=${ifDefined(configurer.yAxes1?.axisTitle)}\n />\n\n <input\n id=\"y-axes1-ticks-auto-min\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMin\"\n ?checked=${configurer.yAxes1?.ticks?.autoMin}\n />\n <label for=\"y-axes1-ticks-auto-min\"> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-auto-max\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.autoMax\"\n ?checked=${configurer.yAxes1?.ticks?.autoMax}\n />\n <label for=\"y-axes1-ticks-auto-max\"> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!configurer.yAxes1?.ticks?.autoMin\n ? html`\n <label for=\"y-axes1-ticks-min\"> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-min\"\n type=\"number\"\n value-key=\"yAxes1.ticks.min\"\n value=${ifDefined(configurer.yAxes1?.ticks?.min)}\n />\n `\n : html``}\n ${!configurer.yAxes1?.ticks?.autoMax\n ? html`\n <label for=\"y-axes1-ticks-max\"> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-max\"\n type=\"number\"\n value-key=\"yAxes1.ticks.max\"\n value=${ifDefined(configurer.yAxes1?.ticks?.max)}\n />\n `\n : html``}\n\n <label for=\"y-axes1-ticks-step-size\"> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input\n id=\"y-axes1-ticks-step-size\"\n type=\"number\"\n value-key=\"yAxes1.ticks.stepSize\"\n value=${ifDefined(configurer.yAxes1?.ticks?.stepSize)}\n />\n\n <input\n id=\"y-2nd-grid-line\"\n type=\"checkbox\"\n value-key=\"value.options.y2ndGridLine\"\n ?checked=${configurer.config.options?.y2ndGridLine}\n />\n <label for=\"y-2nd-grid-line\"> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input\n id=\"y-axes1-ticks-display\"\n type=\"checkbox\"\n value-key=\"yAxes1.ticks.display\"\n ?checked=${configurer.yAxes1?.ticks?.display}\n />\n <label for=\"y-axes1-ticks-display\"> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n\n <legend collapsable>\n <ox-i18n msgid=\"label.chart-annotation\">Annotations</ox-i18n>\n <md-icon\n @tap=${() => {\n this.annotationExpanded = !this.annotationExpanded\n }}\n >${this.annotationExpanded ? 'expand_less' : 'expand_more'}</md-icon\n >\n </legend>\n <ox-chart-annotations\n .configurer=${configurer}\n ?collapsed=${!this.annotationExpanded}\n value-key=\"annotations\"\n fullwidth\n ></ox-chart-annotations>\n `\n }\n\n _hasBarSeries(config: any) {\n var hasBarSeries = false\n hasBarSeries = config.data.datasets?.some((s: any) => s.type == 'bar')\n\n return hasBarSeries\n }\n}\n"]}
@@ -9,6 +9,7 @@ export declare class AnnotationsTemplate extends LitElement {
9
9
  annotationsTabNavLeftButton: MdIcon;
10
10
  annotationsTabNavRightButton: MdIcon;
11
11
  protected updated(_changedProperties: PropertyValues): void;
12
+ get value(): OperatoChart.Annotation[];
12
13
  render(): import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/keyed").Keyed>;
13
14
  private _renderTabs;
14
15
  private _renderAnnotationForm;
@@ -12,6 +12,9 @@ let AnnotationsTemplate = class AnnotationsTemplate extends LitElement {
12
12
  this.requestUpdate();
13
13
  }
14
14
  }
15
+ get value() {
16
+ return this.configurer.annotations;
17
+ }
15
18
  render() {
16
19
  return keyed(this.configurer.currentAnnotationIndex, html `
17
20
  <div id="annotations-properties-container" fullwidth>
@@ -192,10 +195,12 @@ let AnnotationsTemplate = class AnnotationsTemplate extends LitElement {
192
195
  }
193
196
  _removeAnnotation(index) {
194
197
  this.configurer.removeAnnotation(index);
198
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
195
199
  this.requestUpdate();
196
200
  }
197
201
  _addAnnotation() {
198
202
  this.configurer.addAnnotation();
203
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
199
204
  this.requestUpdate();
200
205
  }
201
206
  _onWheelScroll(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../../src/editors/templates/annotations.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAMxC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU;IACjD,gBAAgB;QACd,OAAO,IAAI,CAAA;IACb,CAAC;IAQS,OAAO,CAAC,kBAAkC;QAClD,IAAI,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,aAAa,EAAE,CAAA;QACtB,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,CACV,IAAI,CAAC,UAAU,CAAC,sBAAsB,EACtC,IAAI,CAAA;;oDAE0C,IAAI,CAAC,cAAc;mEACJ,IAAI,CAAC,WAAW;0DACzB,I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AC,CAAA;YAC7C,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QAC/C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,WAAW,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;YAC1F,gBAAgB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;YAC5C,iBAAiB,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;QAChD,CAAC;aAAM,CAAC;YACN,gBAAgB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;YAC5C,iBAAiB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;QAC/C,CAAC;IACH,CAAC;CACF,CAAA;AA/Q6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAwB;AAEvB;IAA3B,KAAK,CAAC,mBAAmB,CAAC;4DAA8B;AACd;IAA1C,KAAK,CAAC,kCAAkC,CAAC;wEAAqC;AACnC;IAA3C,KAAK,CAAC,mCAAmC,CAAC;yEAAsC;AATtE,mBAAmB;IAD/B,aAAa,CAAC,sBAAsB,CAAC;GACzB,mBAAmB,CAoR/B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { LitElement, html, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { Configurer } from '../configurer'\n\n@customElement('ox-chart-annotations')\nexport class AnnotationsTemplate extends LitElement {\n createRenderRoot() {\n return this\n }\n\n @property({ type: Object }) configurer!: Configurer\n\n @query('#annotations-tabs') annotationsTabs!: HTMLElement\n @query('#annotations-tab-nav-left-button') annotationsTabNavLeftButton!: MdIcon\n @query('#annotations-tab-nav-right-button') annotationsTabNavRightButton!: MdIcon\n\n protected updated(_changedProperties: PropertyValues): void {\n if (_changedProperties.has('configurer')) {\n this.requestUpdate()\n }\n }\n\n render() {\n return keyed(\n this.configurer.currentAnnotationIndex,\n html`\n <div id=\"annotations-properties-container\" fullwidth>\n <div id=\"annotations-tab-header\" @wheel=${this._onWheelScroll}>\n <md-icon id=\"annotations-tab-nav-left-button\" @click=${this._scrollLeft}>chevron_left</md-icon>\n <div id=\"annotations-tabs\" active-tab-index=${this.configurer.currentAnnotationIndex} fit-container>\n ${this._renderTabs()}\n </div>\n <md-icon id=\"annotations-tab-nav-right-button\" @click=${this._scrollRight}>chevron_right</md-icon>\n </div>\n <div id=\"add-annotation-button-container\">\n <md-icon id=\"add-annotation-button\" @click=${this._addAnnotation}>add</md-icon>\n </div>\n ${this._renderAnnotationForm()}\n </div>\n `\n )\n }\n\n private _renderTabs() {\n return this.configurer.annotations.map(\n (annotation: OperatoChart.Annotation, index: number) => html`\n <div\n data-annotation=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index === this.configurer.currentAnnotationIndex}\n @click=${() => this._selectTab(index)}\n >\n ${index + 1}\n ${this.configurer.annotations.length > 0 && this.configurer.currentAnnotationIndex === index\n ? html`<md-icon @click=${() => this._removeAnnotation(index)}>close</md-icon>`\n : html``}\n </div>\n `\n )\n }\n\n private _renderAnnotationForm() {\n const currentAnnotation =\n this.configurer.currentAnnotationIndex >= 0\n ? this.configurer.annotations[this.configurer.currentAnnotationIndex]\n : undefined\n\n if (!currentAnnotation) {\n return html`<p>No annotations available. Add one using the button above.</p>`\n }\n\n return html`\n <div class=\"tab-content\">\n <label for=\"annotation-type\"> <ox-i18n msgid=\"label.chart-annotation-type\">Type</ox-i18n> </label>\n <select\n id=\"annotation-type\"\n class=\"select-content\"\n value-key=\"annotation.type\"\n .value=${currentAnnotation!.type || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"line\">Line</option>\n <option value=\"text\">Text</option>\n <option value=\"box\">Box</option>\n <option value=\"horizontalLine\">Horizontal Line</option>\n <option value=\"verticalLine\">Vertical Line</option>\n </select>\n\n <label for=\"annotation-x1\">X1</label>\n <input\n id=\"annotation-x1\"\n type=\"number\"\n value-key=\"annotation.x1\"\n .value=${String(currentAnnotation!.x1 || 0)}\n />\n\n <label for=\"annotation-y1\">Y1</label>\n <input\n id=\"annotation-y1\"\n type=\"number\"\n value-key=\"annotation.y1\"\n .value=${String(currentAnnotation!.y1 || 0)}\n />\n\n <label for=\"annotation-x2\">X2</label>\n <input\n id=\"annotation-x2\"\n type=\"number\"\n value-key=\"annotation.x2\"\n .value=${String(currentAnnotation!.x2 || 0)}\n />\n\n <label for=\"annotation-y2\">Y2</label>\n <input\n id=\"annotation-y2\"\n type=\"number\"\n value-key=\"annotation.y2\"\n .value=${String(currentAnnotation!.y2 || 0)}\n />\n\n <label for=\"annotation-stroke\"> <ox-i18n msgid=\"label.stroke-style\">Stroke Style</ox-i18n> </label>\n <ox-input-color\n id=\"annotation-stroke\"\n value-key=\"annotation.stroke\"\n .value=${currentAnnotation!.stroke}\n ></ox-input-color>\n\n <label for=\"annotation-stroke-thickness\">\n <ox-i18n msgid=\"label.stroke-thickness\">Stroke Thickness</ox-i18n>\n </label>\n <input\n id=\"annotation-stroke-thickness\"\n type=\"number\"\n value-key=\"annotation.strokeThickness\"\n .value=${String(currentAnnotation!.strokeThickness || 1)}\n />\n\n <label for=\"annotation-fill\"> <ox-i18n msgid=\"label.fill\">Fill</ox-i18n> </label>\n <ox-input-color\n id=\"annotation-fill\"\n value-key=\"annotation.fill\"\n .value=${currentAnnotation!.fill}\n ></ox-input-color>\n\n <label for=\"annotation-text\"> <ox-i18n msgid=\"label.annotation-text\">Text</ox-i18n> </label>\n <input id=\"annotation-text\" type=\"text\" value-key=\"annotation.text\" .value=${currentAnnotation!.text || ''} />\n\n <label for=\"annotation-horizontal-anchor\">\n <ox-i18n msgid=\"label.horizontal-anchor\">Horizontal Anchor</ox-i18n>\n </label>\n <select\n id=\"annotation-horizontal-anchor\"\n class=\"select-content\"\n value-key=\"annotation.horizontalAnchorPoint\"\n .value=${currentAnnotation!.horizontalAnchorPoint || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"Left\">Left</option>\n <option value=\"Center\">Center</option>\n <option value=\"Right\">Right</option>\n </select>\n\n <label for=\"annotation-vertical-anchor\">\n <ox-i18n msgid=\"label.vertical-anchor\">Vertical Anchor</ox-i18n>\n </label>\n <select\n id=\"annotation-vertical-anchor\"\n class=\"select-content\"\n value-key=\"annotation.verticalAnchorPoint\"\n .value=${currentAnnotation!.verticalAnchorPoint || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"Top\">Top</option>\n <option value=\"Center\">Center</option>\n <option value=\"Bottom\">Bottom</option>\n </select>\n\n <label for=\"annotation-x-coordinate-mode\">X Coordinate Mode</label>\n <select\n id=\"annotation-x-coordinate-mode\"\n class=\"select-content\"\n value-key=\"annotation.xCoordinateMode\"\n .value=${currentAnnotation!.xCoordinateMode || 'DataValue'}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"DataValue\">DataValue</option>\n <option value=\"Pixel\">Pixel</option>\n <option value=\"Relative\">Relative</option>\n </select>\n\n <label for=\"annotation-y-coordinate-mode\">Y Coordinate Mode</label>\n <select\n id=\"annotation-y-coordinate-mode\"\n class=\"select-content\"\n value-key=\"annotation.yCoordinateMode\"\n .value=${currentAnnotation!.yCoordinateMode || 'DataValue'}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"DataValue\">DataValue</option>\n <option value=\"Pixel\">Pixel</option>\n <option value=\"Relative\">Relative</option>\n </select>\n </div>\n `\n }\n\n private _selectTab(index: number) {\n this.configurer.setCurrentAnnotationIndex(index)\n this.requestUpdate()\n }\n\n private _removeAnnotation(index: number) {\n this.configurer.removeAnnotation(index)\n this.requestUpdate()\n }\n\n private _addAnnotation() {\n this.configurer.addAnnotation()\n this.requestUpdate()\n }\n\n private _onWheelScroll(event: WheelEvent) {\n const tabContainer = this.annotationsTabs\n if (tabContainer) {\n event.preventDefault()\n\n tabContainer.scrollLeft += event.deltaY\n\n this._onTabScroll()\n }\n }\n\n private _scrollLeft() {\n this._scrollTabContainer(-1)\n }\n\n private _scrollRight() {\n this._scrollTabContainer(1)\n }\n\n private _scrollTabContainer(direction: number) {\n const tabContainer = this.renderRoot!.querySelector<HTMLElement>('#annotations-tabs')\n if (tabContainer) {\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft += direction * tabContainer.clientWidth\n }\n\n setTimeout(() => {\n tabContainer!.style.scrollBehavior = 'auto'\n this._onTabScroll()\n }, 300)\n }\n\n private _onTabScroll() {\n let tabContainer: HTMLElement | null | undefined\n let tabNavLeftButton: MdIcon\n let tabNavRightButton: MdIcon\n\n tabContainer = this.annotationsTabs\n tabNavLeftButton = this.annotationsTabNavLeftButton\n tabNavRightButton = this.annotationsTabNavRightButton\n\n if (!tabContainer) {\n return\n }\n\n if (tabContainer.clientWidth == tabContainer.scrollWidth) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.setAttribute('disabled', '')\n } else if (tabContainer.scrollLeft <= 0) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.removeAttribute('disabled')\n } else if (tabContainer.scrollLeft + tabContainer.clientWidth >= tabContainer.scrollWidth) {\n tabNavLeftButton.removeAttribute('disabled')\n tabNavRightButton.setAttribute('disabled', '')\n } else {\n tabNavLeftButton.removeAttribute('disabled')\n tabNavRightButton.removeAttribute('disabled')\n }\n }\n}\n"]}
1
+ {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../../../src/editors/templates/annotations.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAMxC,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU;IACjD,gBAAgB;QACd,OAAO,IAAI,CAAA;IACb,CAAC;IAQS,O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AC;wEAAqC;AACnC;IAA3C,KAAK,CAAC,mCAAmC,CAAC;yEAAsC;AATtE,mBAAmB;IAD/B,aAAa,CAAC,sBAAsB,CAAC;GACzB,mBAAmB,CA4R/B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { LitElement, html, PropertyValues } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { Configurer } from '../configurer'\n\n@customElement('ox-chart-annotations')\nexport class AnnotationsTemplate extends LitElement {\n createRenderRoot() {\n return this\n }\n\n @property({ type: Object }) configurer!: Configurer\n\n @query('#annotations-tabs') annotationsTabs!: HTMLElement\n @query('#annotations-tab-nav-left-button') annotationsTabNavLeftButton!: MdIcon\n @query('#annotations-tab-nav-right-button') annotationsTabNavRightButton!: MdIcon\n\n protected updated(_changedProperties: PropertyValues): void {\n if (_changedProperties.has('configurer')) {\n this.requestUpdate()\n }\n }\n\n get value() {\n return this.configurer.annotations\n }\n\n render() {\n return keyed(\n this.configurer.currentAnnotationIndex,\n html`\n <div id=\"annotations-properties-container\" fullwidth>\n <div id=\"annotations-tab-header\" @wheel=${this._onWheelScroll}>\n <md-icon id=\"annotations-tab-nav-left-button\" @click=${this._scrollLeft}>chevron_left</md-icon>\n <div id=\"annotations-tabs\" active-tab-index=${this.configurer.currentAnnotationIndex} fit-container>\n ${this._renderTabs()}\n </div>\n <md-icon id=\"annotations-tab-nav-right-button\" @click=${this._scrollRight}>chevron_right</md-icon>\n </div>\n <div id=\"add-annotation-button-container\">\n <md-icon id=\"add-annotation-button\" @click=${this._addAnnotation}>add</md-icon>\n </div>\n ${this._renderAnnotationForm()}\n </div>\n `\n )\n }\n\n private _renderTabs() {\n return this.configurer.annotations.map(\n (annotation: OperatoChart.Annotation, index: number) => html`\n <div\n data-annotation=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index === this.configurer.currentAnnotationIndex}\n @click=${() => this._selectTab(index)}\n >\n ${index + 1}\n ${this.configurer.annotations.length > 0 && this.configurer.currentAnnotationIndex === index\n ? html`<md-icon @click=${() => this._removeAnnotation(index)}>close</md-icon>`\n : html``}\n </div>\n `\n )\n }\n\n private _renderAnnotationForm() {\n const currentAnnotation =\n this.configurer.currentAnnotationIndex >= 0\n ? this.configurer.annotations[this.configurer.currentAnnotationIndex]\n : undefined\n\n if (!currentAnnotation) {\n return html`<p>No annotations available. Add one using the button above.</p>`\n }\n\n return html`\n <div class=\"tab-content\">\n <label for=\"annotation-type\"> <ox-i18n msgid=\"label.chart-annotation-type\">Type</ox-i18n> </label>\n <select\n id=\"annotation-type\"\n class=\"select-content\"\n value-key=\"annotation.type\"\n .value=${currentAnnotation!.type || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"line\">Line</option>\n <option value=\"text\">Text</option>\n <option value=\"box\">Box</option>\n <option value=\"horizontalLine\">Horizontal Line</option>\n <option value=\"verticalLine\">Vertical Line</option>\n </select>\n\n <label for=\"annotation-x1\">X1</label>\n <input\n id=\"annotation-x1\"\n type=\"number\"\n value-key=\"annotation.x1\"\n .value=${String(currentAnnotation!.x1 || 0)}\n />\n\n <label for=\"annotation-y1\">Y1</label>\n <input\n id=\"annotation-y1\"\n type=\"number\"\n value-key=\"annotation.y1\"\n .value=${String(currentAnnotation!.y1 || 0)}\n />\n\n <label for=\"annotation-x2\">X2</label>\n <input\n id=\"annotation-x2\"\n type=\"number\"\n value-key=\"annotation.x2\"\n .value=${String(currentAnnotation!.x2 || 0)}\n />\n\n <label for=\"annotation-y2\">Y2</label>\n <input\n id=\"annotation-y2\"\n type=\"number\"\n value-key=\"annotation.y2\"\n .value=${String(currentAnnotation!.y2 || 0)}\n />\n\n <label for=\"annotation-stroke\"> <ox-i18n msgid=\"label.stroke-style\">Stroke Style</ox-i18n> </label>\n <ox-input-color\n id=\"annotation-stroke\"\n value-key=\"annotation.stroke\"\n .value=${currentAnnotation!.stroke}\n ></ox-input-color>\n\n <label for=\"annotation-stroke-thickness\">\n <ox-i18n msgid=\"label.stroke-thickness\">Stroke Thickness</ox-i18n>\n </label>\n <input\n id=\"annotation-stroke-thickness\"\n type=\"number\"\n value-key=\"annotation.strokeThickness\"\n .value=${String(currentAnnotation!.strokeThickness || 1)}\n />\n\n <label for=\"annotation-fill\"> <ox-i18n msgid=\"label.fill\">Fill</ox-i18n> </label>\n <ox-input-color\n id=\"annotation-fill\"\n value-key=\"annotation.fill\"\n .value=${currentAnnotation!.fill}\n ></ox-input-color>\n\n <label for=\"annotation-text\"> <ox-i18n msgid=\"label.annotation-text\">Text</ox-i18n> </label>\n <input id=\"annotation-text\" type=\"text\" value-key=\"annotation.text\" .value=${currentAnnotation!.text || ''} />\n\n <label for=\"annotation-horizontal-anchor\">\n <ox-i18n msgid=\"label.horizontal-anchor\">Horizontal Anchor</ox-i18n>\n </label>\n <select\n id=\"annotation-horizontal-anchor\"\n class=\"select-content\"\n value-key=\"annotation.horizontalAnchorPoint\"\n .value=${currentAnnotation!.horizontalAnchorPoint || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"Left\">Left</option>\n <option value=\"Center\">Center</option>\n <option value=\"Right\">Right</option>\n </select>\n\n <label for=\"annotation-vertical-anchor\">\n <ox-i18n msgid=\"label.vertical-anchor\">Vertical Anchor</ox-i18n>\n </label>\n <select\n id=\"annotation-vertical-anchor\"\n class=\"select-content\"\n value-key=\"annotation.verticalAnchorPoint\"\n .value=${currentAnnotation!.verticalAnchorPoint || ''}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"Top\">Top</option>\n <option value=\"Center\">Center</option>\n <option value=\"Bottom\">Bottom</option>\n </select>\n\n <label for=\"annotation-x-coordinate-mode\">X Coordinate Mode</label>\n <select\n id=\"annotation-x-coordinate-mode\"\n class=\"select-content\"\n value-key=\"annotation.xCoordinateMode\"\n .value=${currentAnnotation!.xCoordinateMode || 'DataValue'}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"DataValue\">DataValue</option>\n <option value=\"Pixel\">Pixel</option>\n <option value=\"Relative\">Relative</option>\n </select>\n\n <label for=\"annotation-y-coordinate-mode\">Y Coordinate Mode</label>\n <select\n id=\"annotation-y-coordinate-mode\"\n class=\"select-content\"\n value-key=\"annotation.yCoordinateMode\"\n .value=${currentAnnotation!.yCoordinateMode || 'DataValue'}\n >\n <option value=\"\">&nbsp;</option>\n <option value=\"DataValue\">DataValue</option>\n <option value=\"Pixel\">Pixel</option>\n <option value=\"Relative\">Relative</option>\n </select>\n </div>\n `\n }\n\n private _selectTab(index: number) {\n this.configurer.setCurrentAnnotationIndex(index)\n this.requestUpdate()\n }\n\n private _removeAnnotation(index: number) {\n this.configurer.removeAnnotation(index)\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n this.requestUpdate()\n }\n\n private _addAnnotation() {\n this.configurer.addAnnotation()\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n this.requestUpdate()\n }\n\n private _onWheelScroll(event: WheelEvent) {\n const tabContainer = this.annotationsTabs\n if (tabContainer) {\n event.preventDefault()\n\n tabContainer.scrollLeft += event.deltaY\n\n this._onTabScroll()\n }\n }\n\n private _scrollLeft() {\n this._scrollTabContainer(-1)\n }\n\n private _scrollRight() {\n this._scrollTabContainer(1)\n }\n\n private _scrollTabContainer(direction: number) {\n const tabContainer = this.renderRoot!.querySelector<HTMLElement>('#annotations-tabs')\n if (tabContainer) {\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft += direction * tabContainer.clientWidth\n }\n\n setTimeout(() => {\n tabContainer!.style.scrollBehavior = 'auto'\n this._onTabScroll()\n }, 300)\n }\n\n private _onTabScroll() {\n let tabContainer: HTMLElement | null | undefined\n let tabNavLeftButton: MdIcon\n let tabNavRightButton: MdIcon\n\n tabContainer = this.annotationsTabs\n tabNavLeftButton = this.annotationsTabNavLeftButton\n tabNavRightButton = this.annotationsTabNavRightButton\n\n if (!tabContainer) {\n return\n }\n\n if (tabContainer.clientWidth == tabContainer.scrollWidth) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.setAttribute('disabled', '')\n } else if (tabContainer.scrollLeft <= 0) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.removeAttribute('disabled')\n } else if (tabContainer.scrollLeft + tabContainer.clientWidth >= tabContainer.scrollWidth) {\n tabNavLeftButton.removeAttribute('disabled')\n tabNavRightButton.setAttribute('disabled', '')\n } else {\n tabNavLeftButton.removeAttribute('disabled')\n tabNavRightButton.removeAttribute('disabled')\n }\n }\n}\n"]}
@@ -12,6 +12,7 @@ export declare class MultipleSeriesTemplate extends LitElement {
12
12
  seriesTabNavLeftButton: MdIcon;
13
13
  seriesTabNavRightButton: MdIcon;
14
14
  protected updated(_changedProperties: PropertyValues): void;
15
+ get value(): OperatoChart.Dataset[];
15
16
  render(): import("lit-html/directive").DirectiveResult<typeof import("lit-html/directives/keyed").Keyed>;
16
17
  private _renderTabs;
17
18
  private _renderSeriesForm;
@@ -14,6 +14,9 @@ let MultipleSeriesTemplate = class MultipleSeriesTemplate extends LitElement {
14
14
  this.requestUpdate();
15
15
  }
16
16
  }
17
+ get value() {
18
+ return this.configurer.datasets;
19
+ }
17
20
  render() {
18
21
  return keyed(this.configurer.currentSeriesIndex, html `
19
22
  <div id="series-properties-container" fullwidth>
@@ -187,6 +190,7 @@ let MultipleSeriesTemplate = class MultipleSeriesTemplate extends LitElement {
187
190
  }
188
191
  _removeSeries(index) {
189
192
  this.configurer.removeSeries(index);
193
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
190
194
  this.requestUpdate();
191
195
  }
192
196
  _addSeries() {
@@ -204,6 +208,7 @@ let MultipleSeriesTemplate = class MultipleSeriesTemplate extends LitElement {
204
208
  lastSeriesColor
205
209
  });
206
210
  this.configurer.addSeries(seriesModel);
211
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
207
212
  this.requestUpdate();
208
213
  }
209
214
  _onWheelScroll(event) {