@operato/chart 7.0.29 → 7.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
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
+ ### [7.0.31](https://github.com/hatiolab/operato/compare/v7.0.30...v7.0.31) (2024-07-29)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * chart annotation editor ([caa5ade](https://github.com/hatiolab/operato/commit/caa5ade7b96acfd94f26e78a349c493be0255ba4))
12
+ * scichart axis tick label default font and size ([00ad3ce](https://github.com/hatiolab/operato/commit/00ad3ceb6057177a612833d367148ec7288792a8))
13
+
14
+
15
+
16
+ ### [7.0.30](https://github.com/hatiolab/operato/compare/v7.0.29...v7.0.30) (2024-07-28)
17
+
18
+ **Note:** Version bump only for package @operato/chart
19
+
20
+
21
+
22
+
23
+
6
24
  ### [7.0.29](https://github.com/hatiolab/operato/compare/v7.0.28...v7.0.29) (2024-07-27)
7
25
 
8
26
  **Note:** Version bump only for package @operato/chart
@@ -398,12 +398,12 @@ export class InputChartAbstract extends OxFormField {
398
398
  value-key="annotation.type"
399
399
  .value=${currentAnnotation.type || ''}
400
400
  >
401
+ <option value="">&nbsp;</option>
401
402
  <option value="line">Line</option>
402
403
  <option value="text">Text</option>
403
404
  <option value="box">Box</option>
404
405
  <option value="horizontalLine">Horizontal Line</option>
405
406
  <option value="verticalLine">Vertical Line</option>
406
- <option value="custom">Custom</option>
407
407
  </select>
408
408
 
409
409
  <label for="annotation-x1">X1</label>
@@ -479,6 +479,7 @@ export class InputChartAbstract extends OxFormField {
479
479
  value-key="annotation.horizontalAnchorPoint"
480
480
  .value=${currentAnnotation.horizontalAnchorPoint || ''}
481
481
  >
482
+ <option value="">&nbsp;</option>
482
483
  <option value="Left">Left</option>
483
484
  <option value="Center">Center</option>
484
485
  <option value="Right">Right</option>
@@ -493,10 +494,37 @@ export class InputChartAbstract extends OxFormField {
493
494
  value-key="annotation.verticalAnchorPoint"
494
495
  .value=${currentAnnotation.verticalAnchorPoint || ''}
495
496
  >
497
+ <option value="">&nbsp;</option>
496
498
  <option value="Top">Top</option>
497
499
  <option value="Center">Center</option>
498
500
  <option value="Bottom">Bottom</option>
499
501
  </select>
502
+
503
+ <label for="annotation-x-coordinate-mode">X Coordinate Mode</label>
504
+ <select
505
+ id="annotation-x-coordinate-mode"
506
+ class="select-content"
507
+ value-key="annotation.xCoordinateMode"
508
+ .value=${currentAnnotation.xCoordinateMode || 'DataValue'}
509
+ >
510
+ <option value="">&nbsp;</option>
511
+ <option value="DataValue">DataValue</option>
512
+ <option value="Pixel">Pixel</option>
513
+ <option value="Relative">Relative</option>
514
+ </select>
515
+
516
+ <label for="annotation-y-coordinate-mode">Y Coordinate Mode</label>
517
+ <select
518
+ id="annotation-y-coordinate-mode"
519
+ class="select-content"
520
+ value-key="annotation.yCoordinateMode"
521
+ .value=${currentAnnotation.yCoordinateMode || 'DataValue'}
522
+ >
523
+ <option value="">&nbsp;</option>
524
+ <option value="DataValue">DataValue</option>
525
+ <option value="Pixel">Pixel</option>
526
+ <option value="Relative">Relative</option>
527
+ </select>
500
528
  </div>
501
529
  </div>
502
530
  `);
@@ -1 +1 @@
1
- {"version":3,"file":"input-chart-abstract.js","sourceRoot":"","sources":["../../../src/editors/input-chart-abstract.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CA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A8C;AACpB;IAApD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qDAAkC;AAE1D;IAA3B,KAAK,CAAC,mBAAmB,CAAC;2DAA8B;AACd;IAA1C,KAAK,CAAC,kCAAkC,CAAC;uEAAqC;AACnC;IAA3C,KAAK,CAAC,mCAAmC,CAAC;wEAAsC;AAE1D;IAAtB,KAAK,CAAC,cAAc,CAAC;sDAAyB;AACT;IAArC,KAAK,CAAC,6BAA6B,CAAC;kEAAgC;AAC9B;IAAtC,KAAK,CAAC,8BAA8B,CAAC;mEAAiC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html, PropertyValues } from 'lit'\nimport { property, query } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { random as randomColor, TinyColor } from '@ctrl/tinycolor'\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { InputChartStyles } from './input-chart-styles'\nimport { Configurer } from './configurer'\nimport { OxFormField } from '@operato/input'\n\nexport class InputChartAbstract extends OxFormField {\n static styles = [InputChartStyles]\n\n @property({ type: Object }) value: OperatoChart.ChartConfig | null = null\n @property({ type: String, attribute: 'chart-type' }) chartType: OperatoChart.ChartType\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 @query('#series-tabs') seriesTabs!: HTMLElement\n @query('#series-tab-nav-left-button') seriesTabNavLeftButton!: MdIcon\n @query('#series-tab-nav-right-button') seriesTabNavRightButton!: MdIcon\n\n private _configurer?: Configurer\n\n get configurer() {\n if (!this._configurer) {\n this._configurer = new Configurer(this.value, () => {\n return this.value || this.getDefaultChartConfig(this.chartType, this.getDefaultDatasets())\n })\n }\n return this._configurer\n }\n\n render() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.chart\">Chart</ox-i18n></legend>\n\n <label for=\"theme\"> <ox-i18n msgid=\"label.theme\">Theme</ox-i18n> </label>\n <select id=\"theme\" value-key=\"theme\" class=\"select-content\" .value=${configurer.theme || 'light'}>\n <option value=\"auto\">auto</option>\n <option value=\"dark\">dark</option>\n <option value=\"light\" checked>light</option>\n </select>\n\n <input id=\"tooltip\" type=\"checkbox\" value-key=\"tooltip\" ?checked=${configurer.tooltip} />\n <label for=\"tooltip\"> <ox-i18n msgid=\"label.tooltip\">Tooltip</ox-i18n> </label>\n\n <input id=\"animation\" type=\"checkbox\" value-key=\"animation\" ?checked=${configurer.animation} />\n <label for=\"animation\"> <ox-i18n msgid=\"label.animation\">Animation</ox-i18n> </label>\n\n <input id=\"display\" type=\"checkbox\" value-key=\"display\" ?checked=${configurer.display} />\n <label for=\"display\"> <ox-i18n msgid=\"label.legend\">Legend</ox-i18n> </label>\n\n <input id=\"stacked\" type=\"checkbox\" value-key=\"stacked\" ?checked=${configurer.stacked} />\n <label for=\"stacked\"> <ox-i18n msgid=\"label.stacked\">Stacked</ox-i18n> </label>\n\n ${configurer.display\n ? html`\n <label for=\"position\"> <ox-i18n msgid=\"label.position\">Position</ox-i18n> </label>\n <select id=\"position\" value-key=\"position\" class=\"select-content\" .value=${configurer.position || ''}>\n <option value=\"top\">top</option>\n <option value=\"right\">right</option>\n <option value=\"bottom\">bottom</option>\n <option value=\"left\">left</option>\n </select>\n `\n : html``}\n ${this.subTemplate()}\n `\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n this.renderRoot.addEventListener('change', this.onValuesChanged.bind(this))\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.seriesTabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e, 'series')\n })\n\n this.annotationsTabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e, 'annotations')\n })\n }\n\n get seriesTabContainer(): HTMLElement | null | undefined {\n return this.seriesTabs\n }\n\n get annotationsTabContainer(): HTMLElement | null | undefined {\n return this.annotationsTabs\n }\n\n displayValueTemplate() {\n const configurer = this.configurer\n\n return html`\n <label for=\"value-format\"> <ox-i18n msgid=\"label.value-format\">Value Format</ox-i18n> </label>\n <input\n id=\"value-format\"\n type=\"text\"\n value-key=\"series.valueFormat\"\n .value=${configurer.series.valueFormat || ''}\n list=\"format-list\"\n />\n <datalist id=\"format-list\">\n <option value=\"#,###.\"></option>\n <option value=\"#,###.#\"></option>\n <option value=\"#,###.0\"></option>\n <option value=\"#,##0.#\"></option>\n <option value=\"#,##0.0\"></option>\n <option value=\"#,##0.0%\"></option>\n </datalist>\n\n <label for=\"value-prefix\"> <ox-i18n msgid=\"label.value-prefix\">Value Prefix</ox-i18n> </label>\n <input\n id=\"value-prefix\"\n type=\"text\"\n value-key=\"series.valuePrefix\"\n .value=${configurer.series.valuePrefix || ''}\n />\n\n <label for=\"value-suffix\"> <ox-i18n msgid=\"label.value-suffix\">Value Suffix</ox-i18n> </label>\n <input\n id=\"value-suffix\"\n type=\"text\"\n value-key=\"series.valueSuffix\"\n .value=${configurer.series.valueSuffix || ''}\n />\n\n <input\n id=\"display-value\"\n type=\"checkbox\"\n value-key=\"series.displayValue\"\n ?checked=${!!configurer.series.displayValue}\n />\n <label for=\"display-value\"> <ox-i18n msgid=\"label.value-display\">Value Display</ox-i18n> </label>\n\n ${configurer.series.displayValue\n ? html`\n <label for=\"font-color\"> <ox-i18n msgid=\"label.font-color\">Font Color</ox-i18n> </label>\n <ox-input-color\n id=\"font-color\"\n value-key=\"series.defaultFontColor\"\n .value=${configurer.series.defaultFontColor || '#000'}\n ></ox-input-color>\n <label for=\"font-size\"> <ox-i18n msgid=\"label.font-size\">Font Size</ox-i18n> </label>\n <input\n id=\"font-size\"\n type=\"number\"\n value-key=\"series.defaultFontSize\"\n value=${configurer.series.defaultFontSize || 10}\n />\n <label for=\"data-label-anchor\"> <ox-i18n msgid=\"label.data-label-anchor\">Position</ox-i18n> </label>\n <select\n id=\"data-label-anchor\"\n value-key=\"series.dataLabelAnchor\"\n .value=${configurer.series.dataLabelAnchor || 'center'}\n >\n <option value=\"\"></option>\n <option value=\"start\">Start</option>\n <option value=\"center\">Center</option>\n <option value=\"end\">End</option>\n </select>\n <label for=\"data-label-offset\"> <ox-i18n msgid=\"label.data-label-offset\">Offset</ox-i18n> </label>\n <input\n id=\"data-label-offset\"\n type=\"number\"\n value-key=\"series.dataLabelOffset\"\n value=${configurer.series.dataLabelOffset || 0}\n />\n <label for=\"data-label-rotation\"> <ox-i18n msgid=\"label.data-label-rotation\">Rotation</ox-i18n> </label>\n <input\n id=\"data-label-rotation\"\n type=\"number\"\n value-key=\"series.dataLabelRotation\"\n value=${configurer.series.dataLabelRotation || 0}\n />\n `\n : html``}\n `\n }\n\n subTemplate() {\n return html``\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [this.getDefaultDataset('bar')]\n }\n\n getDefaultDataset(seriesType: 'bar' | 'horizontalBar' | 'line' | 'radar' | 'pie'): OperatoChart.Dataset {\n return {\n label: 'Series 1',\n data: [],\n borderWidth: 1,\n dataKey: '',\n yAxisID: 'left',\n color: randomColor({\n hue: new TinyColor('#fff').clone().toString()\n }).toRgbString(),\n backgroundColor: '#FFFFFF',\n type: seriesType,\n stack: '',\n fill: false,\n lineTension: 0.4,\n pointStyle: 'circle',\n pointRadius: 3,\n valuePrefix: '',\n valueSuffix: '',\n displayValue: false\n }\n }\n\n getDefaultChartConfig(type: OperatoChart.ChartType, datasets?: OperatoChart.Dataset[]): OperatoChart.ChartConfig {\n return {\n data: {\n datasets: datasets || [],\n labelDataKey: ''\n },\n options: {\n theme: 'light',\n tooltip: true,\n animation: true,\n legend: {\n display: true,\n position: 'top'\n },\n scales: {\n xAxes: [this.getDefaultAxisOptions()],\n yAxes: [this.getDefaultAxisOptions()]\n },\n stacked: false,\n xGridLine: true,\n yGridLine: true,\n y2ndGridLine: false,\n multiAxis: false\n },\n type\n }\n }\n\n getDefaultAxisOptions(): OperatoChart.AxisOptions {\n return {\n axisTitle: '',\n barSpacing: 0,\n categorySpacing: 0,\n barPercentage: 0.9,\n ticks: {\n display: true,\n autoMin: true,\n autoMax: true,\n min: undefined,\n max: undefined,\n stepSize: undefined\n }\n }\n }\n\n onValuesChanged(e: Event) {\n e.stopPropagation()\n\n const element = e.target as HTMLInputElement\n let key = element.getAttribute('value-key')\n let value = element.value\n\n if (!key) {\n return\n }\n\n value = this._getElementValue(element)\n\n const attrs = key.split('.')\n let attr = attrs.shift() || ''\n let variable: any = this.configurer\n\n while (attrs.length > 0) {\n variable = variable[attr]\n attr = attrs.shift() || ''\n }\n\n variable[attr] = value\n\n this.value = { ...this.configurer.value }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n this.requestUpdate()\n }\n\n onTapAddSeriesTab(e: Event) {\n const configurer = this.configurer\n\n if (!configurer.config.data.datasets) return\n\n const lastSeriesIndex = configurer.config.data.datasets.length\n const chartType = configurer.series.type || configurer.config.type\n const color = configurer.datasets[lastSeriesIndex - 1]?.backgroundColor\n const lastSeriesColor = new TinyColor(Array.isArray(color) ? color[0] : color)\n\n const seriesModel = this._getSeriesModel({\n chartType: chartType!,\n datasetsLength: lastSeriesIndex,\n lastSeriesColor\n })\n\n configurer.config.data.datasets.push(seriesModel)\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentSeriesIndex = lastSeriesIndex\n\n this.value = { ...this.configurer.value }\n }\n\n onTapRemoveCurrentSeriesTab(index: number) {\n const configurer = this.configurer\n\n if (!configurer.config.data.datasets) {\n return\n }\n\n this.configurer.data.datasets.splice(index, 1)\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentSeriesIndex = Math.max(0, configurer.currentSeriesIndex - 1)\n\n this.requestUpdate()\n }\n\n onTapAddAnnotation(e: Event) {\n const configurer = this.configurer\n\n const lastAnnotationIndex = configurer.annotations.length\n configurer.annotations.push({ type: 'line', x1: 0, y1: 0 })\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentAnnotationIndex = lastAnnotationIndex\n\n this.value = { ...this.configurer.value }\n }\n\n onTapRemoveCurrentAnnotation(index: number) {\n const configurer = this.configurer\n\n if (!configurer.annotations) {\n return\n }\n\n configurer.annotations.splice(index, 1)\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentAnnotationIndex = Math.max(0, configurer.currentAnnotationIndex - 1)\n\n this.requestUpdate()\n }\n\n _getSeriesModel({\n chartType,\n datasetsLength,\n lastSeriesColor\n }: {\n chartType: string\n datasetsLength: number\n lastSeriesColor: TinyColor\n }) {\n const addSeriesOption: any = {\n label: `series ${datasetsLength + 1}`,\n data: [],\n borderWidth: 1,\n dataKey: '',\n yAxisID: 'left',\n color: randomColor({\n hue: lastSeriesColor.toHsv().h\n }).toRgbString(),\n stack: ''\n }\n\n addSeriesOption.type = addSeriesOption.chartType = chartType\n return addSeriesOption\n }\n\n _getElementValue(element: HTMLElement) {\n switch (element.tagName) {\n case 'INPUT':\n switch ((element as HTMLInputElement).type) {\n case 'checkbox':\n return (element as HTMLInputElement).checked\n case 'number':\n return Number((element as HTMLInputElement).value) || 0\n case 'text':\n return String((element as HTMLInputElement).value)\n }\n default:\n return (element as any).value\n }\n }\n\n annotationsTabTemplate() {\n const configurer = this.configurer\n const currentAnnotation = configurer.annotations[configurer.currentAnnotationIndex] || {}\n\n return keyed(\n configurer.currentAnnotationIndex,\n html`\n <div id=\"annotations-properties-container\" fullwidth>\n <div id=\"annotations-tab-header\">\n <md-icon\n id=\"annotations-tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e, 'annotations')\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"annotations-tabs\"\n @change=${(e: Event) => {\n configurer.currentAnnotationIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentAnnotationIndex}\n fit-container\n >\n ${configurer.annotations!.map(\n (annotation: any, index: number) => html`\n <div\n data-annotation=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentAnnotationIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentAnnotationIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.annotations ||\n (configurer.annotations.length != 1 && configurer.currentAnnotationIndex == index)\n ? html`\n <md-icon @tap=${(e: Event) => this.onTapRemoveCurrentAnnotation(index)}> close </md-icon>\n `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"annotations-tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e, 'annotations')\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-annotation-button-container\">\n <md-icon id=\"add-annotation-button\" @tap=${(e: Event) => this.onTapAddAnnotation(e)}>add</md-icon>\n </div>\n\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=\"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 <option value=\"custom\">Custom</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\n id=\"annotation-text\"\n type=\"text\"\n value-key=\"annotation.text\"\n .value=${currentAnnotation.text || ''}\n />\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=\"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=\"Top\">Top</option>\n <option value=\"Center\">Center</option>\n <option value=\"Bottom\">Bottom</option>\n </select>\n </div>\n </div>\n `\n )\n }\n\n multiSeriesTabTemplate() {\n const configurer = this.configurer\n\n return keyed(\n configurer.currentSeriesIndex,\n html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"series-tab-header\">\n <md-icon\n id=\"series-tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e, 'series')\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"series-tabs\"\n @change=${(e: Event) => {\n configurer.currentSeriesIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentSeriesIndex}\n fit-container\n >\n ${configurer.datasets.map(\n (dataset: any, index: number) => html`\n <div\n data-series=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentSeriesIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentSeriesIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.datasets ||\n (configurer.datasets.length != 1 && configurer.currentSeriesIndex == index)\n ? html` <md-icon @tap=${(e: Event) => this.onTapRemoveCurrentSeriesTab(index)}> close </md-icon> `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"series-tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e, 'series')\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-icon id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddSeriesTab(e)}>add</md-icon>\n </div>\n\n <div class=\"tab-content\">\n <label for=\"data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"data-key\" type=\"text\" value-key=\"dataKey\" .value=${configurer.dataKey || ''} />\n\n ${this.chartType == 'line' || this.chartType == 'bar'\n ? html`\n <label for=\"series-type\"> <ox-i18n msgid=\"label.series-type\">Type</ox-i18n> </label>\n <select\n id=\"series-type\"\n class=\"select-content\"\n value-key=\"series.type\"\n .value=${configurer.series.type || ''}\n >\n <option value=\"bar\" selected>Bar</option>\n <option value=\"line\">Line</option>\n </select>\n `\n : html``}\n\n <label for=\"series-label\"> <ox-i18n msgid=\"label.label\">Label</ox-i18n> </label>\n <input id=\"series-label\" type=\"text\" value-key=\"series.label\" .value=${configurer.series.label || ''} />\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-line-tension\"> <ox-i18n msgid=\"label.line-tension\">Line Tension</ox-i18n> </label>\n <select\n id=\"series-line-tension\"\n class=\"select-content\"\n value-key=\"series.lineTension\"\n .value=${String(configurer.series.lineTension || 0)}\n >\n <option value=\"0.4\">Smooth</option>\n <option value=\"0\">Angled</option>\n </select>\n `\n : html``}\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-border-width\"> <ox-i18n msgid=\"label.border-width\">Border Width</ox-i18n> </label>\n <input\n id=\"series-border-width\"\n type=\"number\"\n value-key=\"series.borderWidth\"\n .value=${String(configurer.series.borderWidth || 0)}\n />\n `\n : html``}\n\n <label for=\"series-color\"> <ox-i18n msgid=\"label.color\">Color</ox-i18n> </label>\n <ox-input-color id=\"series-color\" value-key=\"color\" .value=${configurer.color}></ox-input-color>\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-point-style\"> <ox-i18n msgid=\"label.point-shape\">Point Shape</ox-i18n> </label>\n <select\n id=\"series-point-style\"\n class=\"select-content\"\n value-key=\"series.pointStyle\"\n .value=${configurer.series.pointStyle || ''}\n >\n <option value=\"\">&nbsp;</option>\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 for=\"series-point-radius\"> <ox-i18n msgid=\"label.point-size\">Point Size</ox-i18n> </label>\n <input\n id=\"series-point-radius\"\n type=\"number\"\n value-key=\"series.pointRadius\"\n .value=${String(configurer.series.pointRadius || 0)}\n />\n `\n : html``} <label for=\"series-stack\"> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input id=\"series-stack\" type=\"text\" value-key=\"series.stack\" .value=${configurer.series.stack || ''} />\n ${configurer.series.type == 'line'\n ? html`\n <input id=\"seires-fill\" type=\"checkbox\" value-key=\"series.fill\" ?checked=${configurer.series.fill} />\n <label for=\"seires-fill\"> <ox-i18n msgid=\"label.fill\">Fill</ox-i18n> </label>\n `\n : html``}\n ${configurer.multiAxis\n ? html`\n <label for=\"series-y-axis-id\"> <ox-i18n msgid=\"label.target-axis\">Target Axis</ox-i18n> </label>\n <select\n id=\"series-y-axis-id\"\n class=\"select-content\"\n value-key=\"series.yAxisID\"\n .value=${configurer.series.yAxisID || ''}\n >\n <option value=\"left\">Left</option>\n <option value=\"right\">Right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n </div>\n `\n )\n }\n\n _onTabScroll(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n let tabNavLeftButton: MdIcon\n let tabNavRightButton: MdIcon\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n tabNavLeftButton = this.seriesTabNavLeftButton\n tabNavRightButton = this.seriesTabNavRightButton\n } else {\n tabContainer = this.annotationsTabContainer\n tabNavLeftButton = this.annotationsTabNavLeftButton\n tabNavRightButton = this.annotationsTabNavRightButton\n }\n\n if (!tabContainer) {\n return\n }\n\n if (tabContainer.clientWidth == tabContainer.scrollWidth) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.setAttribute('disabled', '')\n }\n // left-end\n else if (tabContainer.scrollLeft == 0) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.removeAttribute('disabled')\n }\n // right-end\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 _onTabScrollNavLeft(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n } else {\n tabContainer = this.annotationsTabContainer\n }\n\n if (!tabContainer) {\n return\n }\n\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft -= tabContainer.clientWidth\n tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n } else {\n tabContainer = this.annotationsTabContainer\n }\n\n if (!tabContainer) {\n return\n }\n\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft += tabContainer.clientWidth\n tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
1
+ {"version":3,"file":"input-chart-abstract.js","sourceRoot":"","sources":["../../../src/editors/input-chart-abstract.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IAAnD;;QAG8B,UAAK,GAAoC,IAAI,CAAA;IAg0B3E,CAAC;aAl0BQ,WAAM,GAAG,CAAC,gBAAgB,CAAC,AAArB,CAAqB;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B;AACd;IAA1C,KAAK,CAAC,kCAAkC,CAAC;uEAAqC;AACnC;IAA3C,KAAK,CAAC,mCAAmC,CAAC;wEAAsC;AAE1D;IAAtB,KAAK,CAAC,cAAc,CAAC;sDAAyB;AACT;IAArC,KAAK,CAAC,6BAA6B,CAAC;kEAAgC;AAC9B;IAAtC,KAAK,CAAC,8BAA8B,CAAC;mEAAiC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { html, PropertyValues } from 'lit'\nimport { property, query } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { random as randomColor, TinyColor } from '@ctrl/tinycolor'\nimport { MdIcon } from '@material/web/icon/icon.js'\n\nimport { InputChartStyles } from './input-chart-styles'\nimport { Configurer } from './configurer'\nimport { OxFormField } from '@operato/input'\n\nexport class InputChartAbstract extends OxFormField {\n static styles = [InputChartStyles]\n\n @property({ type: Object }) value: OperatoChart.ChartConfig | null = null\n @property({ type: String, attribute: 'chart-type' }) chartType: OperatoChart.ChartType\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 @query('#series-tabs') seriesTabs!: HTMLElement\n @query('#series-tab-nav-left-button') seriesTabNavLeftButton!: MdIcon\n @query('#series-tab-nav-right-button') seriesTabNavRightButton!: MdIcon\n\n private _configurer?: Configurer\n\n get configurer() {\n if (!this._configurer) {\n this._configurer = new Configurer(this.value, () => {\n return this.value || this.getDefaultChartConfig(this.chartType, this.getDefaultDatasets())\n })\n }\n return this._configurer\n }\n\n render() {\n const configurer = this.configurer\n\n return html`\n <legend><ox-i18n msgid=\"label.chart\">Chart</ox-i18n></legend>\n\n <label for=\"theme\"> <ox-i18n msgid=\"label.theme\">Theme</ox-i18n> </label>\n <select id=\"theme\" value-key=\"theme\" class=\"select-content\" .value=${configurer.theme || 'light'}>\n <option value=\"auto\">auto</option>\n <option value=\"dark\">dark</option>\n <option value=\"light\" checked>light</option>\n </select>\n\n <input id=\"tooltip\" type=\"checkbox\" value-key=\"tooltip\" ?checked=${configurer.tooltip} />\n <label for=\"tooltip\"> <ox-i18n msgid=\"label.tooltip\">Tooltip</ox-i18n> </label>\n\n <input id=\"animation\" type=\"checkbox\" value-key=\"animation\" ?checked=${configurer.animation} />\n <label for=\"animation\"> <ox-i18n msgid=\"label.animation\">Animation</ox-i18n> </label>\n\n <input id=\"display\" type=\"checkbox\" value-key=\"display\" ?checked=${configurer.display} />\n <label for=\"display\"> <ox-i18n msgid=\"label.legend\">Legend</ox-i18n> </label>\n\n <input id=\"stacked\" type=\"checkbox\" value-key=\"stacked\" ?checked=${configurer.stacked} />\n <label for=\"stacked\"> <ox-i18n msgid=\"label.stacked\">Stacked</ox-i18n> </label>\n\n ${configurer.display\n ? html`\n <label for=\"position\"> <ox-i18n msgid=\"label.position\">Position</ox-i18n> </label>\n <select id=\"position\" value-key=\"position\" class=\"select-content\" .value=${configurer.position || ''}>\n <option value=\"top\">top</option>\n <option value=\"right\">right</option>\n <option value=\"bottom\">bottom</option>\n <option value=\"left\">left</option>\n </select>\n `\n : html``}\n ${this.subTemplate()}\n `\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n this.renderRoot.addEventListener('change', this.onValuesChanged.bind(this))\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.seriesTabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e, 'series')\n })\n\n this.annotationsTabContainer?.addEventListener('scroll', e => {\n this._onTabScroll(e, 'annotations')\n })\n }\n\n get seriesTabContainer(): HTMLElement | null | undefined {\n return this.seriesTabs\n }\n\n get annotationsTabContainer(): HTMLElement | null | undefined {\n return this.annotationsTabs\n }\n\n displayValueTemplate() {\n const configurer = this.configurer\n\n return html`\n <label for=\"value-format\"> <ox-i18n msgid=\"label.value-format\">Value Format</ox-i18n> </label>\n <input\n id=\"value-format\"\n type=\"text\"\n value-key=\"series.valueFormat\"\n .value=${configurer.series.valueFormat || ''}\n list=\"format-list\"\n />\n <datalist id=\"format-list\">\n <option value=\"#,###.\"></option>\n <option value=\"#,###.#\"></option>\n <option value=\"#,###.0\"></option>\n <option value=\"#,##0.#\"></option>\n <option value=\"#,##0.0\"></option>\n <option value=\"#,##0.0%\"></option>\n </datalist>\n\n <label for=\"value-prefix\"> <ox-i18n msgid=\"label.value-prefix\">Value Prefix</ox-i18n> </label>\n <input\n id=\"value-prefix\"\n type=\"text\"\n value-key=\"series.valuePrefix\"\n .value=${configurer.series.valuePrefix || ''}\n />\n\n <label for=\"value-suffix\"> <ox-i18n msgid=\"label.value-suffix\">Value Suffix</ox-i18n> </label>\n <input\n id=\"value-suffix\"\n type=\"text\"\n value-key=\"series.valueSuffix\"\n .value=${configurer.series.valueSuffix || ''}\n />\n\n <input\n id=\"display-value\"\n type=\"checkbox\"\n value-key=\"series.displayValue\"\n ?checked=${!!configurer.series.displayValue}\n />\n <label for=\"display-value\"> <ox-i18n msgid=\"label.value-display\">Value Display</ox-i18n> </label>\n\n ${configurer.series.displayValue\n ? html`\n <label for=\"font-color\"> <ox-i18n msgid=\"label.font-color\">Font Color</ox-i18n> </label>\n <ox-input-color\n id=\"font-color\"\n value-key=\"series.defaultFontColor\"\n .value=${configurer.series.defaultFontColor || '#000'}\n ></ox-input-color>\n <label for=\"font-size\"> <ox-i18n msgid=\"label.font-size\">Font Size</ox-i18n> </label>\n <input\n id=\"font-size\"\n type=\"number\"\n value-key=\"series.defaultFontSize\"\n value=${configurer.series.defaultFontSize || 10}\n />\n <label for=\"data-label-anchor\"> <ox-i18n msgid=\"label.data-label-anchor\">Position</ox-i18n> </label>\n <select\n id=\"data-label-anchor\"\n value-key=\"series.dataLabelAnchor\"\n .value=${configurer.series.dataLabelAnchor || 'center'}\n >\n <option value=\"\"></option>\n <option value=\"start\">Start</option>\n <option value=\"center\">Center</option>\n <option value=\"end\">End</option>\n </select>\n <label for=\"data-label-offset\"> <ox-i18n msgid=\"label.data-label-offset\">Offset</ox-i18n> </label>\n <input\n id=\"data-label-offset\"\n type=\"number\"\n value-key=\"series.dataLabelOffset\"\n value=${configurer.series.dataLabelOffset || 0}\n />\n <label for=\"data-label-rotation\"> <ox-i18n msgid=\"label.data-label-rotation\">Rotation</ox-i18n> </label>\n <input\n id=\"data-label-rotation\"\n type=\"number\"\n value-key=\"series.dataLabelRotation\"\n value=${configurer.series.dataLabelRotation || 0}\n />\n `\n : html``}\n `\n }\n\n subTemplate() {\n return html``\n }\n\n getDefaultDatasets(): OperatoChart.Dataset[] {\n return [this.getDefaultDataset('bar')]\n }\n\n getDefaultDataset(seriesType: 'bar' | 'horizontalBar' | 'line' | 'radar' | 'pie'): OperatoChart.Dataset {\n return {\n label: 'Series 1',\n data: [],\n borderWidth: 1,\n dataKey: '',\n yAxisID: 'left',\n color: randomColor({\n hue: new TinyColor('#fff').clone().toString()\n }).toRgbString(),\n backgroundColor: '#FFFFFF',\n type: seriesType,\n stack: '',\n fill: false,\n lineTension: 0.4,\n pointStyle: 'circle',\n pointRadius: 3,\n valuePrefix: '',\n valueSuffix: '',\n displayValue: false\n }\n }\n\n getDefaultChartConfig(type: OperatoChart.ChartType, datasets?: OperatoChart.Dataset[]): OperatoChart.ChartConfig {\n return {\n data: {\n datasets: datasets || [],\n labelDataKey: ''\n },\n options: {\n theme: 'light',\n tooltip: true,\n animation: true,\n legend: {\n display: true,\n position: 'top'\n },\n scales: {\n xAxes: [this.getDefaultAxisOptions()],\n yAxes: [this.getDefaultAxisOptions()]\n },\n stacked: false,\n xGridLine: true,\n yGridLine: true,\n y2ndGridLine: false,\n multiAxis: false\n },\n type\n }\n }\n\n getDefaultAxisOptions(): OperatoChart.AxisOptions {\n return {\n axisTitle: '',\n barSpacing: 0,\n categorySpacing: 0,\n barPercentage: 0.9,\n ticks: {\n display: true,\n autoMin: true,\n autoMax: true,\n min: undefined,\n max: undefined,\n stepSize: undefined\n }\n }\n }\n\n onValuesChanged(e: Event) {\n e.stopPropagation()\n\n const element = e.target as HTMLInputElement\n let key = element.getAttribute('value-key')\n let value = element.value\n\n if (!key) {\n return\n }\n\n value = this._getElementValue(element)\n\n const attrs = key.split('.')\n let attr = attrs.shift() || ''\n let variable: any = this.configurer\n\n while (attrs.length > 0) {\n variable = variable[attr]\n attr = attrs.shift() || ''\n }\n\n variable[attr] = value\n\n this.value = { ...this.configurer.value }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n this.requestUpdate()\n }\n\n onTapAddSeriesTab(e: Event) {\n const configurer = this.configurer\n\n if (!configurer.config.data.datasets) return\n\n const lastSeriesIndex = configurer.config.data.datasets.length\n const chartType = configurer.series.type || configurer.config.type\n const color = configurer.datasets[lastSeriesIndex - 1]?.backgroundColor\n const lastSeriesColor = new TinyColor(Array.isArray(color) ? color[0] : color)\n\n const seriesModel = this._getSeriesModel({\n chartType: chartType!,\n datasetsLength: lastSeriesIndex,\n lastSeriesColor\n })\n\n configurer.config.data.datasets.push(seriesModel)\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentSeriesIndex = lastSeriesIndex\n\n this.value = { ...this.configurer.value }\n }\n\n onTapRemoveCurrentSeriesTab(index: number) {\n const configurer = this.configurer\n\n if (!configurer.config.data.datasets) {\n return\n }\n\n this.configurer.data.datasets.splice(index, 1)\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentSeriesIndex = Math.max(0, configurer.currentSeriesIndex - 1)\n\n this.requestUpdate()\n }\n\n onTapAddAnnotation(e: Event) {\n const configurer = this.configurer\n\n const lastAnnotationIndex = configurer.annotations.length\n configurer.annotations.push({ type: 'line', x1: 0, y1: 0 })\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentAnnotationIndex = lastAnnotationIndex\n\n this.value = { ...this.configurer.value }\n }\n\n onTapRemoveCurrentAnnotation(index: number) {\n const configurer = this.configurer\n\n if (!configurer.annotations) {\n return\n }\n\n configurer.annotations.splice(index, 1)\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n configurer.currentAnnotationIndex = Math.max(0, configurer.currentAnnotationIndex - 1)\n\n this.requestUpdate()\n }\n\n _getSeriesModel({\n chartType,\n datasetsLength,\n lastSeriesColor\n }: {\n chartType: string\n datasetsLength: number\n lastSeriesColor: TinyColor\n }) {\n const addSeriesOption: any = {\n label: `series ${datasetsLength + 1}`,\n data: [],\n borderWidth: 1,\n dataKey: '',\n yAxisID: 'left',\n color: randomColor({\n hue: lastSeriesColor.toHsv().h\n }).toRgbString(),\n stack: ''\n }\n\n addSeriesOption.type = addSeriesOption.chartType = chartType\n return addSeriesOption\n }\n\n _getElementValue(element: HTMLElement) {\n switch (element.tagName) {\n case 'INPUT':\n switch ((element as HTMLInputElement).type) {\n case 'checkbox':\n return (element as HTMLInputElement).checked\n case 'number':\n return Number((element as HTMLInputElement).value) || 0\n case 'text':\n return String((element as HTMLInputElement).value)\n }\n default:\n return (element as any).value\n }\n }\n\n annotationsTabTemplate() {\n const configurer = this.configurer\n const currentAnnotation = configurer.annotations[configurer.currentAnnotationIndex] || {}\n\n return keyed(\n configurer.currentAnnotationIndex,\n html`\n <div id=\"annotations-properties-container\" fullwidth>\n <div id=\"annotations-tab-header\">\n <md-icon\n id=\"annotations-tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e, 'annotations')\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"annotations-tabs\"\n @change=${(e: Event) => {\n configurer.currentAnnotationIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentAnnotationIndex}\n fit-container\n >\n ${configurer.annotations!.map(\n (annotation: any, index: number) => html`\n <div\n data-annotation=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentAnnotationIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentAnnotationIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.annotations ||\n (configurer.annotations.length != 1 && configurer.currentAnnotationIndex == index)\n ? html`\n <md-icon @tap=${(e: Event) => this.onTapRemoveCurrentAnnotation(index)}> close </md-icon>\n `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"annotations-tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e, 'annotations')\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-annotation-button-container\">\n <md-icon id=\"add-annotation-button\" @tap=${(e: Event) => this.onTapAddAnnotation(e)}>add</md-icon>\n </div>\n\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\n id=\"annotation-text\"\n type=\"text\"\n value-key=\"annotation.text\"\n .value=${currentAnnotation.text || ''}\n />\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 </div>\n `\n )\n }\n\n multiSeriesTabTemplate() {\n const configurer = this.configurer\n\n return keyed(\n configurer.currentSeriesIndex,\n html`\n <div id=\"series-properties-container\" fullwidth>\n <div id=\"series-tab-header\">\n <md-icon\n id=\"series-tab-nav-left-button\"\n @tap=${(e: Event) => {\n this._onTabScrollNavLeft(e, 'series')\n }}\n disabled\n >chevron_left</md-icon\n >\n <div\n id=\"series-tabs\"\n @change=${(e: Event) => {\n configurer.currentSeriesIndex = (e.target as any).activeTabIndex\n }}\n active-tab-index=${configurer.currentSeriesIndex}\n fit-container\n >\n ${configurer.datasets.map(\n (dataset: any, index: number) => html`\n <div\n data-series=${index + 1}\n data-tab-index=${index}\n tab\n ?selected=${index == configurer.currentSeriesIndex}\n @click=${(e: Event) => {\n const target = e.target as HTMLDivElement\n this.configurer.setCurrentSeriesIndex(Number(target.getAttribute('data-tab-index')))\n this.value = { ...this.configurer.value }\n }}\n >\n ${index + 1}\n ${!configurer.datasets ||\n (configurer.datasets.length != 1 && configurer.currentSeriesIndex == index)\n ? html` <md-icon @tap=${(e: Event) => this.onTapRemoveCurrentSeriesTab(index)}> close </md-icon> `\n : html``}\n </div>\n `\n )}\n </div>\n <md-icon\n id=\"series-tab-nav-right-button\"\n @click=${(e: Event) => {\n this._onTabScrollNavRight(e, 'series')\n }}\n disabled\n >chevron_right</md-icon\n >\n </div>\n <div id=\"add-series-button-container\">\n <md-icon id=\"add-series-button\" @tap=${(e: Event) => this.onTapAddSeriesTab(e)}>add</md-icon>\n </div>\n\n <div class=\"tab-content\">\n <label for=\"data-key\"> <ox-i18n msgid=\"label.data-key\">Data Key</ox-i18n> </label>\n <input id=\"data-key\" type=\"text\" value-key=\"dataKey\" .value=${configurer.dataKey || ''} />\n\n ${this.chartType == 'line' || this.chartType == 'bar'\n ? html`\n <label for=\"series-type\"> <ox-i18n msgid=\"label.series-type\">Type</ox-i18n> </label>\n <select\n id=\"series-type\"\n class=\"select-content\"\n value-key=\"series.type\"\n .value=${configurer.series.type || ''}\n >\n <option value=\"bar\" selected>Bar</option>\n <option value=\"line\">Line</option>\n </select>\n `\n : html``}\n\n <label for=\"series-label\"> <ox-i18n msgid=\"label.label\">Label</ox-i18n> </label>\n <input id=\"series-label\" type=\"text\" value-key=\"series.label\" .value=${configurer.series.label || ''} />\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-line-tension\"> <ox-i18n msgid=\"label.line-tension\">Line Tension</ox-i18n> </label>\n <select\n id=\"series-line-tension\"\n class=\"select-content\"\n value-key=\"series.lineTension\"\n .value=${String(configurer.series.lineTension || 0)}\n >\n <option value=\"0.4\">Smooth</option>\n <option value=\"0\">Angled</option>\n </select>\n `\n : html``}\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-border-width\"> <ox-i18n msgid=\"label.border-width\">Border Width</ox-i18n> </label>\n <input\n id=\"series-border-width\"\n type=\"number\"\n value-key=\"series.borderWidth\"\n .value=${String(configurer.series.borderWidth || 0)}\n />\n `\n : html``}\n\n <label for=\"series-color\"> <ox-i18n msgid=\"label.color\">Color</ox-i18n> </label>\n <ox-input-color id=\"series-color\" value-key=\"color\" .value=${configurer.color}></ox-input-color>\n\n ${configurer.series.type == 'line'\n ? html`\n <label for=\"series-point-style\"> <ox-i18n msgid=\"label.point-shape\">Point Shape</ox-i18n> </label>\n <select\n id=\"series-point-style\"\n class=\"select-content\"\n value-key=\"series.pointStyle\"\n .value=${configurer.series.pointStyle || ''}\n >\n <option value=\"\">&nbsp;</option>\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 for=\"series-point-radius\"> <ox-i18n msgid=\"label.point-size\">Point Size</ox-i18n> </label>\n <input\n id=\"series-point-radius\"\n type=\"number\"\n value-key=\"series.pointRadius\"\n .value=${String(configurer.series.pointRadius || 0)}\n />\n `\n : html``} <label for=\"series-stack\"> <ox-i18n msgid=\"label.stack-group\">Stack group</ox-i18n> </label>\n <input id=\"series-stack\" type=\"text\" value-key=\"series.stack\" .value=${configurer.series.stack || ''} />\n ${configurer.series.type == 'line'\n ? html`\n <input id=\"seires-fill\" type=\"checkbox\" value-key=\"series.fill\" ?checked=${configurer.series.fill} />\n <label for=\"seires-fill\"> <ox-i18n msgid=\"label.fill\">Fill</ox-i18n> </label>\n `\n : html``}\n ${configurer.multiAxis\n ? html`\n <label for=\"series-y-axis-id\"> <ox-i18n msgid=\"label.target-axis\">Target Axis</ox-i18n> </label>\n <select\n id=\"series-y-axis-id\"\n class=\"select-content\"\n value-key=\"series.yAxisID\"\n .value=${configurer.series.yAxisID || ''}\n >\n <option value=\"left\">Left</option>\n <option value=\"right\">Right</option>\n </select>\n `\n : html``}\n ${this.displayValueTemplate()}\n </div>\n </div>\n `\n )\n }\n\n _onTabScroll(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n let tabNavLeftButton: MdIcon\n let tabNavRightButton: MdIcon\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n tabNavLeftButton = this.seriesTabNavLeftButton\n tabNavRightButton = this.seriesTabNavRightButton\n } else {\n tabContainer = this.annotationsTabContainer\n tabNavLeftButton = this.annotationsTabNavLeftButton\n tabNavRightButton = this.annotationsTabNavRightButton\n }\n\n if (!tabContainer) {\n return\n }\n\n if (tabContainer.clientWidth == tabContainer.scrollWidth) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.setAttribute('disabled', '')\n }\n // left-end\n else if (tabContainer.scrollLeft == 0) {\n tabNavLeftButton.setAttribute('disabled', '')\n tabNavRightButton.removeAttribute('disabled')\n }\n // right-end\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 _onTabScrollNavLeft(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n } else {\n tabContainer = this.annotationsTabContainer\n }\n\n if (!tabContainer) {\n return\n }\n\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft -= tabContainer.clientWidth\n tabContainer.style.scrollBehavior = 'auto'\n }\n\n _onTabScrollNavRight(e: Event, type: 'series' | 'annotations') {\n let tabContainer: HTMLElement | null | undefined\n\n if (type === 'series') {\n tabContainer = this.seriesTabContainer\n } else {\n tabContainer = this.annotationsTabContainer\n }\n\n if (!tabContainer) {\n return\n }\n\n tabContainer.style.scrollBehavior = 'smooth'\n tabContainer.scrollLeft += tabContainer.clientWidth\n tabContainer.style.scrollBehavior = 'auto'\n }\n}\n"]}
@@ -2,6 +2,7 @@ import '@operato/i18n/ox-i18n.js';
2
2
  import { InputChartAbstract } from './input-chart-abstract';
3
3
  export declare class OxInputChartTimeseries extends InputChartAbstract {
4
4
  static styles: import("lit").CSSResult[];
5
+ annotationExpanded: boolean;
5
6
  subTemplate(): import("lit-html").TemplateResult<1>;
6
7
  _hasBarSeries(config: any): boolean;
7
8
  }
@@ -1,11 +1,33 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '@operato/i18n/ox-i18n.js';
3
- import { html } from 'lit';
4
- import { customElement } from 'lit/decorators.js';
3
+ import { html, css } from 'lit';
4
+ import { customElement, state } from 'lit/decorators.js';
5
5
  import { ifDefined } from 'lit/directives/if-defined.js';
6
6
  import { InputChartAbstract } from './input-chart-abstract';
7
7
  let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbstract {
8
- static { this.styles = InputChartAbstract.styles; }
8
+ constructor() {
9
+ super(...arguments);
10
+ this.annotationExpanded = false;
11
+ }
12
+ static { this.styles = [
13
+ ...InputChartAbstract.styles,
14
+ css `
15
+ legend[collapsable] {
16
+ box-sizing: border-box;
17
+ width: 100%;
18
+ }
19
+
20
+ legend[collapsable] md-icon {
21
+ float: right;
22
+ font-size: medium;
23
+ margin: 0;
24
+ }
25
+
26
+ div[collapsed] {
27
+ display: none;
28
+ }
29
+ `
30
+ ]; }
9
31
  subTemplate() {
10
32
  const configurer = this.configurer;
11
33
  return html `
@@ -15,9 +37,6 @@ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbst
15
37
  <legend><ox-i18n msgid="label.series">Series</ox-i18n></legend>
16
38
  <div fullwidth>${this.multiSeriesTabTemplate()}</div>
17
39
 
18
- <legend><ox-i18n msgid="label.chart-annotation">Annotations</ox-i18n></legend>
19
- <div fullwidth>${this.annotationsTabTemplate()}</div>
20
-
21
40
  <legend><ox-i18n msgid="label.x-axes">X Axes</ox-i18n></legend>
22
41
 
23
42
  <label for="series-data-key"> <ox-i18n msgid="label.data-key">Data Key</ox-i18n> </label>
@@ -221,6 +240,17 @@ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbst
221
240
  <label for="y-axes1-ticks-display"> <ox-i18n msgid="label.display-tick">Display Tick</ox-i18n> </label>
222
241
  `
223
242
  : html ``}
243
+
244
+ <legend collapsable>
245
+ <ox-i18n msgid="label.chart-annotation">Annotations</ox-i18n>
246
+ <md-icon
247
+ @tap=${() => {
248
+ this.annotationExpanded = !this.annotationExpanded;
249
+ }}
250
+ >${this.annotationExpanded ? 'expand_less' : 'expand_more'}</md-icon
251
+ >
252
+ </legend>
253
+ <div fullwidth ?collapsed=${!this.annotationExpanded}>${this.annotationsTabTemplate()}</div>
224
254
  `;
225
255
  }
226
256
  _hasBarSeries(config) {
@@ -229,6 +259,9 @@ let OxInputChartTimeseries = class OxInputChartTimeseries extends InputChartAbst
229
259
  return hasBarSeries;
230
260
  }
231
261
  };
262
+ __decorate([
263
+ state()
264
+ ], OxInputChartTimeseries.prototype, "annotationExpanded", void 0);
232
265
  OxInputChartTimeseries = __decorate([
233
266
  customElement('ox-input-chart-timeseries')
234
267
  ], OxInputChartTimeseries);
@@ -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,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;AAGpD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,kBAAkB;aACrD,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;;;;uBAI3E,IAAI,CAAC,sBAAsB,EAAE;;;uBAG7B,IAAI,CAAC,sBAAsB,EAAE;;;;;+EAK2B,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC;;;;;;;gBAOjG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC;;;QAG9C,IAAI,CAAC,a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Defined } from 'lit/directives/if-defined.js'\n\nimport { InputChartAbstract } from './input-chart-abstract'\n\n@customElement('ox-input-chart-timeseries')\nexport class OxInputChartTimeseries 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 <div fullwidth>${this.multiSeriesTabTemplate()}</div>\n\n <legend><ox-i18n msgid=\"label.chart-annotation\">Annotations</ox-i18n></legend>\n <div fullwidth>${this.annotationsTabTemplate()}</div>\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-timeseries.js","sourceRoot":"","sources":["../../../src/editors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BAClC,CAAC,CAAC,IAAI,CAAA;;;;;;4BAMQ,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,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;;;;;iBAKC,GAAG,EAAE;YACV,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAA;QACpD,CAAC;aACE,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa;;;kCAGlC,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,sBAAsB,EAAE;KACtF,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;;AA1OQ;IAAR,KAAK,EAAE;kEAA2B;AArBxB,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAgQlC","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\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 div[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 <div fullwidth>${this.multiSeriesTabTemplate()}</div>\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 <div fullwidth ?collapsed=${!this.annotationExpanded}>${this.annotationsTabTemplate()}</div>\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"]}
@@ -18,6 +18,9 @@ declare class OxSciChart extends LitElement {
18
18
  loadSciChart(): Promise<void>;
19
19
  initializeSciChart(): Promise<void>;
20
20
  updated(changedProperties: Map<string | number | symbol, unknown>): Promise<void>;
21
+ appendData(appendum: {
22
+ [attr: string]: any;
23
+ }[]): Promise<void>;
21
24
  updateDataSeries(): void;
22
25
  get dataSet(): {
23
26
  xValue: number;
@@ -65,6 +65,7 @@ let OxSciChart = class OxSciChart extends LitElement {
65
65
  this.chart?.sciChartSurface.zoomExtents();
66
66
  }
67
67
  }
68
+ async appendData(appendum) { }
68
69
  updateDataSeries() {
69
70
  if (!this.dataSeries?.length)
70
71
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-scichart.js","sourceRoot":"","sources":["../../../src/scichart/ox-scichart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAUlD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAC8B,WAAM,GAAoC,IAAI,CAAA;QAC/C,SAAI,GAA8B,EAAE,CAAA;QAEvD,UAAK,GAAQ,IAAI,CAAA;QACjB,eAAU,GAAU,EAAE,CAAA;IAyHhC,CAAC;aArHQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;GAiBlB,AAjBY,CAiBZ;IAED,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,sBAAs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,IAAI,CAAC,EAAE;gBACV,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACtC,OAAM;gBACR,CAAC;gBAED,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;gBACpC,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;oBAC5B,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;oBAC3C,OAAM;gBACR,CAAC;gBAED,OAAO;oBACL,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI;oBAC/B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,OAAQ,CAAC;iBAC/B,CAAA;YACH,CAAC,CAAC;iBACD,MAAM,CAAC,OAAO,CAAyC,CAAA;QAC5D,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,sDAAsD,CAAA;IACnE,CAAC;;AA5H2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA+C;AAC/C;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAAqC;AAKvC;IAAvB,KAAK,CAAC,eAAe,CAAC;6CAA2B;AAP9C,UAAU;IADf,aAAa,CAAC,aAAa,CAAC;GACvB,UAAU,CA8Hf","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { buildSciChart } from './scichart-builder'\n\ndeclare global {\n interface Window {\n sciChartLoaded: boolean\n sciChartLoadingPromise: Promise<void>\n }\n}\n\n@customElement('ox-scichart')\nclass OxSciChart extends LitElement {\n @property({ type: Object }) config: OperatoChart.ChartConfig | null = null\n @property({ type: Array }) data: { [attr: string]: any }[] = []\n\n private chart: any = null\n private dataSeries: any[] = []\n\n @query('div#container') container!: HTMLDivElement\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .chart-container {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n .chart-content {\n flex: 1;\n position: relative;\n }\n `\n\n firstUpdated() {\n this.loadSciChart()\n }\n\n async loadSciChart() {\n if (!window.sciChartLoaded) {\n if (!window.sciChartLoadingPromise) {\n window.sciChartLoadingPromise = new Promise<void>(resolve => {\n const script = document.createElement('script')\n script.src = 'https://cdn.jsdelivr.net/npm/scichart/index.min.js'\n script.crossOrigin = 'anonymous'\n script.onload = () => {\n window.sciChartLoaded = true\n\n SciChart.SciChartSurface.UseCommunityLicense()\n\n resolve()\n }\n document.head.appendChild(script)\n })\n }\n\n await window.sciChartLoadingPromise\n }\n\n this.initializeSciChart()\n }\n\n async initializeSciChart() {\n const { chart, dataSeries } = (await buildSciChart(this.config, this.container, {})) || {}\n\n this.chart = chart\n this.dataSeries = dataSeries!\n\n this.updateDataSeries()\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('config') && this.config) {\n await this.initializeSciChart()\n }\n\n if (changedProperties.has('data')) {\n this.updateDataSeries()\n this.chart?.sciChartSurface.zoomExtents()\n }\n }\n\n updateDataSeries() {\n if (!this.dataSeries?.length) return\n\n this.dataSeries.forEach(ds => ds.clear())\n const newData = this.dataSet\n\n newData.forEach((data, index) => {\n const xValues = data.map(d => d.xValue)\n const yValues = data.map(d => d.yValue || 0)\n\n this.dataSeries[index].appendRange(xValues, yValues)\n })\n\n this.chart?.sciChartSurface.zoomExtents()\n this.chart?.sciChartSurface.invalidateElement()\n }\n\n get dataSet(): { xValue: number; yValue: number }[][] {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n return datasets.map(dataset => {\n return data\n .map(item => {\n if (!item || typeof item !== 'object') {\n return\n }\n\n const xValue = new Date(item[attrX])\n if (isNaN(xValue.getTime())) {\n console.error('Invalid date:', item[attrX])\n return\n }\n\n return {\n xValue: xValue.getTime() / 1000,\n yValue: item[dataset.dataKey!]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n })\n }\n\n render() {\n return html` <div id=\"container\" class=\"chart-container\"></div> `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart': OxSciChart\n }\n}\n"]}
1
+ {"version":3,"file":"ox-scichart.js","sourceRoot":"","sources":["../../../src/scichart/ox-scichart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAUlD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAC8B,WAAM,GAAoC,IAAI,CAAA;QAC/C,SAAI,GAA8B,EAAE,CAAA;QAEvD,UAAK,GAAQ,IAAI,CAAA;QACjB,eAAU,GAAU,EAAE,CAAA;IA2HhC,CAAC;aAvHQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;GAiBlB,AAjBY,CAiBZ;IAED,YAAY;QACV,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;gBACnC,MAAM,CAAC,sBAAsB,GAAG,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;oBAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;oBAC/C,MAAM,CAAC,GAAG,GAAG,oDAAoD,CAAA;oBACjE,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;oBAChC,MAAM,CAAC,MAAM,GAAG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,OAAO,EAAE,CAAC,EAAE,CAAC;oBAC5B,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;oBAC3C,OAAM;gBACR,CAAC;gBAED,OAAO;oBACL,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI;oBAC/B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,OAAQ,CAAC;iBAC/B,CAAA;YACH,CAAC,CAAC;iBACD,MAAM,CAAC,OAAO,CAAyC,CAAA;QAC5D,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,sDAAsD,CAAA;IACnE,CAAC;;AA9H2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA+C;AAC/C;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAAqC;AAKvC;IAAvB,KAAK,CAAC,eAAe,CAAC;6CAA2B;AAP9C,UAAU;IADf,aAAa,CAAC,aAAa,CAAC;GACvB,UAAU,CAgIf","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { property, query, customElement } from 'lit/decorators.js'\nimport { buildSciChart } from './scichart-builder'\n\ndeclare global {\n interface Window {\n sciChartLoaded: boolean\n sciChartLoadingPromise: Promise<void>\n }\n}\n\n@customElement('ox-scichart')\nclass OxSciChart extends LitElement {\n @property({ type: Object }) config: OperatoChart.ChartConfig | null = null\n @property({ type: Array }) data: { [attr: string]: any }[] = []\n\n private chart: any = null\n private dataSeries: any[] = []\n\n @query('div#container') container!: HTMLDivElement\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .chart-container {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n .chart-content {\n flex: 1;\n position: relative;\n }\n `\n\n firstUpdated() {\n this.loadSciChart()\n }\n\n async loadSciChart() {\n if (!window.sciChartLoaded) {\n if (!window.sciChartLoadingPromise) {\n window.sciChartLoadingPromise = new Promise<void>(resolve => {\n const script = document.createElement('script')\n script.src = 'https://cdn.jsdelivr.net/npm/scichart/index.min.js'\n script.crossOrigin = 'anonymous'\n script.onload = () => {\n window.sciChartLoaded = true\n\n SciChart.SciChartSurface.UseCommunityLicense()\n\n resolve()\n }\n document.head.appendChild(script)\n })\n }\n\n await window.sciChartLoadingPromise\n }\n\n this.initializeSciChart()\n }\n\n async initializeSciChart() {\n const { chart, dataSeries } = (await buildSciChart(this.config, this.container, {})) || {}\n\n this.chart = chart\n this.dataSeries = dataSeries!\n\n this.updateDataSeries()\n }\n\n async updated(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('config') && this.config) {\n await this.initializeSciChart()\n }\n\n if (changedProperties.has('data')) {\n this.updateDataSeries()\n this.chart?.sciChartSurface.zoomExtents()\n }\n }\n\n async appendData(appendum: { [attr: string]: any }[]) {}\n\n updateDataSeries() {\n if (!this.dataSeries?.length) return\n\n this.dataSeries.forEach(ds => ds.clear())\n const newData = this.dataSet\n\n newData.forEach((data, index) => {\n const xValues = data.map(d => d.xValue)\n const yValues = data.map(d => d.yValue || 0)\n\n this.dataSeries[index].appendRange(xValues, yValues)\n })\n\n this.chart?.sciChartSurface.zoomExtents()\n this.chart?.sciChartSurface.invalidateElement()\n }\n\n get dataSet(): { xValue: number; yValue: number }[][] {\n const { config, data } = this\n const { datasets = [], labelDataKey: attrX } = config?.data || {}\n\n if (!(data instanceof Array) || !attrX) {\n return []\n }\n\n return datasets.map(dataset => {\n return data\n .map(item => {\n if (!item || typeof item !== 'object') {\n return\n }\n\n const xValue = new Date(item[attrX])\n if (isNaN(xValue.getTime())) {\n console.error('Invalid date:', item[attrX])\n return\n }\n\n return {\n xValue: xValue.getTime() / 1000,\n yValue: item[dataset.dataKey!]\n }\n })\n .filter(Boolean) as { xValue: number; yValue: number }[]\n })\n }\n\n render() {\n return html` <div id=\"container\" class=\"chart-container\"></div> `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ox-scichart': OxSciChart\n }\n}\n"]}