@operato/chart 7.0.15 → 7.0.17
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 +18 -0
- package/dist/src/chartjs/ox-chart-js.d.ts +0 -1
- package/dist/src/chartjs/ox-chart-js.js +12 -1
- package/dist/src/chartjs/ox-chart-js.js.map +1 -1
- package/dist/src/editors/input-chart-abstract.d.ts +2 -2
- package/dist/src/editors/input-chart-abstract.js +282 -259
- package/dist/src/editors/input-chart-abstract.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/chartjs/ox-chart-js.ts +14 -1
- package/src/editors/input-chart-abstract.ts +343 -313
- package/src/types.d.ts +3 -0
- package/translations/en.json +3 -0
- package/translations/ja.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
|
@@ -2,6 +2,8 @@ import '@operato/i18n/ox-i18n.js'
|
|
|
2
2
|
|
|
3
3
|
import { html, PropertyValues } from 'lit'
|
|
4
4
|
import { property, query } from 'lit/decorators.js'
|
|
5
|
+
import { keyed } from 'lit/directives/keyed.js'
|
|
6
|
+
|
|
5
7
|
import { random as randomColor, TinyColor } from '@ctrl/tinycolor'
|
|
6
8
|
import { MdIcon } from '@material/web/icon/icon.js'
|
|
7
9
|
|
|
@@ -158,7 +160,7 @@ export class InputChartAbstract extends OxFormField {
|
|
|
158
160
|
value-key="series.defaultFontSize"
|
|
159
161
|
value=${configurer.series.defaultFontSize || 10}
|
|
160
162
|
/>
|
|
161
|
-
<label for="data-label-anchor"> <ox-i18n msgid="label.
|
|
163
|
+
<label for="data-label-anchor"> <ox-i18n msgid="label.data-label-anchor">Position</ox-i18n> </label>
|
|
162
164
|
<select
|
|
163
165
|
id="data-label-anchor"
|
|
164
166
|
value-key="series.dataLabelAnchor"
|
|
@@ -168,6 +170,20 @@ export class InputChartAbstract extends OxFormField {
|
|
|
168
170
|
<option value="center" selected>Center</option>
|
|
169
171
|
<option value="end">End</option>
|
|
170
172
|
</select>
|
|
173
|
+
<label for="data-label-offset"> <ox-i18n msgid="label.data-label-offset">Offset</ox-i18n> </label>
|
|
174
|
+
<input
|
|
175
|
+
id="data-label-offset"
|
|
176
|
+
type="number"
|
|
177
|
+
value-key="series.dataLabelOffset"
|
|
178
|
+
value=${configurer.series.dataLabelOffset || 0}
|
|
179
|
+
/>
|
|
180
|
+
<label for="data-label-rotation"> <ox-i18n msgid="label.data-label-rotation">Rotation</ox-i18n> </label>
|
|
181
|
+
<input
|
|
182
|
+
id="data-label-rotation"
|
|
183
|
+
type="number"
|
|
184
|
+
value-key="series.dataLabelRotation"
|
|
185
|
+
value=${configurer.series.dataLabelRotation || 0}
|
|
186
|
+
/>
|
|
171
187
|
`
|
|
172
188
|
: html``}
|
|
173
189
|
`
|
|
@@ -389,329 +405,343 @@ export class InputChartAbstract extends OxFormField {
|
|
|
389
405
|
const configurer = this.configurer
|
|
390
406
|
const currentAnnotation = configurer.annotations[configurer.currentAnnotationIndex] || {}
|
|
391
407
|
|
|
392
|
-
return
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
408
|
+
return keyed(
|
|
409
|
+
configurer.currentAnnotationIndex,
|
|
410
|
+
html`
|
|
411
|
+
<div id="annotations-properties-container" fullwidth>
|
|
412
|
+
<div id="annotations-tab-header">
|
|
413
|
+
<md-icon
|
|
414
|
+
id="annotations-tab-nav-left-button"
|
|
415
|
+
@tap=${(e: Event) => {
|
|
416
|
+
this._onTabScrollNavLeft(e, 'annotations')
|
|
417
|
+
}}
|
|
418
|
+
disabled
|
|
419
|
+
>chevron_left</md-icon
|
|
420
|
+
>
|
|
421
|
+
<div
|
|
422
|
+
id="annotations-tabs"
|
|
423
|
+
@change=${(e: Event) => {
|
|
424
|
+
configurer.currentAnnotationIndex = (e.target as any).activeTabIndex
|
|
425
|
+
}}
|
|
426
|
+
active-tab-index=${configurer.currentAnnotationIndex}
|
|
427
|
+
fit-container
|
|
428
|
+
>
|
|
429
|
+
${configurer.annotations!.map(
|
|
430
|
+
(annotation: any, index: number) => html`
|
|
431
|
+
<div
|
|
432
|
+
data-annotation=${index + 1}
|
|
433
|
+
data-tab-index=${index}
|
|
434
|
+
tab
|
|
435
|
+
?selected=${index == configurer.currentAnnotationIndex}
|
|
436
|
+
@click=${(e: Event) => {
|
|
437
|
+
const target = e.target as HTMLDivElement
|
|
438
|
+
this.configurer.setCurrentAnnotationIndex(Number(target.getAttribute('data-tab-index')))
|
|
439
|
+
this.value = { ...this.configurer.value }
|
|
440
|
+
}}
|
|
441
|
+
>
|
|
442
|
+
${index + 1}
|
|
443
|
+
${!configurer.annotations ||
|
|
444
|
+
(configurer.annotations.length != 1 && configurer.currentAnnotationIndex == index)
|
|
445
|
+
? html`
|
|
446
|
+
<md-icon @tap=${(e: Event) => this.onTapRemoveCurrentAnnotation(index)}> close </md-icon>
|
|
447
|
+
`
|
|
448
|
+
: html``}
|
|
449
|
+
</div>
|
|
450
|
+
`
|
|
451
|
+
)}
|
|
452
|
+
</div>
|
|
453
|
+
<md-icon
|
|
454
|
+
id="annotations-tab-nav-right-button"
|
|
455
|
+
@click=${(e: Event) => {
|
|
456
|
+
this._onTabScrollNavRight(e, 'annotations')
|
|
457
|
+
}}
|
|
458
|
+
disabled
|
|
459
|
+
>chevron_right</md-icon
|
|
460
|
+
>
|
|
461
|
+
</div>
|
|
462
|
+
<div id="add-annotation-button-container">
|
|
463
|
+
<md-icon id="add-annotation-button" @tap=${(e: Event) => this.onTapAddAnnotation(e)}>add</md-icon>
|
|
432
464
|
</div>
|
|
433
|
-
<md-icon
|
|
434
|
-
id="annotations-tab-nav-right-button"
|
|
435
|
-
@click=${(e: Event) => {
|
|
436
|
-
this._onTabScrollNavRight(e, 'annotations')
|
|
437
|
-
}}
|
|
438
|
-
disabled
|
|
439
|
-
>chevron_right</md-icon
|
|
440
|
-
>
|
|
441
|
-
</div>
|
|
442
|
-
<div id="add-annotation-button-container">
|
|
443
|
-
<md-icon id="add-annotation-button" @tap=${(e: Event) => this.onTapAddAnnotation(e)}>add</md-icon>
|
|
444
|
-
</div>
|
|
445
465
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
466
|
+
<div class="tab-content">
|
|
467
|
+
<label for="annotation-type"> <ox-i18n msgid="label.chart-annotation-type">Type</ox-i18n> </label>
|
|
468
|
+
<select
|
|
469
|
+
id="annotation-type"
|
|
470
|
+
class="select-content"
|
|
471
|
+
value-key="annotation.type"
|
|
472
|
+
.value=${currentAnnotation.type || ''}
|
|
473
|
+
>
|
|
474
|
+
<option value="line">Line</option>
|
|
475
|
+
<option value="text">Text</option>
|
|
476
|
+
<option value="box">Box</option>
|
|
477
|
+
<option value="horizontalLine">Horizontal Line</option>
|
|
478
|
+
<option value="verticalLine">Vertical Line</option>
|
|
479
|
+
<option value="custom">Custom</option>
|
|
480
|
+
</select>
|
|
481
|
+
|
|
482
|
+
<label for="annotation-x1">X1</label>
|
|
483
|
+
<input
|
|
484
|
+
id="annotation-x1"
|
|
485
|
+
type="number"
|
|
486
|
+
value-key="annotation.x1"
|
|
487
|
+
.value=${String(currentAnnotation.x1 || 0)}
|
|
488
|
+
/>
|
|
489
|
+
|
|
490
|
+
<label for="annotation-y1">Y1</label>
|
|
491
|
+
<input
|
|
492
|
+
id="annotation-y1"
|
|
493
|
+
type="number"
|
|
494
|
+
value-key="annotation.y1"
|
|
495
|
+
.value=${String(currentAnnotation.y1 || 0)}
|
|
496
|
+
/>
|
|
497
|
+
|
|
498
|
+
<label for="annotation-x2">X2</label>
|
|
499
|
+
<input
|
|
500
|
+
id="annotation-x2"
|
|
501
|
+
type="number"
|
|
502
|
+
value-key="annotation.x2"
|
|
503
|
+
.value=${String(currentAnnotation.x2 || 0)}
|
|
504
|
+
/>
|
|
505
|
+
|
|
506
|
+
<label for="annotation-y2">Y2</label>
|
|
507
|
+
<input
|
|
508
|
+
id="annotation-y2"
|
|
509
|
+
type="number"
|
|
510
|
+
value-key="annotation.y2"
|
|
511
|
+
.value=${String(currentAnnotation.y2 || 0)}
|
|
512
|
+
/>
|
|
513
|
+
|
|
514
|
+
<label for="annotation-stroke"> <ox-i18n msgid="label.stroke-style">Stroke Style</ox-i18n> </label>
|
|
515
|
+
<ox-input-color
|
|
516
|
+
id="annotation-stroke"
|
|
517
|
+
value-key="annotation.stroke"
|
|
518
|
+
.value=${currentAnnotation.stroke}
|
|
519
|
+
></ox-input-color>
|
|
520
|
+
|
|
521
|
+
<label for="annotation-stroke-thickness">
|
|
522
|
+
<ox-i18n msgid="label.stroke-thickness">Stroke Thickness</ox-i18n>
|
|
523
|
+
</label>
|
|
524
|
+
<input
|
|
525
|
+
id="annotation-stroke-thickness"
|
|
526
|
+
type="number"
|
|
527
|
+
value-key="annotation.strokeThickness"
|
|
528
|
+
.value=${String(currentAnnotation.strokeThickness || 1)}
|
|
529
|
+
/>
|
|
530
|
+
|
|
531
|
+
<label for="annotation-fill"> <ox-i18n msgid="label.fill">Fill</ox-i18n> </label>
|
|
532
|
+
<ox-input-color
|
|
533
|
+
id="annotation-fill"
|
|
534
|
+
value-key="annotation.fill"
|
|
535
|
+
.value=${currentAnnotation.fill}
|
|
536
|
+
></ox-input-color>
|
|
537
|
+
|
|
538
|
+
<label for="annotation-text"> <ox-i18n msgid="label.annotation-text">Text</ox-i18n> </label>
|
|
539
|
+
<input
|
|
540
|
+
id="annotation-text"
|
|
541
|
+
type="text"
|
|
542
|
+
value-key="annotation.text"
|
|
543
|
+
.value=${currentAnnotation.text || ''}
|
|
544
|
+
/>
|
|
545
|
+
|
|
546
|
+
<label for="annotation-horizontal-anchor">
|
|
547
|
+
<ox-i18n msgid="label.horizontal-anchor">Horizontal Anchor</ox-i18n>
|
|
548
|
+
</label>
|
|
549
|
+
<select
|
|
550
|
+
id="annotation-horizontal-anchor"
|
|
551
|
+
class="select-content"
|
|
552
|
+
value-key="annotation.horizontalAnchorPoint"
|
|
553
|
+
.value=${currentAnnotation.horizontalAnchorPoint || ''}
|
|
554
|
+
>
|
|
555
|
+
<option value="Left">Left</option>
|
|
556
|
+
<option value="Center">Center</option>
|
|
557
|
+
<option value="Right">Right</option>
|
|
558
|
+
</select>
|
|
559
|
+
|
|
560
|
+
<label for="annotation-vertical-anchor">
|
|
561
|
+
<ox-i18n msgid="label.vertical-anchor">Vertical Anchor</ox-i18n>
|
|
562
|
+
</label>
|
|
563
|
+
<select
|
|
564
|
+
id="annotation-vertical-anchor"
|
|
565
|
+
class="select-content"
|
|
566
|
+
value-key="annotation.verticalAnchorPoint"
|
|
567
|
+
.value=${currentAnnotation.verticalAnchorPoint || ''}
|
|
568
|
+
>
|
|
569
|
+
<option value="Top">Top</option>
|
|
570
|
+
<option value="Center">Center</option>
|
|
571
|
+
<option value="Bottom">Bottom</option>
|
|
572
|
+
</select>
|
|
573
|
+
</div>
|
|
548
574
|
</div>
|
|
549
|
-
|
|
550
|
-
|
|
575
|
+
`
|
|
576
|
+
)
|
|
551
577
|
}
|
|
552
578
|
|
|
553
579
|
multiSeriesTabTemplate() {
|
|
554
580
|
const configurer = this.configurer
|
|
555
581
|
|
|
556
|
-
return
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
582
|
+
return keyed(
|
|
583
|
+
configurer.currentSeriesIndex,
|
|
584
|
+
html`
|
|
585
|
+
<div id="series-properties-container" fullwidth>
|
|
586
|
+
<div id="series-tab-header">
|
|
587
|
+
<md-icon
|
|
588
|
+
id="series-tab-nav-left-button"
|
|
589
|
+
@tap=${(e: Event) => {
|
|
590
|
+
this._onTabScrollNavLeft(e, 'series')
|
|
591
|
+
}}
|
|
592
|
+
disabled
|
|
593
|
+
>chevron_left</md-icon
|
|
594
|
+
>
|
|
595
|
+
<div
|
|
596
|
+
id="series-tabs"
|
|
597
|
+
@change=${(e: Event) => {
|
|
598
|
+
configurer.currentSeriesIndex = (e.target as any).activeTabIndex
|
|
599
|
+
}}
|
|
600
|
+
active-tab-index=${configurer.currentSeriesIndex}
|
|
601
|
+
fit-container
|
|
602
|
+
>
|
|
603
|
+
${configurer.datasets.map(
|
|
604
|
+
(dataset: any, index: number) => html`
|
|
605
|
+
<div
|
|
606
|
+
data-series=${index + 1}
|
|
607
|
+
data-tab-index=${index}
|
|
608
|
+
tab
|
|
609
|
+
?selected=${index == configurer.currentSeriesIndex}
|
|
610
|
+
@click=${(e: Event) => {
|
|
611
|
+
const target = e.target as HTMLDivElement
|
|
612
|
+
this.configurer.setCurrentSeriesIndex(Number(target.getAttribute('data-tab-index')))
|
|
613
|
+
this.value = { ...this.configurer.value }
|
|
614
|
+
}}
|
|
615
|
+
>
|
|
616
|
+
${index + 1}
|
|
617
|
+
${!configurer.datasets ||
|
|
618
|
+
(configurer.datasets.length != 1 && configurer.currentSeriesIndex == index)
|
|
619
|
+
? html` <md-icon @tap=${(e: Event) => this.onTapRemoveCurrentTab(index)}> close </md-icon> `
|
|
620
|
+
: html``}
|
|
621
|
+
</div>
|
|
622
|
+
`
|
|
623
|
+
)}
|
|
624
|
+
</div>
|
|
625
|
+
<md-icon
|
|
626
|
+
id="series-tab-nav-right-button"
|
|
627
|
+
@click=${(e: Event) => {
|
|
628
|
+
this._onTabScrollNavRight(e, 'series')
|
|
629
|
+
}}
|
|
630
|
+
disabled
|
|
631
|
+
>chevron_right</md-icon
|
|
632
|
+
>
|
|
633
|
+
</div>
|
|
634
|
+
<div id="add-series-button-container">
|
|
635
|
+
<md-icon id="add-series-button" @tap=${(e: Event) => this.onTapAddTab(e)}>add</md-icon>
|
|
595
636
|
</div>
|
|
596
|
-
<md-icon
|
|
597
|
-
id="series-tab-nav-right-button"
|
|
598
|
-
@click=${(e: Event) => {
|
|
599
|
-
this._onTabScrollNavRight(e, 'series')
|
|
600
|
-
}}
|
|
601
|
-
disabled
|
|
602
|
-
>chevron_right</md-icon
|
|
603
|
-
>
|
|
604
|
-
</div>
|
|
605
|
-
<div id="add-series-button-container">
|
|
606
|
-
<md-icon id="add-series-button" @tap=${(e: Event) => this.onTapAddTab(e)}>add</md-icon>
|
|
607
|
-
</div>
|
|
608
637
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
638
|
+
<div class="tab-content">
|
|
639
|
+
<label for="data-key"> <ox-i18n msgid="label.data-key">Data Key</ox-i18n> </label>
|
|
640
|
+
<input id="data-key" type="text" value-key="dataKey" .value=${configurer.dataKey || ''} />
|
|
641
|
+
|
|
642
|
+
${this.chartType == 'line' || this.chartType == 'bar'
|
|
643
|
+
? html`
|
|
644
|
+
<label for="series-type"> <ox-i18n msgid="label.series-type">Type</ox-i18n> </label>
|
|
645
|
+
<select
|
|
646
|
+
id="series-type"
|
|
647
|
+
class="select-content"
|
|
648
|
+
value-key="series.type"
|
|
649
|
+
.value=${configurer.series.type || ''}
|
|
650
|
+
>
|
|
651
|
+
<option value="bar" selected>Bar</option>
|
|
652
|
+
<option value="line">Line</option>
|
|
653
|
+
</select>
|
|
654
|
+
`
|
|
655
|
+
: html``}
|
|
656
|
+
|
|
657
|
+
<label for="series-label"> <ox-i18n msgid="label.label">Label</ox-i18n> </label>
|
|
658
|
+
<input id="series-label" type="text" value-key="series.label" .value=${configurer.series.label || ''} />
|
|
659
|
+
|
|
660
|
+
${configurer.series.type == 'line'
|
|
661
|
+
? html`
|
|
662
|
+
<label for="series-line-tension"> <ox-i18n msgid="label.line-tension">Line Tension</ox-i18n> </label>
|
|
663
|
+
<select
|
|
664
|
+
id="series-line-tension"
|
|
665
|
+
class="select-content"
|
|
666
|
+
value-key="series.lineTension"
|
|
667
|
+
.value=${String(configurer.series.lineTension || 0)}
|
|
668
|
+
>
|
|
669
|
+
<option value="0.4">Smooth</option>
|
|
670
|
+
<option value="0">Angled</option>
|
|
671
|
+
</select>
|
|
672
|
+
`
|
|
673
|
+
: html``}
|
|
674
|
+
${configurer.series.type == 'line'
|
|
675
|
+
? html`
|
|
676
|
+
<label for="series-border-width"> <ox-i18n msgid="label.border-width">Border Width</ox-i18n> </label>
|
|
677
|
+
<input
|
|
678
|
+
id="series-border-width"
|
|
679
|
+
type="number"
|
|
680
|
+
value-key="series.borderWidth"
|
|
681
|
+
.value=${String(configurer.series.borderWidth || 0)}
|
|
682
|
+
/>
|
|
683
|
+
`
|
|
684
|
+
: html``}
|
|
685
|
+
|
|
686
|
+
<label for="series-color"> <ox-i18n msgid="label.color">Color</ox-i18n> </label>
|
|
687
|
+
<ox-input-color id="series-color" value-key="color" .value=${configurer.color}></ox-input-color>
|
|
688
|
+
|
|
689
|
+
${configurer.series.type == 'line'
|
|
690
|
+
? html`
|
|
691
|
+
<label for="series-point-style"> <ox-i18n msgid="label.point-shape">Point Shape</ox-i18n> </label>
|
|
692
|
+
<select
|
|
693
|
+
id="series-point-style"
|
|
694
|
+
class="select-content"
|
|
695
|
+
value-key="series.pointStyle"
|
|
696
|
+
.value=${configurer.series.pointStyle || ''}
|
|
697
|
+
>
|
|
698
|
+
<option value=""> </option>
|
|
699
|
+
<option value="circle">⚬</option>
|
|
700
|
+
<option value="triangle">▵</option>
|
|
701
|
+
<option value="rect">□</option>
|
|
702
|
+
<option value="rectRot">◇</option>
|
|
703
|
+
<option value="cross">+</option>
|
|
704
|
+
<option value="crossRot">⨉</option>
|
|
705
|
+
<option value="star">✱</option>
|
|
706
|
+
<option value="line">―</option>
|
|
707
|
+
<option value="dash">┄</option>
|
|
708
|
+
</select>
|
|
709
|
+
|
|
710
|
+
<label for="series-point-radius"> <ox-i18n msgid="label.point-size">Point Size</ox-i18n> </label>
|
|
711
|
+
<input
|
|
712
|
+
id="series-point-radius"
|
|
713
|
+
type="number"
|
|
714
|
+
value-key="series.pointRadius"
|
|
715
|
+
.value=${String(configurer.series.pointRadius || 0)}
|
|
716
|
+
/>
|
|
717
|
+
`
|
|
718
|
+
: html``} <label for="series-stack"> <ox-i18n msgid="label.stack-group">Stack group</ox-i18n> </label>
|
|
719
|
+
<input id="series-stack" type="text" value-key="series.stack" .value=${configurer.series.stack || ''} />
|
|
720
|
+
${configurer.series.type == 'line'
|
|
721
|
+
? html`
|
|
722
|
+
<input id="seires-fill" type="checkbox" value-key="series.fill" ?checked=${configurer.series.fill} />
|
|
723
|
+
<label for="seires-fill"> <ox-i18n msgid="label.fill">Fill</ox-i18n> </label>
|
|
724
|
+
`
|
|
725
|
+
: html``}
|
|
726
|
+
${configurer.multiAxis
|
|
727
|
+
? html`
|
|
728
|
+
<label for="series-y-axis-id"> <ox-i18n msgid="label.target-axis">Target Axis</ox-i18n> </label>
|
|
729
|
+
<select
|
|
730
|
+
id="series-y-axis-id"
|
|
731
|
+
class="select-content"
|
|
732
|
+
value-key="series.yAxisID"
|
|
733
|
+
.value=${configurer.series.yAxisID || ''}
|
|
734
|
+
>
|
|
735
|
+
<option value="left">Left</option>
|
|
736
|
+
<option value="right">Right</option>
|
|
737
|
+
</select>
|
|
738
|
+
`
|
|
739
|
+
: html``}
|
|
740
|
+
${this.displayValueTemplate()}
|
|
741
|
+
</div>
|
|
712
742
|
</div>
|
|
713
|
-
|
|
714
|
-
|
|
743
|
+
`
|
|
744
|
+
)
|
|
715
745
|
}
|
|
716
746
|
|
|
717
747
|
_onTabScroll(e: Event, type: 'series' | 'annotations') {
|