@operato/scene-chartjs 2.0.0-alpha.0 → 2.0.0-alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +66 -0
- package/dist/config-converter.js +2 -2
- package/dist/config-converter.js.map +1 -1
- package/dist/editors/property-editor-chartjs-abstract.d.ts +3 -3
- package/dist/editors/property-editor-chartjs-hbar.d.ts +4 -3
- package/dist/editors/property-editor-chartjs-hbar.js +14 -14
- package/dist/editors/property-editor-chartjs-hbar.js.map +1 -1
- package/dist/editors/property-editor-chartjs-mixed.d.ts +1 -1
- package/dist/editors/property-editor-chartjs-multi-series-abstract.d.ts +6 -6
- package/dist/editors/property-editor-chartjs-multi-series-abstract.js +13 -14
- package/dist/editors/property-editor-chartjs-multi-series-abstract.js.map +1 -1
- package/dist/editors/property-editor-chartjs-pie.d.ts +1 -1
- package/dist/editors/property-editor-chartjs-radar.d.ts +1 -1
- package/dist/editors/property-editor-chartjs.d.ts +1 -1
- package/dist/ox-chart.d.ts +1 -1
- package/dist/ox-chart.js +4 -2
- package/dist/ox-chart.js.map +1 -1
- package/dist/templates/bar-chart.js +1 -1
- package/dist/templates/bar-chart.js.map +1 -1
- package/dist/templates/doughnut-chart.js +1 -1
- package/dist/templates/doughnut-chart.js.map +1 -1
- package/dist/templates/horizontal-bar-chart.js +1 -1
- package/dist/templates/horizontal-bar-chart.js.map +1 -1
- package/dist/templates/line-chart.js +1 -1
- package/dist/templates/line-chart.js.map +1 -1
- package/dist/templates/mixed-chart.js +1 -1
- package/dist/templates/mixed-chart.js.map +1 -1
- package/dist/templates/pie-chart.js +1 -1
- package/dist/templates/pie-chart.js.map +1 -1
- package/dist/templates/polar-area-chart.js +1 -1
- package/dist/templates/polar-area-chart.js.map +1 -1
- package/dist/templates/radar-chart.js +1 -1
- package/dist/templates/radar-chart.js.map +1 -1
- package/package.json +6 -6
- package/schema.graphql +3969 -0
- package/src/config-converter.ts +3 -3
- package/src/editors/property-editor-chartjs-hbar.ts +14 -14
- package/src/editors/property-editor-chartjs-multi-series-abstract.ts +16 -17
- package/src/ox-chart.ts +3 -2
- package/src/templates/bar-chart.ts +1 -1
- package/src/templates/doughnut-chart.ts +1 -1
- package/src/templates/horizontal-bar-chart.ts +1 -1
- package/src/templates/line-chart.ts +1 -1
- package/src/templates/mixed-chart.ts +1 -1
- package/src/templates/pie-chart.ts +1 -1
- package/src/templates/polar-area-chart.ts +1 -1
- package/src/templates/radar-chart.ts +1 -1
- package/translations/en.json +9 -0
- package/translations/ja.json +17 -0
- package/translations/ko.json +9 -0
- package/translations/ms.json +14 -5
- package/translations/zh.json +11 -2
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,72 @@
|
|
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
|
+
## [2.0.0-alpha.12](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-05-11)
|
7
|
+
|
8
|
+
|
9
|
+
### :bug: Bug Fix
|
10
|
+
|
11
|
+
* apply material design 3 ([1aa1c23](https://github.com/things-scene/operato-scene/commit/1aa1c23a0a90100c6096705a09bebad9885e39e0))
|
12
|
+
* ignore 'cache' folder for git and npm ([d70f811](https://github.com/things-scene/operato-scene/commit/d70f8118ff3e9248f80aa9435d6e6cbb8aacfcaf))
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## [2.0.0-alpha.9](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2024-04-11)
|
17
|
+
|
18
|
+
|
19
|
+
### :bug: Bug Fix
|
20
|
+
|
21
|
+
* things-factory@7.0.1 ([a9f4c18](https://github.com/things-scene/operato-scene/commit/a9f4c1873b80c540e4c2e16649e127ccffcf9a4c))
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## [2.0.0-alpha.8](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2024-03-29)
|
26
|
+
|
27
|
+
|
28
|
+
### :bug: Bug Fix
|
29
|
+
|
30
|
+
* upgrade lit ([87e6494](https://github.com/things-scene/operato-scene/commit/87e6494e02a74ec768d0695089aea36184afe572))
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
## [2.0.0-alpha.6](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-03-24)
|
35
|
+
|
36
|
+
|
37
|
+
### :bug: Bug Fix
|
38
|
+
|
39
|
+
* translation ([266d423](https://github.com/things-scene/operato-scene/commit/266d423d9d6992464f45a437acc90ccf8ed33bf6))
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
## [2.0.0-alpha.5](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-03-21)
|
44
|
+
|
45
|
+
|
46
|
+
### :bug: Bug Fix
|
47
|
+
|
48
|
+
* 컴포넌트 명 다국어 ([fbc26d9](https://github.com/things-scene/operato-scene/commit/fbc26d9fb24e858541598ba55e2b8d33f2df8d8a))
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
## [2.0.0-alpha.4](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-03-21)
|
53
|
+
|
54
|
+
|
55
|
+
### :bug: Bug Fix
|
56
|
+
|
57
|
+
* 컴포넌트 명 다국어 ([3616a52](https://github.com/things-scene/operato-scene/commit/3616a52e2f0268c83c976c6b4deeffc016f91e46))
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
## [2.0.0-alpha.2](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-17)
|
62
|
+
|
63
|
+
|
64
|
+
### :bug: Bug Fix
|
65
|
+
|
66
|
+
* toLocaleString 로변경 ([a9de251](https://github.com/things-scene/operato-scene/commit/a9de251cb54715bc2be5a67a262738dfb21888ae))
|
67
|
+
* tooltip 기본값 true로 맞추기 ([a3db921](https://github.com/things-scene/operato-scene/commit/a3db9217a6481a01bef01d0b1a669a92db216d46))
|
68
|
+
* 차트 숫자 , 변환 ([e089a88](https://github.com/things-scene/operato-scene/commit/e089a88bb381b3131f9f15c64a1e5966b8e66b10))
|
69
|
+
|
70
|
+
|
71
|
+
|
6
72
|
## [2.0.0-alpha.0](https://github.com/things-scene/operato-scene/compare/v1.3.9...v2.0.0-alpha.0) (2024-01-14)
|
7
73
|
|
8
74
|
|
package/dist/config-converter.js
CHANGED
@@ -331,11 +331,11 @@ function _setTooltipCallback(tooltips) {
|
|
331
331
|
var label = datasetLabel || ((_d = data.labels) === null || _d === void 0 ? void 0 : _d[tooltipItem.index || 0]);
|
332
332
|
var toNumValue = Number(value);
|
333
333
|
if (!isNaN(toNumValue)) {
|
334
|
-
value = toNumValue;
|
334
|
+
value = toNumValue.toLocaleString();
|
335
335
|
}
|
336
336
|
var prefix = ((_e = data.datasets) === null || _e === void 0 ? void 0 : _e[tooltipItem.datasetIndex || 0].valuePrefix) || '';
|
337
337
|
var suffix = ((_f = data.datasets) === null || _f === void 0 ? void 0 : _f[tooltipItem.datasetIndex || 0].valueSuffix) || '';
|
338
|
-
return `${label}: ${prefix +
|
338
|
+
return `${label}: ${prefix + value + suffix}`;
|
339
339
|
};
|
340
340
|
}
|
341
341
|
//# sourceMappingURL=config-converter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config-converter.js","sourceRoot":"","sources":["../src/config-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,UAAU,gBAAgB,CAAC,KAA6B;IAC5D,IAAI,CAAC,KAAK;QAAE,OAAM;IAElB,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;IAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;IAClC,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,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AAE,KAAK,CAAA;QACvE,IAAI,KAAK,GAAG,YAAY,KAAI,MAAA,IAAI,CAAC,MAAM,0CAAG,WAAW,CAAC,KAAK,IAAI,CAAC,CAAC,CAAA,CAAA;QACjE,IAAI,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAE9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YACvB,KAAK,GAAG,UAAU,CAAA;QACpB,CAAC;QAED,IAAI,MAAM,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAG,WAAW,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,KAAI,EAAE,CAAA;QAC7E,IAAI,MAAM,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAG,WAAW,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,KAAI,EAAE,CAAA;QAE7E,OAAO,GAAG,KAAK,KAAK,MAAM,IAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE,CAAA,GAAG,MAAM,EAAE,CAAA;IACjE,CAAC,CAAA;AACH,CAAC","sourcesContent":["import { TinyColor } from '@ctrl/tinycolor'\n\nexport function convertConfigure(chart: SceneChart.ChartConfig) {\n if (!chart) return\n\n var data = chart.data || {}\n var datasets = data.datasets || []\n var options = chart.options || {}\n var scales = options.scales || {}\n var xAxes: Array<SceneChart.ChartXAxe>\n var yAxes: Array<SceneChart.ChartYAxe>\n var scale\n var legend = options.legend || {}\n var tooltips = options.tooltip === false ? undefined : (options.tooltips = options.tooltips || {})\n var multiAxis = options.multiAxis\n var stacked = false\n var yStacked = [false, false]\n var fontSize = Number(options.defaultFontSize)\n var fontFamily = options.defaultFontFamily\n var fontColor = options.defaultFontColor\n var theme = options.theme\n\n // backward compatible\n _configureBackwardsCompatible(chart.type, options)\n\n // setup series configure\n for (let i in datasets) {\n let series = datasets[i]\n\n if (options.stacked && !series.stack) {\n series.stack = 'A'\n }\n\n /*\n * TODO from chartjs 2.9, categoryPercentage, barPercentage properties move to dataset.\n * so need to move related properties - categorySpacing, barSpacing should be moved to series.\n */\n if (chart.type == 'bar') {\n let categorySpacing = (scales.xAxes && scales.xAxes[0].categorySpacing) || 0\n let barSpacing = (scales.xAxes && scales.xAxes[0].barSpacing) || 0\n\n series.categoryPercentage = 1 - categorySpacing || 1\n series.barPercentage = 1 - barSpacing || 0.8\n } else if (chart.type == 'horizontalBar') {\n let categorySpacing = (scales.yAxes && scales.yAxes[0].categorySpacing) || 0\n let barSpacing = (scales.yAxes && scales.yAxes[0].barSpacing) || 0\n\n series.categoryPercentage = 1 - categorySpacing || 1\n series.barPercentage = 1 - barSpacing || 0.8\n }\n\n _setSeriesConfigures(series, chart)\n\n if (!multiAxis) {\n if (series.yAxisID == 'right') series.yAxisID = 'left'\n }\n }\n\n delete options.stacked\n\n var leftSeries = datasets.filter(d => d.yAxisID == 'left')\n var rightSeries = datasets.filter(d => d.yAxisID == 'right')\n\n leftSeries.forEach(s => {\n var filtered = leftSeries.filter(ss => s.stack == ss.stack)\n if (filtered.length > 1) {\n yStacked[0] = true\n return\n }\n })\n\n rightSeries.forEach(s => {\n var filtered = rightSeries.filter(ss => s.stack == ss.stack)\n if (filtered.length > 1) {\n yStacked[1] = true\n return\n }\n })\n\n stacked = yStacked[0] || yStacked[1]\n\n // setup options\n // 1. setup scales\n switch (chart.type) {\n case 'line':\n case 'bar':\n case 'horizontalBar':\n xAxes = scales.xAxes || []\n yAxes = scales.yAxes || []\n\n if (chart.type == 'horizontalBar') {\n xAxes = scales.yAxes || []\n yAxes = scales.xAxes || []\n }\n\n // 1-1. setup xAxes\n for (let i in xAxes) {\n let axis = xAxes[i]\n _setStacked(axis, stacked)\n _setScalesFont(axis, {\n fontSize,\n fontFamily\n })\n _setScalesAutoMinMax(axis)\n _setScalesTickRotation(axis)\n _setAxisTitle(axis)\n _setScalesTheme(axis, theme, fontColor)\n _appendTickCallback(axis.ticks)\n\n axis.gridLines!.display = options.xGridLine\n }\n\n // 1-2. setup yAxes\n for (let i in yAxes) {\n let axis = yAxes[i]\n\n //@ts-ignore\n if (i == 1) {\n _setMultiAxis(axis, multiAxis)\n }\n _setStacked(axis, yStacked[i])\n _setScalesFont(axis, {\n fontSize,\n fontFamily\n })\n _setScalesAutoMinMax(axis)\n _setAxisTitle(axis)\n _setScalesTheme(axis, theme, fontColor)\n _appendTickCallback(axis.ticks)\n\n //@ts-ignore\n if (i == 0) axis.gridLines.display = options.yGridLine\n\n //@ts-ignore\n if (i == 1) axis.gridLines.display = options.y2ndGridLine\n }\n\n break\n case 'pie':\n case 'doughnut':\n break\n default:\n scale = options.scale || {}\n _setScalesFont(scale, {\n fontSize,\n fontFamily\n })\n break\n }\n\n // 2. setup legend\n _setLegendFont(legend, {\n fontSize,\n fontFamily\n })\n legend.labels && (legend.labels.boxWidth = 15)\n _setLegendTheme(legend, theme, fontColor)\n\n // 3. setup tooltips\n options.tooltip &&\n _setTooltipFont(tooltips!, {\n fontSize,\n fontFamily\n })\n options.tooltip && _setTooltipCallback(tooltips!)\n}\n\nfunction _configureBackwardsCompatible(type: string, options: SceneChart.ChartOptions) {\n switch (type) {\n case 'horizontalBar':\n if (!options.scales) options.scales = {}\n break\n case 'radar':\n case 'polarArea':\n if (options.defaultFontColor) {\n options.scale!.ticks!.fontColor = options.defaultFontColor\n if (options.scale.pointLabels) {\n options.scale.pointLabels.fontColor = options.defaultFontColor\n } else {\n options.scale.pointLabels = { fontColor: options.defaultFontColor }\n }\n }\n options.scale!.ticks!.backdropColor = options.fillStyle ? options.fillStyle : '#00ff0000'\n break\n case 'line':\n case 'bar':\n if (!options.scales) options.scales = {}\n if (!options.scales.yAxes) options.scales.yAxes = []\n\n if (options.scales.yAxes.length === 1) {\n let yAxes = options.scales.yAxes\n yAxes.push({\n position: 'right',\n id: 'right',\n display: options.multiAxis || false,\n gridLines: {\n display: (yAxes[0] && yAxes[0].gridLines && yAxes[0].gridLines.display) || false\n },\n ticks: {\n beginAtZero: false,\n callback: function (value: any, index: number, values: any[]) {\n var returnValue = value\n if (typeof returnValue == 'number') {\n returnValue = returnValue.toLocaleString()\n }\n\n return returnValue\n }\n }\n })\n }\n break\n case 'pie':\n case 'doughnut':\n break\n default:\n if (!options.scale) options.scale = {}\n\n break\n }\n}\n\nfunction _setStacked(axis: SceneChart.ChartXAxe, stacked: boolean) {\n axis.stacked = stacked\n}\n\nfunction _setMultiAxis(axis: SceneChart.ChartXAxe, multiAxis: boolean) {\n axis.display = multiAxis\n}\n\nfunction _setAxisTitle(axis: SceneChart.ChartXAxe) {\n if (!axis.scaleLabel) axis.scaleLabel = {}\n axis.scaleLabel.labelString = axis.axisTitle\n axis.scaleLabel.display = axis.axisTitle ? true : false\n}\n\nfunction _setScalesFont(\n axis: SceneChart.ChartXAxe | SceneChart.RadialLinearScale,\n { fontSize, fontFamily }: { fontSize: number; fontFamily: string }\n) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n axis.ticks.fontSize = fontSize\n\n if (fontFamily) {\n axis.ticks.fontFamily = fontFamily\n }\n\n ;(axis as SceneChart.RadialLinearScale).pointLabels = {\n fontSize,\n fontFamily\n }\n}\n\nfunction _setScalesAutoMinMax(axis: SceneChart.ChartXAxe) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n\n let autoMin = axis.ticks.autoMin\n let autoMax = axis.ticks.autoMax\n\n if (autoMin === true) {\n delete axis.ticks.min\n }\n if (autoMax === true) {\n delete axis.ticks.max\n }\n}\n\nfunction _setScalesTickRotation(axis: SceneChart.ChartXAxe) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n // axis.ticks.maxRotation = 0\n}\n\nfunction _setScalesTheme(axis: SceneChart.ChartXAxe, theme: SceneChart.Theme, fontColor: string) {\n var baseColor = _getBaseColorFromTheme(theme)\n\n axis.gridLines = axis.gridLines ? axis.gridLines : {}\n if (axis.gridLines) {\n axis.gridLines.zeroLineColor = baseColor.clone().setAlpha(0.5).toString()\n axis.gridLines.color = baseColor.clone().setAlpha(0.1).toString()\n }\n\n axis.ticks = axis.ticks ? axis.ticks : {}\n axis.ticks.fontColor = fontColor ? fontColor : baseColor.clone().setAlpha(0.5).toString()\n}\n\nfunction _setLegendFont(\n legend: SceneChart.ChartLegendOptions,\n { fontFamily, fontSize }: { fontFamily: string; fontSize: number }\n) {\n legend.labels = legend.labels ? legend.labels : {}\n legend.labels.fontSize = fontSize\n if (fontFamily) legend.labels.fontFamily = fontFamily\n}\n\nfunction _setLegendTheme(legend: SceneChart.ChartLegendOptions, theme: SceneChart.Theme, fontColor: string) {\n var baseColor = _getBaseColorFromTheme(theme)\n\n legend.labels = legend.labels ? legend.labels : {}\n legend.labels.fontColor = fontColor ? fontColor : baseColor.clone().setAlpha(0.5).toString()\n}\n\nfunction _getBaseColorFromTheme(theme: SceneChart.Theme) {\n let darkColor = '#000'\n let lightColor = '#fff'\n\n var baseColor\n\n switch (theme) {\n case 'light':\n baseColor = lightColor\n break\n case 'dark':\n default:\n baseColor = darkColor\n break\n }\n\n baseColor = new TinyColor(baseColor)\n\n return baseColor\n}\n\nfunction _setSeriesConfigures(series: SceneChart.ChartDataSets, chart: SceneChart.ChartConfig) {\n var type = series.type || chart.type\n var stackGroup = `${type} ${series.yAxisID} ${series.stack || series.dataKey}`\n var color = series.color ? series.color : series.backgroundColor\n\n switch (type) {\n case 'bar':\n case 'horizontalBar':\n series.borderColor = series.backgroundColor = color\n break\n\n case 'line':\n case 'radar':\n color = series.color ? series.color : series.borderColor\n series.pointBackgroundColor = series.pointBorderColor = series.borderColor = series.backgroundColor = color\n series.pointBorderWidth = (series.borderWidth as number) * 0.5\n series.pointHoverRadius = series.pointRadius\n if (series.fill == undefined) series.fill = false\n break\n\n default:\n series.borderColor = series.backgroundColor = color\n break\n }\n\n series.stack = stackGroup\n}\n\nfunction _appendTickCallback(ticks: SceneChart.TickOptions | undefined) {\n if (!ticks) {\n return\n }\n\n ticks.callback = function (value, index, values) {\n var returnValue\n if (!Number.isNaN(Number(value))) {\n returnValue = Number(value).toLocaleString()\n } else {\n returnValue = value\n }\n\n if (returnValue) return returnValue\n }\n}\n\nfunction _setTooltipFont(\n tooltips: SceneChart.ChartTooltipOptions,\n { fontSize, fontFamily }: { fontSize: number; fontFamily: string }\n) {\n tooltips.titleFontSize = tooltips.bodyFontSize = tooltips.footerFontSize = fontSize\n if (fontFamily) tooltips.titleFontFamily = tooltips.bodyFontFamily = tooltips.footerFontFamily = fontFamily\n}\n\nfunction _setTooltipCallback(tooltips: SceneChart.ChartTooltipOptions) {\n tooltips.callbacks = tooltips.callbacks || {}\n\n tooltips.intersect = false\n tooltips.mode = 'index'\n\n tooltips.callbacks.label = function (tooltipItem: SceneChart.ChartTooltipItem, data: SceneChart.ChartData) {\n var value = data.datasets?.[tooltipItem.datasetIndex || 0].data?.[tooltipItem.index || 0]\n var datasetLabel = data.datasets?.[tooltipItem.datasetIndex || 0].label\n var label = datasetLabel || data.labels?.[tooltipItem.index || 0]\n var toNumValue = Number(value)\n\n if (!isNaN(toNumValue)) {\n value = toNumValue\n }\n\n var prefix = data.datasets?.[tooltipItem.datasetIndex || 0].valuePrefix || ''\n var suffix = data.datasets?.[tooltipItem.datasetIndex || 0].valueSuffix || ''\n\n return `${label}: ${prefix + value?.toLocaleString() + suffix}`\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"config-converter.js","sourceRoot":"","sources":["../src/config-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,UAAU,gBAAgB,CAAC,KAA6B;IAC5D,IAAI,CAAC,KAAK;QAAE,OAAM;IAElB,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;IAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;IAClC,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAA;IACjC,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAA;IACjC,IAA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AAW,CAAC,KAAK,IAAI,CAAC,CAAC,CAAA,CAAA;QACjE,IAAI,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAE9B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YACvB,KAAK,GAAG,UAAU,CAAC,cAAc,EAAE,CAAA;QACrC,CAAC;QAED,IAAI,MAAM,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAG,WAAW,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,KAAI,EAAE,CAAA;QAC7E,IAAI,MAAM,GAAG,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAG,WAAW,CAAC,YAAY,IAAI,CAAC,EAAE,WAAW,KAAI,EAAE,CAAA;QAE7E,OAAO,GAAG,KAAK,KAAK,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,CAAA;IAC/C,CAAC,CAAA;AACH,CAAC","sourcesContent":["import { TinyColor } from '@ctrl/tinycolor'\n\nexport function convertConfigure(chart: SceneChart.ChartConfig) {\n if (!chart) return\n\n var data = chart.data || {}\n var datasets = data.datasets || []\n var options = chart.options || {}\n var scales = options.scales || {}\n var xAxes: Array<SceneChart.ChartXAxe>\n var yAxes: Array<SceneChart.ChartYAxe>\n var scale\n var legend = options.legend || {}\n var tooltips = options.tooltip === false ? undefined : (options.tooltips = options.tooltips || {})\n var multiAxis = options.multiAxis\n var stacked = false\n var yStacked = [false, false]\n var fontSize = Number(options.defaultFontSize)\n var fontFamily = options.defaultFontFamily\n var fontColor = options.defaultFontColor\n var theme = options.theme\n\n // backward compatible\n _configureBackwardsCompatible(chart.type, options)\n\n // setup series configure\n for (let i in datasets) {\n let series = datasets[i]\n\n if (options.stacked && !series.stack) {\n series.stack = 'A'\n }\n\n /*\n * TODO from chartjs 2.9, categoryPercentage, barPercentage properties move to dataset.\n * so need to move related properties - categorySpacing, barSpacing should be moved to series.\n */\n if (chart.type == 'bar') {\n let categorySpacing = (scales.xAxes && scales.xAxes[0].categorySpacing) || 0\n let barSpacing = (scales.xAxes && scales.xAxes[0].barSpacing) || 0\n\n series.categoryPercentage = 1 - categorySpacing || 1\n series.barPercentage = 1 - barSpacing || 0.8\n } else if (chart.type == 'horizontalBar') {\n let categorySpacing = (scales.yAxes && scales.yAxes[0].categorySpacing) || 0\n let barSpacing = (scales.yAxes && scales.yAxes[0].barSpacing) || 0\n\n series.categoryPercentage = 1 - categorySpacing || 1\n series.barPercentage = 1 - barSpacing || 0.8\n }\n\n _setSeriesConfigures(series, chart)\n\n if (!multiAxis) {\n if (series.yAxisID == 'right') series.yAxisID = 'left'\n }\n }\n\n delete options.stacked\n\n var leftSeries = datasets.filter(d => d.yAxisID == 'left')\n var rightSeries = datasets.filter(d => d.yAxisID == 'right')\n\n leftSeries.forEach(s => {\n var filtered = leftSeries.filter(ss => s.stack == ss.stack)\n if (filtered.length > 1) {\n yStacked[0] = true\n return\n }\n })\n\n rightSeries.forEach(s => {\n var filtered = rightSeries.filter(ss => s.stack == ss.stack)\n if (filtered.length > 1) {\n yStacked[1] = true\n return\n }\n })\n\n stacked = yStacked[0] || yStacked[1]\n\n // setup options\n // 1. setup scales\n switch (chart.type) {\n case 'line':\n case 'bar':\n case 'horizontalBar':\n xAxes = scales.xAxes || []\n yAxes = scales.yAxes || []\n\n if (chart.type == 'horizontalBar') {\n xAxes = scales.yAxes || []\n yAxes = scales.xAxes || []\n }\n\n // 1-1. setup xAxes\n for (let i in xAxes) {\n let axis = xAxes[i]\n _setStacked(axis, stacked)\n _setScalesFont(axis, {\n fontSize,\n fontFamily\n })\n _setScalesAutoMinMax(axis)\n _setScalesTickRotation(axis)\n _setAxisTitle(axis)\n _setScalesTheme(axis, theme, fontColor)\n _appendTickCallback(axis.ticks)\n\n axis.gridLines!.display = options.xGridLine\n }\n\n // 1-2. setup yAxes\n for (let i in yAxes) {\n let axis = yAxes[i]\n\n //@ts-ignore\n if (i == 1) {\n _setMultiAxis(axis, multiAxis)\n }\n _setStacked(axis, yStacked[i])\n _setScalesFont(axis, {\n fontSize,\n fontFamily\n })\n _setScalesAutoMinMax(axis)\n _setAxisTitle(axis)\n _setScalesTheme(axis, theme, fontColor)\n _appendTickCallback(axis.ticks)\n\n //@ts-ignore\n if (i == 0) axis.gridLines.display = options.yGridLine\n\n //@ts-ignore\n if (i == 1) axis.gridLines.display = options.y2ndGridLine\n }\n\n break\n case 'pie':\n case 'doughnut':\n break\n default:\n scale = options.scale || {}\n _setScalesFont(scale, {\n fontSize,\n fontFamily\n })\n break\n }\n\n // 2. setup legend\n _setLegendFont(legend, {\n fontSize,\n fontFamily\n })\n legend.labels && (legend.labels.boxWidth = 15)\n _setLegendTheme(legend, theme, fontColor)\n\n // 3. setup tooltips\n options.tooltip &&\n _setTooltipFont(tooltips!, {\n fontSize,\n fontFamily\n })\n options.tooltip && _setTooltipCallback(tooltips!)\n}\n\nfunction _configureBackwardsCompatible(type: string, options: SceneChart.ChartOptions) {\n switch (type) {\n case 'horizontalBar':\n if (!options.scales) options.scales = {}\n break\n case 'radar':\n case 'polarArea':\n if (options.defaultFontColor) {\n options.scale!.ticks!.fontColor = options.defaultFontColor\n if (options.scale.pointLabels) {\n options.scale.pointLabels.fontColor = options.defaultFontColor\n } else {\n options.scale.pointLabels = { fontColor: options.defaultFontColor }\n }\n }\n options.scale!.ticks!.backdropColor = options.fillStyle ? options.fillStyle : '#00ff0000'\n break\n case 'line':\n case 'bar':\n if (!options.scales) options.scales = {}\n if (!options.scales.yAxes) options.scales.yAxes = []\n\n if (options.scales.yAxes.length === 1) {\n let yAxes = options.scales.yAxes\n yAxes.push({\n position: 'right',\n id: 'right',\n display: options.multiAxis || false,\n gridLines: {\n display: (yAxes[0] && yAxes[0].gridLines && yAxes[0].gridLines.display) || false\n },\n ticks: {\n beginAtZero: false,\n callback: function (value: any, index: number, values: any[]) {\n var returnValue = value\n if (typeof returnValue == 'number') {\n returnValue = returnValue.toLocaleString()\n }\n\n return returnValue\n }\n }\n })\n }\n break\n case 'pie':\n case 'doughnut':\n break\n default:\n if (!options.scale) options.scale = {}\n\n break\n }\n}\n\nfunction _setStacked(axis: SceneChart.ChartXAxe, stacked: boolean) {\n axis.stacked = stacked\n}\n\nfunction _setMultiAxis(axis: SceneChart.ChartXAxe, multiAxis: boolean) {\n axis.display = multiAxis\n}\n\nfunction _setAxisTitle(axis: SceneChart.ChartXAxe) {\n if (!axis.scaleLabel) axis.scaleLabel = {}\n axis.scaleLabel.labelString = axis.axisTitle\n axis.scaleLabel.display = axis.axisTitle ? true : false\n}\n\nfunction _setScalesFont(\n axis: SceneChart.ChartXAxe | SceneChart.RadialLinearScale,\n { fontSize, fontFamily }: { fontSize: number; fontFamily: string }\n) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n axis.ticks.fontSize = fontSize\n\n if (fontFamily) {\n axis.ticks.fontFamily = fontFamily\n }\n\n ;(axis as SceneChart.RadialLinearScale).pointLabels = {\n fontSize,\n fontFamily\n }\n}\n\nfunction _setScalesAutoMinMax(axis: SceneChart.ChartXAxe) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n\n let autoMin = axis.ticks.autoMin\n let autoMax = axis.ticks.autoMax\n\n if (autoMin === true) {\n delete axis.ticks.min\n }\n if (autoMax === true) {\n delete axis.ticks.max\n }\n}\n\nfunction _setScalesTickRotation(axis: SceneChart.ChartXAxe) {\n axis.ticks = axis.ticks ? axis.ticks : {}\n // axis.ticks.maxRotation = 0\n}\n\nfunction _setScalesTheme(axis: SceneChart.ChartXAxe, theme: SceneChart.Theme, fontColor: string) {\n var baseColor = _getBaseColorFromTheme(theme)\n\n axis.gridLines = axis.gridLines ? axis.gridLines : {}\n if (axis.gridLines) {\n axis.gridLines.zeroLineColor = baseColor.clone().setAlpha(0.5).toString()\n axis.gridLines.color = baseColor.clone().setAlpha(0.1).toString()\n }\n\n axis.ticks = axis.ticks ? axis.ticks : {}\n axis.ticks.fontColor = fontColor ? fontColor : baseColor.clone().setAlpha(0.5).toString()\n}\n\nfunction _setLegendFont(\n legend: SceneChart.ChartLegendOptions,\n { fontFamily, fontSize }: { fontFamily: string; fontSize: number }\n) {\n legend.labels = legend.labels ? legend.labels : {}\n legend.labels.fontSize = fontSize\n if (fontFamily) legend.labels.fontFamily = fontFamily\n}\n\nfunction _setLegendTheme(legend: SceneChart.ChartLegendOptions, theme: SceneChart.Theme, fontColor: string) {\n var baseColor = _getBaseColorFromTheme(theme)\n\n legend.labels = legend.labels ? legend.labels : {}\n legend.labels.fontColor = fontColor ? fontColor : baseColor.clone().setAlpha(0.5).toString()\n}\n\nfunction _getBaseColorFromTheme(theme: SceneChart.Theme) {\n let darkColor = '#000'\n let lightColor = '#fff'\n\n var baseColor\n\n switch (theme) {\n case 'light':\n baseColor = lightColor\n break\n case 'dark':\n default:\n baseColor = darkColor\n break\n }\n\n baseColor = new TinyColor(baseColor)\n\n return baseColor\n}\n\nfunction _setSeriesConfigures(series: SceneChart.ChartDataSets, chart: SceneChart.ChartConfig) {\n var type = series.type || chart.type\n var stackGroup = `${type} ${series.yAxisID} ${series.stack || series.dataKey}`\n var color = series.color ? series.color : series.backgroundColor\n\n switch (type) {\n case 'bar':\n case 'horizontalBar':\n series.borderColor = series.backgroundColor = color\n break\n\n case 'line':\n case 'radar':\n color = series.color ? series.color : series.borderColor\n series.pointBackgroundColor = series.pointBorderColor = series.borderColor = series.backgroundColor = color\n series.pointBorderWidth = (series.borderWidth as number) * 0.5\n series.pointHoverRadius = series.pointRadius\n if (series.fill == undefined) series.fill = false\n break\n\n default:\n series.borderColor = series.backgroundColor = color\n break\n }\n\n series.stack = stackGroup\n}\n\nfunction _appendTickCallback(ticks: SceneChart.TickOptions | undefined) {\n if (!ticks) {\n return\n }\n\n ticks.callback = function (value, index, values) {\n var returnValue\n if (!Number.isNaN(Number(value))) {\n returnValue = Number(value).toLocaleString()\n } else {\n returnValue = value\n }\n\n if (returnValue) return returnValue\n }\n}\n\nfunction _setTooltipFont(\n tooltips: SceneChart.ChartTooltipOptions,\n { fontSize, fontFamily }: { fontSize: number; fontFamily: string }\n) {\n tooltips.titleFontSize = tooltips.bodyFontSize = tooltips.footerFontSize = fontSize\n if (fontFamily) tooltips.titleFontFamily = tooltips.bodyFontFamily = tooltips.footerFontFamily = fontFamily\n}\n\nfunction _setTooltipCallback(tooltips: SceneChart.ChartTooltipOptions) {\n tooltips.callbacks = tooltips.callbacks || {}\n\n tooltips.intersect = false\n tooltips.mode = 'index'\n\n tooltips.callbacks.label = function (tooltipItem: SceneChart.ChartTooltipItem, data: SceneChart.ChartData) {\n var value: any = data.datasets?.[tooltipItem.datasetIndex || 0].data?.[tooltipItem.index || 0]\n var datasetLabel = data.datasets?.[tooltipItem.datasetIndex || 0].label\n var label = datasetLabel || data.labels?.[tooltipItem.index || 0]\n var toNumValue = Number(value)\n\n if (!isNaN(toNumValue)) {\n value = toNumValue.toLocaleString()\n }\n\n var prefix = data.datasets?.[tooltipItem.datasetIndex || 0].valuePrefix || ''\n var suffix = data.datasets?.[tooltipItem.datasetIndex || 0].valueSuffix || ''\n\n return `${label}: ${prefix + value + suffix}`\n }\n}\n"]}
|
@@ -6,10 +6,10 @@ export default class PropertyEditorChartJSAbstract extends LitElement {
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
7
7
|
value: any;
|
8
8
|
currentSeriesIndex: number;
|
9
|
-
render(): import("lit
|
9
|
+
render(): import("lit").TemplateResult<1>;
|
10
10
|
firstUpdated(): void;
|
11
|
-
displayValueTemplate(): import("lit
|
12
|
-
editorTemplate(props: Properties): import("lit
|
11
|
+
displayValueTemplate(): import("lit").TemplateResult<1>;
|
12
|
+
editorTemplate(props: Properties): import("lit").TemplateResult<1>;
|
13
13
|
get data(): any;
|
14
14
|
set data(data: any);
|
15
15
|
get datasets(): any;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import '@material/
|
1
|
+
import '@material/web/icon/icon.js';
|
2
|
+
import '@material/web/button/elevated-button.js';
|
2
3
|
import '@polymer/paper-tabs/paper-tabs';
|
3
4
|
import '@polymer/iron-pages/iron-pages';
|
4
5
|
import '@operato/i18n/ox-i18n.js';
|
5
6
|
import PropertyEditorChartJSMultiSeriesAbstract from './property-editor-chartjs-multi-series-abstract';
|
6
7
|
export default class PropertyEditorChartJSHBar extends PropertyEditorChartJSMultiSeriesAbstract {
|
7
8
|
static styles: import("lit").CSSResult[];
|
8
|
-
editorTemplate(): import("lit
|
9
|
-
multiSeriesTabTemplate(): import("lit
|
9
|
+
editorTemplate(): import("lit").TemplateResult<1>;
|
10
|
+
multiSeriesTabTemplate(): import("lit").TemplateResult<1>;
|
10
11
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import '@material/
|
2
|
+
import '@material/web/icon/icon.js';
|
3
|
+
import '@material/web/button/elevated-button.js';
|
3
4
|
import '@polymer/paper-tabs/paper-tabs';
|
4
5
|
import '@polymer/iron-pages/iron-pages';
|
5
6
|
import '@operato/i18n/ox-i18n.js';
|
@@ -83,14 +84,14 @@ let PropertyEditorChartJSHBar = class PropertyEditorChartJSHBar extends Property
|
|
83
84
|
return html `
|
84
85
|
<div id="series-properties-container" fullwidth>
|
85
86
|
<div id="tab-header">
|
86
|
-
<
|
87
|
+
<md-elevated-button
|
87
88
|
id="tab-nav-left-button"
|
88
|
-
icon="chevron_left"
|
89
89
|
@click=${(e) => {
|
90
90
|
this._onTabScrollNavLeft(e);
|
91
91
|
}}
|
92
92
|
disabled
|
93
|
-
|
93
|
+
><md-icon>chevron_left</md-icon></md-elevated-button
|
94
|
+
>
|
94
95
|
<paper-tabs
|
95
96
|
id="tabs"
|
96
97
|
@iron-select=${(e) => (this.currentSeriesIndex = e.target.selected)}
|
@@ -106,28 +107,27 @@ let PropertyEditorChartJSHBar = class PropertyEditorChartJSHBar extends Property
|
|
106
107
|
>${index + 1}
|
107
108
|
${!this.datasets || (this.datasets.length != 1 && this.currentSeriesIndex == index)
|
108
109
|
? html `
|
109
|
-
<
|
110
|
-
|
110
|
+
<md-elevated-button @tap="${(e) => this.onTapRemoveCurrentTab(e)}">
|
111
|
+
<md-icon>close</md-icon>
|
112
|
+
</md-elevated-button>
|
111
113
|
`
|
112
114
|
: html ``}
|
113
115
|
</paper-tab>
|
114
116
|
`)}
|
115
117
|
</paper-tabs>
|
116
|
-
<
|
118
|
+
<md-elevated-button
|
117
119
|
id="tab-nav-right-button"
|
118
|
-
icon="chevron_right"
|
119
120
|
@click=${(e) => {
|
120
121
|
this._onTabScrollNavRight(e);
|
121
122
|
}}
|
122
123
|
disabled
|
123
|
-
|
124
|
+
><md-icon>chevron_right</md-icon></md-elevated-button
|
125
|
+
>
|
124
126
|
</div>
|
125
127
|
<div id="add-series-button-container">
|
126
|
-
<
|
127
|
-
|
128
|
-
|
129
|
-
@tap=${(e) => this.onTapAddTab(e)}
|
130
|
-
></mwc-icon-button>
|
128
|
+
<md-elevated-button id="add-series-button" @tap=${(e) => this.onTapAddTab(e)}
|
129
|
+
><md-icon>add</md-icon></md-elevated-button
|
130
|
+
>
|
131
131
|
</div>
|
132
132
|
|
133
133
|
<iron-pages .selected=${this.currentSeriesIndex} .attr-for-selected="series-index">
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"property-editor-chartjs-hbar.js","sourceRoot":"","sources":["../../src/editors/property-editor-chartjs-hbar.ts"],"names":[],"mappings":";AAAA,OAAO,
|
1
|
+
{"version":3,"file":"property-editor-chartjs-hbar.js","sourceRoot":"","sources":["../../src/editors/property-editor-chartjs-hbar.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,gCAAgC,CAAA;AACvC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,wCAAwC,MAAM,iDAAiD,CAAA;AAGvF,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B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IAD7C,aAAa,CAAC,8BAA8B,CAAC;GACzB,yBAAyB,CAqJ7C;eArJoB,yBAAyB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport '@polymer/paper-tabs/paper-tabs'\nimport '@polymer/iron-pages/iron-pages'\n\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport PropertyEditorChartJSMultiSeriesAbstract from './property-editor-chartjs-multi-series-abstract'\n\n@customElement('property-editor-chartjs-hbar')\nexport default class PropertyEditorChartJSHBar extends PropertyEditorChartJSMultiSeriesAbstract {\n static styles = [...PropertyEditorChartJSMultiSeriesAbstract.styles]\n\n editorTemplate() {\n return html`\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n ${this.multiSeriesTabTemplate()}\n\n <legend><ox-i18n msgid=\"label.y-axes\">Y Axes</ox-i18n></legend>\n\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"labelDataKey\" .value=${this.labelDataKey} />\n\n <label> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"yAxes0.axisTitle\" .value=${this.yAxes0.axisTitle || ''} />\n\n <label><ox-i18n msgid=\"label.bar-spacing\">Bar Spacing</ox-i18n></label>\n <input\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.barSpacing\"\n .value=${this.yAxes0.barSpacing || NaN}\n />\n <label><ox-i18n msgid=\"label.tick-spacing\">Tick Spacing</ox-i18n></label>\n <input\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n value-key=\"yAxes0.categorySpacing\"\n .value=${this.yAxes0.categorySpacing || NaN}\n />\n\n <input type=\"checkbox\" value-key=\"value.options.xGridLine\" .checked=${this.value.options.xGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"xAxes0.ticks.display\" .checked=${this.xAxes0.ticks.display} />\n <label> <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> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"xAxes0.title\" .value=${this.xAxes0.axisTitle || ''} />\n\n <input type=\"checkbox\" value-key=\"xAxes0.ticks.autoMin\" .checked=${this.xAxes0.ticks.autoMin} />\n <label> <ox-i18n msgid=\"label.axis-min-auto\">Axis Min Auto</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"xAxes0.ticks.autoMax\" .checked=${this.xAxes0.ticks.autoMax} />\n <label> <ox-i18n msgid=\"label.axis-max-auto\">Axis Max Auto</ox-i18n> </label>\n\n ${!this.xAxes0.ticks.autoMin\n ? html`\n <label> <ox-i18n msgid=\"label.axis-min\">Axis Min</ox-i18n> </label>\n <input type=\"number\" value-key=\"xAxes0.ticks.min\" .value=${this.xAxes0.ticks.min} />\n `\n : html``}\n ${!this.xAxes0.ticks.autoMax\n ? html`\n <label> <ox-i18n msgid=\"label.axis-max\">Axis Max</ox-i18n> </label>\n <input type=\"number\" value-key=\"xAxes0.ticks.max\" .value=${this.xAxes0.ticks.max} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.axis-step-size\">Axis Step Size</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.stepSize\" .value=${this.yAxes0.ticks.stepSize} />\n\n <input type=\"checkbox\" .checked=${this.value.options.yGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.display\" .checked=${this.yAxes0.ticks.display} />\n <label> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n }\n\n multiSeriesTabTemplate() {\n return html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"tab-header\">\n <md-elevated-button\n id=\"tab-nav-left-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavLeft(e)\n }}\n disabled\n ><md-icon>chevron_left</md-icon></md-elevated-button\n >\n <paper-tabs\n id=\"tabs\"\n @iron-select=${(e: Event) => (this.currentSeriesIndex = (e.target as any).selected)}\n .selected=${this.currentSeriesIndex}\n no-bar\n noink\n scrollable\n hide-scroll-buttons\n fit-container\n >\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <paper-tab data-series=\"${index + 1}\" noink\n >${index + 1}\n ${!this.datasets || (this.datasets.length != 1 && this.currentSeriesIndex == index)\n ? html`\n <md-elevated-button @tap=\"${(e: Event) => this.onTapRemoveCurrentTab(e)}\">\n <md-icon>close</md-icon>\n </md-elevated-button>\n `\n : html``}\n </paper-tab>\n `\n )}\n </paper-tabs>\n <md-elevated-button\n id=\"tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e)\n }}\n disabled\n ><md-icon>chevron_right</md-icon></md-elevated-button\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-elevated-button id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddTab(e)}\n ><md-icon>add</md-icon></md-elevated-button\n >\n </div>\n\n <iron-pages .selected=${this.currentSeriesIndex} .attr-for-selected=\"series-index\">\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <div class=\"tab-content\" series-index=\"${index}\">\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"dataKey\" .value=${this.dataKey} />\n <label> <ox-i18n msgid=\"label.label\">Label</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.label\" .value=${this.series.label} />\n <label> <ox-i18n msgid=\"label.color\">Color</ox-i18n> </label>\n <ox-input-color value-key=\"color\" .value=${this.color}></ox-input-color>\n <label> <ox-i18n msgid=\"label.stack-group\">Stack Group</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.stack\" .value=${this.series.stack || ''} />\n\n ${this.displayValueTemplate()}\n </div>\n `\n )}\n </iron-pages>\n </div>\n `\n }\n}\n"]}
|
@@ -12,6 +12,6 @@ export default class PropertyEditorChartJSMixed extends PropertyEditorChartJSMul
|
|
12
12
|
set yAxes1(yAxes1: any);
|
13
13
|
get multiAxis(): any;
|
14
14
|
set multiAxis(multiAxis: any);
|
15
|
-
editorTemplate(props: Properties): import("lit
|
15
|
+
editorTemplate(props: Properties): import("lit").TemplateResult<1>;
|
16
16
|
_hasBarSeries(chart: any): boolean;
|
17
17
|
}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import '@material/
|
1
|
+
import '@material/web/button/elevated-button.js';
|
2
2
|
import '@polymer/iron-pages/iron-pages';
|
3
3
|
import '@polymer/paper-tabs/paper-tabs';
|
4
4
|
import '@operato/i18n/ox-i18n.js';
|
5
5
|
import { Properties } from '@hatiolab/things-scene';
|
6
|
-
import {
|
6
|
+
import { MdElevatedButton } from '@material/web/button/elevated-button.js';
|
7
7
|
import PropertyEditorChartJSAbstract from './property-editor-chartjs-abstract';
|
8
8
|
export default class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEditorChartJSAbstract {
|
9
9
|
static styles: import("lit").CSSResult[];
|
10
10
|
constructor();
|
11
11
|
tabs: HTMLElement;
|
12
|
-
tabNavLeftButton:
|
13
|
-
tabNavRightButton:
|
12
|
+
tabNavLeftButton: MdElevatedButton;
|
13
|
+
tabNavRightButton: MdElevatedButton;
|
14
14
|
get color(): any;
|
15
15
|
set color(color: any);
|
16
16
|
get xAxes0(): any;
|
@@ -23,8 +23,8 @@ export default class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEd
|
|
23
23
|
set multiAxis(multiAxis: any);
|
24
24
|
get tabContainer(): HTMLElement | null | undefined;
|
25
25
|
firstUpdated(): void;
|
26
|
-
editorTemplate(props: Properties): import("lit
|
27
|
-
multiSeriesTabTemplate(): import("lit
|
26
|
+
editorTemplate(props: Properties): import("lit").TemplateResult<1>;
|
27
|
+
multiSeriesTabTemplate(): import("lit").TemplateResult<1>;
|
28
28
|
_onTabScroll(e: Event): void;
|
29
29
|
_onTabScrollNavLeft(e: Event): void;
|
30
30
|
_onTabScrollNavRight(e: Event): void;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import '@material/
|
2
|
+
import '@material/web/button/elevated-button.js';
|
3
3
|
import '@polymer/iron-pages/iron-pages';
|
4
4
|
import '@polymer/paper-tabs/paper-tabs';
|
5
5
|
import '@operato/i18n/ox-i18n.js';
|
@@ -179,14 +179,14 @@ class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEditorChartJSAbst
|
|
179
179
|
return html `
|
180
180
|
<div id="series-properties-container" fullwidth>
|
181
181
|
<div id="tab-header">
|
182
|
-
<
|
182
|
+
<md-elevated-button
|
183
183
|
id="tab-nav-left-button"
|
184
|
-
icon="chevron_left"
|
185
184
|
@click=${(e) => {
|
186
185
|
this._onTabScrollNavLeft(e);
|
187
186
|
}}
|
188
187
|
disabled
|
189
|
-
|
188
|
+
><md-icon>chevron_left</md-icon></md-elevated-button
|
189
|
+
>
|
190
190
|
<paper-tabs
|
191
191
|
id="tabs"
|
192
192
|
@iron-select=${(e) => (this.currentSeriesIndex = e.target.selected)}
|
@@ -202,28 +202,27 @@ class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEditorChartJSAbst
|
|
202
202
|
>${index + 1}
|
203
203
|
${!this.datasets || (this.datasets.length != 1 && this.currentSeriesIndex == index)
|
204
204
|
? html `
|
205
|
-
<
|
206
|
-
|
205
|
+
<md-elevated-button @tap=${(e) => this.onTapRemoveCurrentTab(e)}>
|
206
|
+
<md-icon>close</md-icon>
|
207
|
+
</md-elevated-button>
|
207
208
|
`
|
208
209
|
: html ``}
|
209
210
|
</paper-tab>
|
210
211
|
`)}
|
211
212
|
</paper-tabs>
|
212
|
-
<
|
213
|
+
<md-elevated-button
|
213
214
|
id="tab-nav-right-button"
|
214
|
-
icon="chevron_right"
|
215
215
|
@click=${(e) => {
|
216
216
|
this._onTabScrollNavRight(e);
|
217
217
|
}}
|
218
218
|
disabled
|
219
|
-
|
219
|
+
><md-icon>chevron_right</md-icon></md-elevated-button
|
220
|
+
>
|
220
221
|
</div>
|
221
222
|
<div id="add-series-button-container">
|
222
|
-
<
|
223
|
-
|
224
|
-
|
225
|
-
@tap=${(e) => this.onTapAddTab(e)}
|
226
|
-
></mwc-icon-button>
|
223
|
+
<md-elevated-button id="add-series-button" @tap=${(e) => this.onTapAddTab(e)}
|
224
|
+
><md-icon>add</md-icon></md-elevated-button
|
225
|
+
>
|
227
226
|
</div>
|
228
227
|
|
229
228
|
<iron-pages .selected=${this.currentSeriesIndex} .attr-for-selected="series-index">
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"property-editor-chartjs-multi-series-abstract.js","sourceRoot":"","sources":["../../src/editors/property-editor-chartjs-multi-series-abstract.ts"],"names":[],"mappings":";AAAA,OAAO,2BAA2B,CAAA;AAClC,OAAO,gCAAgC,CAAA;AACvC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAKzC,OAAO,6BAA6B,MAAM,oCAAoC,CAAA;AAE9E,MAAqB,wCAAyC,SAAQ,6BAA6B;IAcjG;QACE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,KAAK,GAAG;YACX,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,EAAE;yBACV;qBACF;oBACD,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,EAAE;yBACV;qBACF;iBACF;aACF;YACD,IAAI,EAAE;gBACJ,QAAQ,EAAE,EAAE;aACb;SACF,CAAA;IACH,CAAC;IAMD,IAAI,KAAK;QACP,IAAI,eAAe,GAAG,IA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vXM,+CAAM,GAAG;IACd,GAAG,6BAA6B,CAAC,MAAM;IACvC,GAAG,CAAA;;;;;;;;KAQF;CACF,CAAA;eAZkB,wCAAwC;AAuC3C;IAAf,KAAK,CAAC,OAAO,CAAC;sEAAmB;AACH;IAA9B,KAAK,CAAC,sBAAsB,CAAC;kFAA8B;AAC5B;IAA/B,KAAK,CAAC,uBAAuB,CAAC;mFAA+B","sourcesContent":["import '@material/mwc-icon-button'\nimport '@polymer/iron-pages/iron-pages'\nimport '@polymer/paper-tabs/paper-tabs'\n\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { query } from 'lit/decorators.js'\n\nimport { Properties } from '@hatiolab/things-scene'\nimport { IconButton } from '@material/mwc-icon-button'\n\nimport PropertyEditorChartJSAbstract from './property-editor-chartjs-abstract'\n\nexport default class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEditorChartJSAbstract {\n static styles = [\n ...PropertyEditorChartJSAbstract.styles,\n css`\n paper-tabs {\n background-color: rgb(204, 204, 204);\n }\n input[type='text'],\n input[type='number'] {\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n `\n ]\n\n constructor() {\n super()\n\n this.value = {\n options: {\n legend: {},\n scales: {\n xAxes: [\n {\n ticks: {}\n }\n ],\n yAxes: [\n {\n ticks: {}\n }\n ]\n }\n },\n data: {\n datasets: []\n }\n }\n }\n\n @query('#tabs') tabs!: HTMLElement\n @query('#tab-nav-left-button') tabNavLeftButton!: IconButton\n @query('#tab-nav-right-button') tabNavRightButton!: IconButton\n\n get color() {\n var oldVersionColor = this.series.backgroundColor\n if (this.series.type == 'line') oldVersionColor = this.series.borderColor\n if (this.series.type == 'radar') oldVersionColor = this.series.borderColor\n return this.series.color || oldVersionColor\n }\n\n set color(color) {\n this.series.color = color\n delete this.series.backgroundColor\n delete this.series.borderColor\n }\n\n get xAxes0() {\n return this.scales.xAxes[0]\n }\n\n set xAxes0(xAxes0) {\n this.scales.xAxes[0] = xAxes0\n }\n\n get yAxes0() {\n return this.scales.yAxes[0]\n }\n\n set yAxes0(yAxes0) {\n this.scales.yAxes[0] = yAxes0\n }\n\n get yAxes1() {\n return this.scales.yAxes[1]\n }\n\n set yAxes1(yAxes1) {\n this.scales.yAxes[1] = yAxes1\n }\n\n get multiAxis() {\n return this.value.options.multiAxis\n }\n\n set multiAxis(multiAxis) {\n this.value.options.multiAxis = multiAxis\n }\n\n get tabContainer(): HTMLElement | null | undefined {\n return this.tabs.shadowRoot?.querySelector('#tabsContainer')\n }\n\n firstUpdated() {\n super.firstUpdated()\n\n this.tabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e)\n })\n }\n\n editorTemplate(props: Properties) {\n return html`\n <input type=\"checkbox\" value-key=\"multiAxis\" .checked=${this.multiAxis} />\n <label> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n\n ${this.multiSeriesTabTemplate()}\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"labelDataKey\" .value=${this.labelDataKey} />\n\n <label> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"xAxes0.axisTitle\" .value=${this.xAxes0.axisTitle || ''} />\n\n <label> <ox-i18n msgid=\"label.thickness\">Thickness</ox-i18n> </label>\n <input type=\"number\" value-key=\"xAxes0.barPercentage\" .value=${this.xAxes0.barPercentage} />\n\n <input type=\"checkbox\" value-key=\"value.options.xGridLine\" .checked=${this.value.options.xGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"xAxes0.ticks.display\" .checked=${this.xAxes0.ticks.display} />\n <label> <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> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"yAxes0.axisTitle\" .value=${this.yAxes0.axisTitle || ''} />\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.autoMin\" .checked=${this.yAxes0.ticks.autoMin} />\n <label> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.autoMax\" .checked=${this.yAxes0.ticks.autoMax} />\n <label> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!this.yAxes0.ticks.autoMin\n ? html`\n <label> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.min\" .value=${this.yAxes0.ticks.min} />\n `\n : html``}\n ${!this.yAxes0.ticks.autoMax\n ? html`\n <label> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.max\" .value=${this.yAxes0.ticks.max} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.stepSize\" .value=${this.yAxes0.ticks.stepSize} />\n\n <input type=\"checkbox\" value-key=\"value.options.yGridLine\" .checked=${this.value.options.yGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.display\" .checked=${this.yAxes0.ticks.display} />\n <label> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${this.value.options.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"yAxes1.axisTitle\" .value=${this.yAxes1.axisTitle || ''} />\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.autoMin\" .checked=${this.yAxes1.ticks.autoMin} />\n <label> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.autoMax\" .checked=${this.yAxes1.ticks.autoMax} />\n <label> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!this.yAxes1.ticks.autoMin\n ? html`\n <label> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.min\" .value=${this.yAxes1.ticks.min} />\n `\n : html``}\n ${!this.yAxes1.ticks.autoMax\n ? html`\n <label> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.max\" .value=${this.yAxes1.ticks.max} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.stepSize\" .value=${this.yAxes1.ticks.stepSize} />\n\n <input type=\"checkbox\" value-key=\"value.options.y2ndGridLine\" .checked=${this.value.options.y2ndGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.display\" .checked=${this.yAxes1.ticks.display} />\n <label> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n multiSeriesTabTemplate() {\n return html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"tab-header\">\n <mwc-icon-button\n id=\"tab-nav-left-button\"\n icon=\"chevron_left\"\n @click=${(e: Event) => {\n this._onTabScrollNavLeft(e)\n }}\n disabled\n ></mwc-icon-button>\n <paper-tabs\n id=\"tabs\"\n @iron-select=${(e: Event) => (this.currentSeriesIndex = (e.target as any).selected)}\n .selected=${this.currentSeriesIndex}\n no-bar\n noink\n scrollable\n hide-scroll-buttons\n fit-container\n >\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <paper-tab data-series=\"${index + 1}\" noink\n >${index + 1}\n ${!this.datasets || (this.datasets.length != 1 && this.currentSeriesIndex == index)\n ? html`\n <mwc-icon-button icon=\"close\" @tap=${(e: Event) => this.onTapRemoveCurrentTab(e)}>\n </mwc-icon-button>\n `\n : html``}\n </paper-tab>\n `\n )}\n </paper-tabs>\n <mwc-icon-button\n id=\"tab-nav-right-button\"\n icon=\"chevron_right\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e)\n }}\n disabled\n ></mwc-icon-button>\n </div>\n <div id=\"add-series-button-container\">\n <mwc-icon-button\n id=\"add-series-button\"\n icon=\"add\"\n @tap=${(e: Event) => this.onTapAddTab(e)}\n ></mwc-icon-button>\n </div>\n\n <iron-pages .selected=${this.currentSeriesIndex} .attr-for-selected=\"series-index\">\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <div class=\"tab-content\" series-index=\"${index}\">\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"dataKey\" .value=${this.dataKey} />\n\n ${this.value.type == 'bar'\n ? html`\n <label> <ox-i18n msgid=\"label.type\">type</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.type\" .value=${this.series.type}>\n <option value=\"bar\" selected>bar</option>\n <option value=\"line\">line</option>\n </select>\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.label\">label</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.label\" .value=${this.series.label} />\n\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.line-tension\">line tension</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.lineTension\" .value=${this.series.lineTension}>\n <option value=\"0.4\">smooth</option>\n <option value=\"0\">angled</option>\n </select>\n `\n : html``}\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.border-width\">border width</ox-i18n> </label>\n <input type=\"number\" value-key=\"series.borderWidth\" .value=${this.series.borderWidth} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.color\">color</ox-i18n> </label>\n <ox-input-color value-key=\"color\" .value=${this.color}></ox-input-color>\n\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.point-shape\">point shape</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.pointStyle\" .value=${this.series.pointStyle}>\n <option value=\"circle\">⚬</option>\n <option value=\"triangle\">▵</option>\n <option value=\"rect\">□</option>\n <option value=\"rectRot\">◇</option>\n <option value=\"cross\">+</option>\n <option value=\"crossRot\">⨉</option>\n <option value=\"star\">✱</option>\n <option value=\"line\">―</option>\n <option value=\"dash\">┄</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.point-size\">point size</ox-i18n> </label>\n <input type=\"number\" value-key=\"series.pointRadius\" .value=${this.series.pointRadius} />\n `\n : html``} <label> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.stack\" .value=${this.series.stack || ''} /> ${this.series.type ==\n 'line'\n ? html`\n <input type=\"checkbox\" value-key=\"series.fill\" .checked=${this.series.fill} />\n <label> <ox-i18n msgid=\"label.fill\">fill</ox-i18n> </label>\n `\n : html``}\n ${this.multiAxis\n ? html`\n <label> <ox-i18n msgid=\"label.target-axis\">target axis</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.yAxisID\" .value=${this.series.yAxisID}>\n <option value=\"left\">left</option>\n <option value=\"right\">right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n `\n )}\n </iron-pages>\n </div>\n `\n }\n\n _onTabScroll(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n if (this.tabContainer.clientWidth == this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.disabled = true\n this.tabNavRightButton.disabled = true\n }\n // left-end\n else if (this.tabContainer.scrollLeft == 0) {\n this.tabNavLeftButton.disabled = true\n this.tabNavRightButton.disabled = false\n }\n // right-end\n else if (this.tabContainer.scrollLeft + this.tabContainer.clientWidth >= this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.disabled = false\n this.tabNavRightButton.disabled = true\n } else {\n this.tabNavLeftButton.disabled = false\n this.tabNavRightButton.disabled = false\n }\n }\n\n _onTabScrollNavLeft(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft -= this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft += this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"property-editor-chartjs-multi-series-abstract.js","sourceRoot":"","sources":["../../src/editors/property-editor-chartjs-multi-series-abstract.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,gCAAgC,CAAA;AACvC,OAAO,gCAAgC,CAAA;AAEvC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAKzC,OAAO,6BAA6B,MAAM,oCAAoC,CAAA;AAE9E,MAAqB,wCAAyC,SAAQ,6BAA6B;IAcjG;QACE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,KAAK,GAAG;YACX,OAAO,EAAE;gBACP,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE;oBACN,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,EAAE;yBACV;qBACF;oBACD,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,EAAE;yBACV;qBACF;iBACF;aACF;YACD,IAAI,EAAE;gBACJ,QAAQ,EAAE,EAAE;aACb;SACF,CAAA;IACH,CAAC;IAMD,IAA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GAAG,MAAM,CAAA;IACjD,CAAC;;AAtXM,+CAAM,GAAG;IACd,GAAG,6BAA6B,CAAC,MAAM;IACvC,GAAG,CAAA;;;;;;;;KAQF;CACF,CAAA;eAZkB,wCAAwC;AAuC3C;IAAf,KAAK,CAAC,OAAO,CAAC;sEAAmB;AACH;IAA9B,KAAK,CAAC,sBAAsB,CAAC;kFAAoC;AAClC;IAA/B,KAAK,CAAC,uBAAuB,CAAC;mFAAqC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@polymer/iron-pages/iron-pages'\nimport '@polymer/paper-tabs/paper-tabs'\n\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { query } from 'lit/decorators.js'\n\nimport { Properties } from '@hatiolab/things-scene'\nimport { MdElevatedButton } from '@material/web/button/elevated-button.js'\n\nimport PropertyEditorChartJSAbstract from './property-editor-chartjs-abstract'\n\nexport default class PropertyEditorChartJSMultiSeriesAbstract extends PropertyEditorChartJSAbstract {\n static styles = [\n ...PropertyEditorChartJSAbstract.styles,\n css`\n paper-tabs {\n background-color: rgb(204, 204, 204);\n }\n input[type='text'],\n input[type='number'] {\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n `\n ]\n\n constructor() {\n super()\n\n this.value = {\n options: {\n legend: {},\n scales: {\n xAxes: [\n {\n ticks: {}\n }\n ],\n yAxes: [\n {\n ticks: {}\n }\n ]\n }\n },\n data: {\n datasets: []\n }\n }\n }\n\n @query('#tabs') tabs!: HTMLElement\n @query('#tab-nav-left-button') tabNavLeftButton!: MdElevatedButton\n @query('#tab-nav-right-button') tabNavRightButton!: MdElevatedButton\n\n get color() {\n var oldVersionColor = this.series.backgroundColor\n if (this.series.type == 'line') oldVersionColor = this.series.borderColor\n if (this.series.type == 'radar') oldVersionColor = this.series.borderColor\n return this.series.color || oldVersionColor\n }\n\n set color(color) {\n this.series.color = color\n delete this.series.backgroundColor\n delete this.series.borderColor\n }\n\n get xAxes0() {\n return this.scales.xAxes[0]\n }\n\n set xAxes0(xAxes0) {\n this.scales.xAxes[0] = xAxes0\n }\n\n get yAxes0() {\n return this.scales.yAxes[0]\n }\n\n set yAxes0(yAxes0) {\n this.scales.yAxes[0] = yAxes0\n }\n\n get yAxes1() {\n return this.scales.yAxes[1]\n }\n\n set yAxes1(yAxes1) {\n this.scales.yAxes[1] = yAxes1\n }\n\n get multiAxis() {\n return this.value.options.multiAxis\n }\n\n set multiAxis(multiAxis) {\n this.value.options.multiAxis = multiAxis\n }\n\n get tabContainer(): HTMLElement | null | undefined {\n return this.tabs.shadowRoot?.querySelector('#tabsContainer')\n }\n\n firstUpdated() {\n super.firstUpdated()\n\n this.tabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e)\n })\n }\n\n editorTemplate(props: Properties) {\n return html`\n <input type=\"checkbox\" value-key=\"multiAxis\" .checked=${this.multiAxis} />\n <label> <ox-i18n msgid=\"label.multi-axis\">Multi Axis</ox-i18n> </label>\n\n <legend><ox-i18n msgid=\"label.series\">Series</ox-i18n></legend>\n\n ${this.multiSeriesTabTemplate()}\n\n <legend><ox-i18n msgid=\"label.x-axes\">X Axes</ox-i18n></legend>\n\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"labelDataKey\" .value=${this.labelDataKey} />\n\n <label> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"xAxes0.axisTitle\" .value=${this.xAxes0.axisTitle || ''} />\n\n <label> <ox-i18n msgid=\"label.thickness\">Thickness</ox-i18n> </label>\n <input type=\"number\" value-key=\"xAxes0.barPercentage\" .value=${this.xAxes0.barPercentage} />\n\n <input type=\"checkbox\" value-key=\"value.options.xGridLine\" .checked=${this.value.options.xGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"xAxes0.ticks.display\" .checked=${this.xAxes0.ticks.display} />\n <label> <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> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"yAxes0.axisTitle\" .value=${this.yAxes0.axisTitle || ''} />\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.autoMin\" .checked=${this.yAxes0.ticks.autoMin} />\n <label> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.autoMax\" .checked=${this.yAxes0.ticks.autoMax} />\n <label> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!this.yAxes0.ticks.autoMin\n ? html`\n <label> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.min\" .value=${this.yAxes0.ticks.min} />\n `\n : html``}\n ${!this.yAxes0.ticks.autoMax\n ? html`\n <label> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.max\" .value=${this.yAxes0.ticks.max} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes0.ticks.stepSize\" .value=${this.yAxes0.ticks.stepSize} />\n\n <input type=\"checkbox\" value-key=\"value.options.yGridLine\" .checked=${this.value.options.yGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes0.ticks.display\" .checked=${this.yAxes0.ticks.display} />\n <label> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n\n ${this.value.options.multiAxis\n ? html`\n <legend><ox-i18n msgid=\"label.y-2nd-axes\">Y 2nd Axes</ox-i18n></legend>\n\n <label> <ox-i18n msgid=\"label.title\">Title</ox-i18n> </label>\n <input type=\"text\" value-key=\"yAxes1.axisTitle\" .value=${this.yAxes1.axisTitle || ''} />\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.autoMin\" .checked=${this.yAxes1.ticks.autoMin} />\n <label> <ox-i18n msgid=\"label.axis-min-auto\">Min Auto</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.autoMax\" .checked=${this.yAxes1.ticks.autoMax} />\n <label> <ox-i18n msgid=\"label.axis-max-auto\">Max Auto</ox-i18n> </label>\n\n ${!this.yAxes1.ticks.autoMin\n ? html`\n <label> <ox-i18n msgid=\"label.axis-min\">Min</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.min\" .value=${this.yAxes1.ticks.min} />\n `\n : html``}\n ${!this.yAxes1.ticks.autoMax\n ? html`\n <label> <ox-i18n msgid=\"label.axis-max\">Max</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.max\" .value=${this.yAxes1.ticks.max} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.axis-step-size\">StepSize</ox-i18n> </label>\n <input type=\"number\" value-key=\"yAxes1.ticks.stepSize\" .value=${this.yAxes1.ticks.stepSize} />\n\n <input type=\"checkbox\" value-key=\"value.options.y2ndGridLine\" .checked=${this.value.options.y2ndGridLine} />\n <label> <ox-i18n msgid=\"label.grid-line\">Grid Line</ox-i18n> </label>\n\n <input type=\"checkbox\" value-key=\"yAxes1.ticks.display\" .checked=${this.yAxes1.ticks.display} />\n <label> <ox-i18n msgid=\"label.display-tick\">Display Tick</ox-i18n> </label>\n `\n : html``}\n `\n }\n\n multiSeriesTabTemplate() {\n return html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"tab-header\">\n <md-elevated-button\n id=\"tab-nav-left-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavLeft(e)\n }}\n disabled\n ><md-icon>chevron_left</md-icon></md-elevated-button\n >\n <paper-tabs\n id=\"tabs\"\n @iron-select=${(e: Event) => (this.currentSeriesIndex = (e.target as any).selected)}\n .selected=${this.currentSeriesIndex}\n no-bar\n noink\n scrollable\n hide-scroll-buttons\n fit-container\n >\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <paper-tab data-series=\"${index + 1}\" noink\n >${index + 1}\n ${!this.datasets || (this.datasets.length != 1 && this.currentSeriesIndex == index)\n ? html`\n <md-elevated-button @tap=${(e: Event) => this.onTapRemoveCurrentTab(e)}>\n <md-icon>close</md-icon>\n </md-elevated-button>\n `\n : html``}\n </paper-tab>\n `\n )}\n </paper-tabs>\n <md-elevated-button\n id=\"tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e)\n }}\n disabled\n ><md-icon>chevron_right</md-icon></md-elevated-button\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-elevated-button id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddTab(e)}\n ><md-icon>add</md-icon></md-elevated-button\n >\n </div>\n\n <iron-pages .selected=${this.currentSeriesIndex} .attr-for-selected=\"series-index\">\n ${this.datasets.map(\n (dataset: any, index: number) => html`\n <div class=\"tab-content\" series-index=\"${index}\">\n <label> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input type=\"text\" value-key=\"dataKey\" .value=${this.dataKey} />\n\n ${this.value.type == 'bar'\n ? html`\n <label> <ox-i18n msgid=\"label.type\">type</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.type\" .value=${this.series.type}>\n <option value=\"bar\" selected>bar</option>\n <option value=\"line\">line</option>\n </select>\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.label\">label</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.label\" .value=${this.series.label} />\n\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.line-tension\">line tension</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.lineTension\" .value=${this.series.lineTension}>\n <option value=\"0.4\">smooth</option>\n <option value=\"0\">angled</option>\n </select>\n `\n : html``}\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.border-width\">border width</ox-i18n> </label>\n <input type=\"number\" value-key=\"series.borderWidth\" .value=${this.series.borderWidth} />\n `\n : html``}\n\n <label> <ox-i18n msgid=\"label.color\">color</ox-i18n> </label>\n <ox-input-color value-key=\"color\" .value=${this.color}></ox-input-color>\n\n ${this.series.type == 'line'\n ? html`\n <label> <ox-i18n msgid=\"label.point-shape\">point shape</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.pointStyle\" .value=${this.series.pointStyle}>\n <option value=\"circle\">⚬</option>\n <option value=\"triangle\">▵</option>\n <option value=\"rect\">□</option>\n <option value=\"rectRot\">◇</option>\n <option value=\"cross\">+</option>\n <option value=\"crossRot\">⨉</option>\n <option value=\"star\">✱</option>\n <option value=\"line\">―</option>\n <option value=\"dash\">┄</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.point-size\">point size</ox-i18n> </label>\n <input type=\"number\" value-key=\"series.pointRadius\" .value=${this.series.pointRadius} />\n `\n : html``} <label> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input type=\"text\" value-key=\"series.stack\" .value=${this.series.stack || ''} /> ${this.series.type ==\n 'line'\n ? html`\n <input type=\"checkbox\" value-key=\"series.fill\" .checked=${this.series.fill} />\n <label> <ox-i18n msgid=\"label.fill\">fill</ox-i18n> </label>\n `\n : html``}\n ${this.multiAxis\n ? html`\n <label> <ox-i18n msgid=\"label.target-axis\">target axis</ox-i18n> </label>\n <select class=\"select-content\" value-key=\"series.yAxisID\" .value=${this.series.yAxisID}>\n <option value=\"left\">left</option>\n <option value=\"right\">right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n `\n )}\n </iron-pages>\n </div>\n `\n }\n\n _onTabScroll(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n if (this.tabContainer.clientWidth == this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.disabled = true\n this.tabNavRightButton.disabled = true\n }\n // left-end\n else if (this.tabContainer.scrollLeft == 0) {\n this.tabNavLeftButton.disabled = true\n this.tabNavRightButton.disabled = false\n }\n // right-end\n else if (this.tabContainer.scrollLeft + this.tabContainer.clientWidth >= this.tabContainer.scrollWidth) {\n this.tabNavLeftButton.disabled = false\n this.tabNavRightButton.disabled = true\n } else {\n this.tabNavLeftButton.disabled = false\n this.tabNavRightButton.disabled = false\n }\n }\n\n _onTabScrollNavLeft(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft -= this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event) {\n if (!this.tabContainer) {\n return\n }\n\n this.tabContainer.style.scrollBehavior = 'smooth'\n this.tabContainer.scrollLeft += this.tabContainer.clientWidth\n this.tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
|
@@ -12,5 +12,5 @@ export default class PropertyEditorChartJSPie extends PropertyEditorChartJSAbstr
|
|
12
12
|
set color(color: any);
|
13
13
|
get displayValue(): any;
|
14
14
|
set displayValue(displayValue: any);
|
15
|
-
editorTemplate(props: Properties): import("lit
|
15
|
+
editorTemplate(props: Properties): import("lit").TemplateResult<1>;
|
16
16
|
}
|
@@ -4,5 +4,5 @@ import PropertyEditorChartJSMultiSeriesAbstract from './property-editor-chartjs-
|
|
4
4
|
export default class PropertyEditorChartJSRadar extends PropertyEditorChartJSMultiSeriesAbstract {
|
5
5
|
static styles: import("lit").CSSResult[];
|
6
6
|
constructor();
|
7
|
-
editorTemplate(props: Properties): import("lit
|
7
|
+
editorTemplate(props: Properties): import("lit").TemplateResult<1>;
|
8
8
|
}
|
@@ -6,5 +6,5 @@ import './property-editor-chartjs-radar';
|
|
6
6
|
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor';
|
7
7
|
export default class ChartJSEditor extends OxPropertyEditor {
|
8
8
|
static styles: import("lit").CSSResult[];
|
9
|
-
editorTemplate(value: any, spec: PropertySpec): import("lit
|
9
|
+
editorTemplate(value: any, spec: PropertySpec): import("lit").TemplateResult<1>;
|
10
10
|
}
|