@siemens/charts-ng 48.0.0-next.2 → 48.0.0-next.4
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/README.md +1 -1
- package/fesm2022/siemens-charts-ng.mjs +82 -8
- package/fesm2022/siemens-charts-ng.mjs.map +1 -1
- package/index.d.ts +86 -5
- package/package.json +2 -2
- package/projects/charts-ng/README.md +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ export class AppModule {}
|
|
|
37
37
|
|
|
38
38
|
### Running unit tests
|
|
39
39
|
|
|
40
|
-
Run `
|
|
40
|
+
Run `npm run charts:test` to perform the unit tests via [Karma](https://karma-runner.github.io).
|
|
41
41
|
You can set a seed for running the tests in a specific using an environment variable: `SEED=71384 yarn lib:test`
|
|
42
42
|
|
|
43
43
|
## License
|
|
@@ -5,6 +5,7 @@ import { BarChart, CandlestickChart, CustomChart, GaugeChart, HeatmapChart, Line
|
|
|
5
5
|
import { AxisPointerComponent, BrushComponent, DataZoomInsideComponent, DataZoomSliderComponent, DatasetComponent, GridComponent, LegendComponent, LegendScrollComponent, MarkAreaComponent, MarkLineComponent, MarkPointComponent, PolarComponent, SingleAxisComponent, TitleComponent, ToolboxComponent, TooltipComponent, VisualMapComponent } from 'echarts/components';
|
|
6
6
|
import * as echarts from 'echarts/core';
|
|
7
7
|
export { echarts };
|
|
8
|
+
import { LegacyGridContainLabel } from 'echarts/features';
|
|
8
9
|
import { CanvasRenderer, SVGRenderer } from 'echarts/renderers';
|
|
9
10
|
import { CommonModule } from '@angular/common';
|
|
10
11
|
|
|
@@ -44,7 +45,9 @@ echarts.use([
|
|
|
44
45
|
SunburstChart,
|
|
45
46
|
// renderers
|
|
46
47
|
CanvasRenderer,
|
|
47
|
-
SVGRenderer
|
|
48
|
+
SVGRenderer,
|
|
49
|
+
// features
|
|
50
|
+
LegacyGridContainLabel
|
|
48
51
|
]);
|
|
49
52
|
|
|
50
53
|
/**
|
|
@@ -166,11 +169,14 @@ const themeElement = {
|
|
|
166
169
|
textStyle: {
|
|
167
170
|
fontFamily
|
|
168
171
|
},
|
|
172
|
+
richInheritPlainLabel: false,
|
|
169
173
|
color: colorPalettes.default,
|
|
170
174
|
gradientColor: gradientColors.default,
|
|
171
175
|
backgroundColor: 'transparent',
|
|
172
176
|
animationDuration: 700,
|
|
173
177
|
title: {
|
|
178
|
+
left: 0,
|
|
179
|
+
top: 0,
|
|
174
180
|
padding: [10, 0, 0, 10],
|
|
175
181
|
textStyle: {
|
|
176
182
|
fontFamily,
|
|
@@ -191,6 +197,7 @@ const themeElement = {
|
|
|
191
197
|
left: 'auto',
|
|
192
198
|
right: 20,
|
|
193
199
|
top: 35,
|
|
200
|
+
itemGap: 10,
|
|
194
201
|
textStyle: {
|
|
195
202
|
fontFamily,
|
|
196
203
|
color: textColor,
|
|
@@ -294,6 +301,7 @@ const themeElement = {
|
|
|
294
301
|
hideOverlap: true
|
|
295
302
|
},
|
|
296
303
|
axisTick: {
|
|
304
|
+
show: true,
|
|
297
305
|
alignWithLabel: true
|
|
298
306
|
},
|
|
299
307
|
splitLine: {
|
|
@@ -322,6 +330,7 @@ const themeElement = {
|
|
|
322
330
|
hideOverlap: true
|
|
323
331
|
},
|
|
324
332
|
axisTick: {
|
|
333
|
+
show: true,
|
|
325
334
|
alignWithLabel: true
|
|
326
335
|
},
|
|
327
336
|
splitLine: {
|
|
@@ -361,7 +370,8 @@ const themeElement = {
|
|
|
361
370
|
},
|
|
362
371
|
selectedDataBackground: {
|
|
363
372
|
areaStyle: {
|
|
364
|
-
color: dataZoomLineColor
|
|
373
|
+
color: dataZoomLineColor,
|
|
374
|
+
opacity: 0.2
|
|
365
375
|
},
|
|
366
376
|
lineStyle: {
|
|
367
377
|
color: dataZoomLineColor
|
|
@@ -403,9 +413,11 @@ const themeElement = {
|
|
|
403
413
|
areaStyle: {
|
|
404
414
|
opacity: 0.3
|
|
405
415
|
},
|
|
406
|
-
symbol: 'circle'
|
|
416
|
+
symbol: 'circle',
|
|
417
|
+
symbolSize: 4
|
|
407
418
|
},
|
|
408
419
|
pie: {
|
|
420
|
+
radius: [0, '75%'],
|
|
409
421
|
label: {
|
|
410
422
|
fontFamily,
|
|
411
423
|
formatter: '{d}%',
|
|
@@ -414,6 +426,7 @@ const themeElement = {
|
|
|
414
426
|
fontSize
|
|
415
427
|
},
|
|
416
428
|
labelLine: {
|
|
429
|
+
length2: 15,
|
|
417
430
|
lineStyle: {
|
|
418
431
|
color: elementTextSecondary
|
|
419
432
|
}
|
|
@@ -592,14 +605,23 @@ class SiCustomLegendComponent {
|
|
|
592
605
|
/** @internal */
|
|
593
606
|
customLegendContainer = viewChild.required('customLegendContainer');
|
|
594
607
|
customLegend = input();
|
|
608
|
+
/** The legend title. */
|
|
595
609
|
title = input();
|
|
610
|
+
/** The legend subtitle. */
|
|
596
611
|
subTitle = input();
|
|
612
|
+
/** The color of the legend title. */
|
|
597
613
|
titleColor = input();
|
|
614
|
+
/** The color of the legend subtitle. */
|
|
598
615
|
subTitleColor = input();
|
|
616
|
+
/** The color of the legend text. */
|
|
599
617
|
textColor = input();
|
|
618
|
+
/** The event emitted when a legend icon is clicked. */
|
|
600
619
|
legendIconClickEvent = output();
|
|
620
|
+
/** The event emitted when a legend is clicked. */
|
|
601
621
|
legendClickEvent = output();
|
|
622
|
+
/** The event emitted when the mouse enters a legend. */
|
|
602
623
|
legendHoverStartEvent = output();
|
|
624
|
+
/** The event emitted when the mouse leaves a legend. */
|
|
603
625
|
legendHoverEndEvent = output();
|
|
604
626
|
legendIconClick(legend) {
|
|
605
627
|
legend.selected = !legend.selected;
|
|
@@ -643,11 +665,22 @@ class SiChartComponent {
|
|
|
643
665
|
options = input();
|
|
644
666
|
/** Used to override specific properties set in `options`. */
|
|
645
667
|
additionalOptions = input();
|
|
668
|
+
/** The title of the chart. */
|
|
646
669
|
title = input();
|
|
670
|
+
/** The subtitle of the chart. */
|
|
647
671
|
subTitle = input();
|
|
648
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* Show Echarts legend
|
|
674
|
+
*
|
|
675
|
+
* @defaultValue true
|
|
676
|
+
*/
|
|
649
677
|
showLegend = model(true);
|
|
650
|
-
/**
|
|
678
|
+
/**
|
|
679
|
+
* Enable to show a custom legend.
|
|
680
|
+
* The custom legend offers additional features such as, scroll bar to avoid legend and chart overlapping,
|
|
681
|
+
* Left and right alignment of legends based on y-axis, etc and many more.
|
|
682
|
+
* @defaultValue false
|
|
683
|
+
*/
|
|
651
684
|
showCustomLegend = input(false);
|
|
652
685
|
/**
|
|
653
686
|
* the renderer to use: canvas or svg
|
|
@@ -682,10 +715,16 @@ class SiChartComponent {
|
|
|
682
715
|
/**
|
|
683
716
|
* Enables zooming inside the chart with the mouse wheel/touch.
|
|
684
717
|
*
|
|
718
|
+
* Whether zooming inside the chart is possible with mouse.
|
|
719
|
+
*
|
|
685
720
|
* @defaultValue false
|
|
686
721
|
*/
|
|
687
722
|
zoomInside = input(false);
|
|
688
|
-
/**
|
|
723
|
+
/**
|
|
724
|
+
* Maximum number of series data points shown in the chart.
|
|
725
|
+
*
|
|
726
|
+
* @defaultValue 1000
|
|
727
|
+
*/
|
|
689
728
|
maxEntries = input(1000);
|
|
690
729
|
/**
|
|
691
730
|
* No auto dataZoom update) by default. Use together with `autoZoomSeriesIndex`.
|
|
@@ -721,19 +760,42 @@ class SiChartComponent {
|
|
|
721
760
|
* @defaultValue false
|
|
722
761
|
*/
|
|
723
762
|
axisPointer = input(false);
|
|
763
|
+
/**
|
|
764
|
+
* Apply a specific zoom range (see {@link https://echarts.apache.org/en/option.html#dataZoom-inside}).
|
|
765
|
+
*/
|
|
724
766
|
dataZoomRange = input();
|
|
767
|
+
/**
|
|
768
|
+
* The lower limit of the data zoom slider (see {@link https://echarts.apache.org/en/option.html#dataZoom-slider.minValueSpan}).
|
|
769
|
+
*/
|
|
725
770
|
dataZoomMinValueSpan = input();
|
|
771
|
+
/**
|
|
772
|
+
* The upper limit of the data zoom slider (see {@link https://echarts.apache.org/en/option.html#dataZoom-slider.maxValueSpan}).
|
|
773
|
+
*/
|
|
726
774
|
dataZoomMaxValueSpan = input();
|
|
727
|
-
/**
|
|
775
|
+
/**
|
|
776
|
+
* The data zoom filter mode. (see {@link https://echarts.apache.org/en/option.html#dataZoom-inside.filterMode})
|
|
777
|
+
*
|
|
778
|
+
* The value 'filter' will cause the lines to be disconnected to the outside of the chart.
|
|
779
|
+
*
|
|
780
|
+
* @defaultValue 'none'
|
|
781
|
+
*/
|
|
728
782
|
dataZoomFilterMode = input('none');
|
|
783
|
+
/**
|
|
784
|
+
* Enable custom legend click actions exposed by the `selectionChanged` event.
|
|
785
|
+
*/
|
|
729
786
|
customLegendAction = input();
|
|
730
787
|
/**
|
|
788
|
+
* Specify selected legend item.
|
|
789
|
+
*
|
|
731
790
|
* @defaultValue
|
|
732
791
|
* ```
|
|
733
792
|
* { legendItemName: '' }
|
|
734
793
|
* ```
|
|
735
794
|
*/
|
|
736
795
|
selectedItem = input({ legendItemName: '' });
|
|
796
|
+
/**
|
|
797
|
+
* The height of the ECharts container as decimal.
|
|
798
|
+
*/
|
|
737
799
|
eChartContainerHeight = input();
|
|
738
800
|
/**
|
|
739
801
|
* Flag to use external zoom slider
|
|
@@ -754,12 +816,15 @@ class SiChartComponent {
|
|
|
754
816
|
dataZoom = output();
|
|
755
817
|
/** Event emitted when axis pointer moves. */
|
|
756
818
|
pointer = output();
|
|
819
|
+
/** Event emitted when selection changes e.g. clicking on a legend item. */
|
|
757
820
|
selectionChanged = output();
|
|
821
|
+
/** Event emitted when a chart series is clicked. */
|
|
758
822
|
chartSeriesClick = output();
|
|
759
823
|
/** Event emitted when chart grid is resized. */
|
|
760
824
|
chartGridResized = output();
|
|
825
|
+
/** Event emitted when custom legend multi-line info changes. */
|
|
761
826
|
customLegendMultiLineInfoEvent = output();
|
|
762
|
-
/** Emitted when
|
|
827
|
+
/** Emitted when data zoom changes, indicating the time range in milliseconds, 0 for full range */
|
|
763
828
|
timeRangeChange = output();
|
|
764
829
|
/** Allow to override options specific for a chart type. */
|
|
765
830
|
actualOptions = {};
|
|
@@ -2333,10 +2398,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
2333
2398
|
* SPDX-License-Identifier: MIT
|
|
2334
2399
|
*/
|
|
2335
2400
|
class SiChartCartesianComponent extends SiChartComponent {
|
|
2401
|
+
/** The series for the chart. */
|
|
2336
2402
|
series = input();
|
|
2337
2403
|
subChartGrids = input();
|
|
2404
|
+
/** The y axis in cartesian(rectangular) coordinate. */
|
|
2338
2405
|
yAxis = input();
|
|
2406
|
+
/** The x axis in cartesian(rectangular) coordinate. */
|
|
2339
2407
|
xAxis = input();
|
|
2408
|
+
/** The content formatter of tooltip's floating layer which supports string template and callback function (see (see {@link https://echarts.apache.org/en/option.html#tooltip.formatter }). */
|
|
2340
2409
|
tooltipFormatter = input();
|
|
2341
2410
|
/**
|
|
2342
2411
|
* Used to display the chart as a stacked one.
|
|
@@ -2670,6 +2739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
2670
2739
|
* SPDX-License-Identifier: MIT
|
|
2671
2740
|
*/
|
|
2672
2741
|
class SiChartCircleComponent extends SiChartComponent {
|
|
2742
|
+
/** The series for the chart. */
|
|
2673
2743
|
series = input();
|
|
2674
2744
|
applyOptions() {
|
|
2675
2745
|
this.actualOptions = {
|
|
@@ -3096,6 +3166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
3096
3166
|
* SPDX-License-Identifier: MIT
|
|
3097
3167
|
*/
|
|
3098
3168
|
class SiChartProgressComponent extends SiChartComponent {
|
|
3169
|
+
/** The series for the chart. */
|
|
3099
3170
|
series = input();
|
|
3100
3171
|
/**
|
|
3101
3172
|
* How big the data can get in degrees.
|
|
@@ -3298,6 +3369,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
3298
3369
|
* SPDX-License-Identifier: MIT
|
|
3299
3370
|
*/
|
|
3300
3371
|
class SiChartProgressBarComponent extends SiChartComponent {
|
|
3372
|
+
/** The series for the chart. */
|
|
3301
3373
|
series = input();
|
|
3302
3374
|
/** Used to display the label in inline or above the progress-bar. */
|
|
3303
3375
|
labelPosition = input();
|
|
@@ -3454,6 +3526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
3454
3526
|
* SPDX-License-Identifier: MIT
|
|
3455
3527
|
*/
|
|
3456
3528
|
class SiChartSankeyComponent extends SiChartComponent {
|
|
3529
|
+
/** The series for the chart. */
|
|
3457
3530
|
series = input();
|
|
3458
3531
|
/** @defaultValue false */
|
|
3459
3532
|
toolTip = input(false);
|
|
@@ -3483,6 +3556,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
3483
3556
|
* SPDX-License-Identifier: MIT
|
|
3484
3557
|
*/
|
|
3485
3558
|
class SiChartSunburstComponent extends SiChartComponent {
|
|
3559
|
+
/** The series for the chart. */
|
|
3486
3560
|
series = input();
|
|
3487
3561
|
/** @defaultValue false */
|
|
3488
3562
|
toolTip = input(false);
|