@siemens/native-charts-ng 49.13.0 → 49.15.0
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/fesm2022/siemens-native-charts-ng-microchart-bar.mjs +10 -2
- package/fesm2022/siemens-native-charts-ng-microchart-bar.mjs.map +1 -1
- package/fesm2022/siemens-native-charts-ng-microchart-line.mjs +10 -2
- package/fesm2022/siemens-native-charts-ng-microchart-line.mjs.map +1 -1
- package/fesm2022/siemens-native-charts-ng-microchart-progress.mjs +10 -2
- package/fesm2022/siemens-native-charts-ng-microchart-progress.mjs.map +1 -1
- package/package.json +2 -2
- package/types/siemens-native-charts-ng-microchart-bar.d.ts +10 -2
- package/types/siemens-native-charts-ng-microchart-line.d.ts +10 -2
- package/types/siemens-native-charts-ng-microchart-progress.d.ts +10 -2
|
@@ -6,9 +6,17 @@ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/co
|
|
|
6
6
|
* SPDX-License-Identifier: MIT
|
|
7
7
|
*/
|
|
8
8
|
class SiMicrochartBarComponent {
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Chart width in pixels.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue 64
|
|
13
|
+
*/
|
|
10
14
|
width = input(64, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Chart height in pixels.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue 24
|
|
19
|
+
*/
|
|
12
20
|
height = input(24, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
13
21
|
/**
|
|
14
22
|
* Microchart bar series.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-native-charts-ng-microchart-bar.mjs","sources":["../../../../projects/native-charts-ng/microchart-bar/si-microchart-bar.component.ts","../../../../projects/native-charts-ng/microchart-bar/si-microchart-bar.component.html","../../../../projects/native-charts-ng/microchart-bar/index.ts","../../../../projects/native-charts-ng/microchart-bar/siemens-native-charts-ng-microchart-bar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nexport interface MicrochartBarSeries {\n /* Series values */\n values: number[];\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n /**\n * Color token for negative values\n */\n negativeColorToken?: string;\n}\n\ninterface SeriesInternal {\n top: number;\n height: number;\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-bar',\n templateUrl: './si-microchart-bar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiMicrochartBarComponent {\n
|
|
1
|
+
{"version":3,"file":"siemens-native-charts-ng-microchart-bar.mjs","sources":["../../../../projects/native-charts-ng/microchart-bar/si-microchart-bar.component.ts","../../../../projects/native-charts-ng/microchart-bar/si-microchart-bar.component.html","../../../../projects/native-charts-ng/microchart-bar/index.ts","../../../../projects/native-charts-ng/microchart-bar/siemens-native-charts-ng-microchart-bar.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nexport interface MicrochartBarSeries {\n /* Series values */\n values: number[];\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n /**\n * Color token for negative values\n */\n negativeColorToken?: string;\n}\n\ninterface SeriesInternal {\n top: number;\n height: number;\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-bar',\n templateUrl: './si-microchart-bar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiMicrochartBarComponent {\n /**\n * Chart width in pixels.\n *\n * @defaultValue 64\n */\n readonly width = input<number>(64);\n /**\n * Chart height in pixels.\n *\n * @defaultValue 24\n */\n readonly height = input<number>(24);\n /**\n * Microchart bar series.\n * Example series can be:\n * @example\n * ```ts\n * Series: MicrochartBarSeries = { values: [2, 4, 5, 3, 5, 7, 7, 9, 11, 10, 12, 9], colorToken: 'element-data-7'};\n * ```\n */\n readonly series = input.required<MicrochartBarSeries>();\n\n protected barWidth = 4;\n\n protected readonly internalSeries = computed<SeriesInternal[]>(() => {\n const series = this.series();\n const maxValue = Math.max(...series.values, 1);\n const minValue = Math.min(...series.values, 0);\n const allNegative = maxValue <= 0;\n const allPositive = minValue >= 0;\n const range = Math.abs(maxValue) + Math.abs(minValue);\n const zeroPosition = allNegative ? 0 : allPositive ? 100 : (Math.abs(maxValue) / range) * 100;\n\n const maxRange = allNegative ? Math.abs(minValue) : allPositive ? maxValue : range;\n\n const int = series.values.map<SeriesInternal>(value => {\n const height = (Math.abs(value) / maxRange) * 100;\n const top = value >= 0 ? zeroPosition - height : zeroPosition;\n const colorToken =\n value < 0 && series.negativeColorToken ? series.negativeColorToken : series.colorToken;\n return { top, height, colorToken };\n });\n\n return int;\n });\n}\n","<div class=\"py-2\" [style.width.px]=\"width()\" [style.height.px]=\"height()\">\n <div class=\"position-relative h-100\">\n @for (item of internalSeries(); track $index) {\n <div\n class=\"position-absolute\"\n [style.height.%]=\"item.height\"\n [style.top.%]=\"item.top\"\n [style.left.px]=\"$index * (barWidth + 1)\"\n [style.width.px]=\"barWidth\"\n [style.backgroundColor]=\"'var(--' + item.colorToken + ')'\"\n ></div>\n }\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-microchart-bar.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;MA6BU,wBAAwB,CAAA;AACnC;;;;AAIG;AACM,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AAClC;;;;AAIG;AACM,IAAA,MAAM,GA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kBAAkB,GAAG,MAAM,CAAC,UAAU;AACxF,YAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE;AACpC,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,GAAG;AACZ,IAAA,CAAC,0DAAC;uGA7CS,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,scChCrC,6fAcA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDkBa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;+BACE,mBAAmB,EAAA,eAAA,EAEZ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6fAAA,EAAA;;;AE9BjD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -16,9 +16,17 @@ class SiMicrochartLineComponent {
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
series = input.required(...(ngDevMode ? [{ debugName: "series" }] : []));
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Chart width in pixels.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue 64
|
|
23
|
+
*/
|
|
20
24
|
width = input(64, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
21
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Chart height in pixels.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue 24
|
|
29
|
+
*/
|
|
22
30
|
height = input(24, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
23
31
|
/**
|
|
24
32
|
* Display circular markers at each data point on the line.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-native-charts-ng-microchart-line.mjs","sources":["../../../../projects/native-charts-ng/microchart-line/si-microchart-line.component.ts","../../../../projects/native-charts-ng/microchart-line/si-microchart-line.component.html","../../../../projects/native-charts-ng/microchart-line/index.ts","../../../../projects/native-charts-ng/microchart-line/siemens-native-charts-ng-microchart-line.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Coordinate, makePolyline } from '@siemens/native-charts-ng/utils';\n\nexport interface MicrochartLineSeries {\n /** Series values */\n values: number[];\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-line',\n templateUrl: './si-microchart-line.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiMicrochartLineComponent {\n /**\n * Microchart line series.\n * Example series can be:\n * @example\n * ```ts\n * Series: MicrochartLineSeries = { values: [2, 3, 6, 5, 4, 7, 8], colorToken: 'element-data-10' };\n * ```\n */\n readonly series = input.required<MicrochartLineSeries>();\n
|
|
1
|
+
{"version":3,"file":"siemens-native-charts-ng-microchart-line.mjs","sources":["../../../../projects/native-charts-ng/microchart-line/si-microchart-line.component.ts","../../../../projects/native-charts-ng/microchart-line/si-microchart-line.component.html","../../../../projects/native-charts-ng/microchart-line/index.ts","../../../../projects/native-charts-ng/microchart-line/siemens-native-charts-ng-microchart-line.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Coordinate, makePolyline } from '@siemens/native-charts-ng/utils';\n\nexport interface MicrochartLineSeries {\n /** Series values */\n values: number[];\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-line',\n templateUrl: './si-microchart-line.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiMicrochartLineComponent {\n /**\n * Microchart line series.\n * Example series can be:\n * @example\n * ```ts\n * Series: MicrochartLineSeries = { values: [2, 3, 6, 5, 4, 7, 8], colorToken: 'element-data-10' };\n * ```\n */\n readonly series = input.required<MicrochartLineSeries>();\n /**\n * Chart width in pixels.\n *\n * @defaultValue 64\n */\n readonly width = input<number>(64);\n /**\n * Chart height in pixels.\n *\n * @defaultValue 24\n */\n readonly height = input<number>(24);\n /**\n * Display circular markers at each data point on the line.\n * When enabled, markers help highlight individual values and improve readability.\n *\n * @defaultValue false\n */\n readonly showMarkers = input<boolean>(false);\n /**\n * Sets whether the area under the chart line should be filled.\n *\n * @defaultValue false\n */\n readonly showArea = input<boolean>(false);\n /**\n * Line width in pixels.\n *\n * @defaultValue 2\n */\n readonly lineWidth = input<number>(2);\n /**\n * Marker color token. If not provided, uses the series color token.\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-2\"\n */\n readonly markerColor = input<string>();\n\n protected readonly markerRadius = computed(() => this.lineWidth());\n protected readonly viewBox = computed(() => {\n return `0 0 ${this.width()} ${this.height()}`;\n });\n\n protected readonly path = computed(() => {\n const series = this.series();\n if (!series || series.values.length < 2) {\n return '';\n }\n const points = this.mapToCoordinates(series.values);\n return makePolyline(points);\n });\n\n protected readonly markerPoints = computed(() => {\n const series = this.series();\n if (series?.values.length === 0) {\n return [];\n }\n return this.mapToCoordinates(series.values);\n });\n\n protected readonly areaPath = computed(() => {\n const series = this.series();\n if (!series || series.values.length < 2) {\n return '';\n }\n const points = this.mapToCoordinates(series.values);\n\n let path = `M ${points[0].x} ${this.height()}`;\n points.forEach(point => {\n path += `L ${point.x} ${point.y}`;\n });\n path += `L ${points[points.length - 1].x} ${this.height()} Z`;\n\n return path;\n });\n\n private static instanceCounter = 0;\n protected readonly gradientId = `gradient-line-${SiMicrochartLineComponent.instanceCounter++}`;\n\n private mapToCoordinates(values: number[]): Coordinate[] {\n const max = Math.max(...values);\n const min = Math.min(...values);\n\n // Calculate available space, accounting for marker radius or line width\n // This helps avoid the markers on the edges or the edges of the line getting cropped.\n const horizontalMargin = this.showMarkers() ? this.markerRadius() : this.lineWidth() / 2;\n const verticalMargin = this.showMarkers() ? this.markerRadius() : this.lineWidth() / 2;\n\n const availableWidth = this.width() - horizontalMargin * 2;\n const availableHeight = this.height() - verticalMargin * 2;\n\n const scaleX = values.length > 1 ? availableWidth / (values.length - 1) : 0;\n const scaleY = max !== min ? availableHeight / (max - min) : 1;\n\n return values.map((value, i) => ({\n x: horizontalMargin + i * scaleX,\n y: this.height() - verticalMargin - (value - min) * scaleY\n }));\n }\n}\n","<svg [attr.width]=\"width()\" [attr.height]=\"height()\" [attr.viewBox]=\"viewBox()\">\n @if (showArea()) {\n <defs>\n <linearGradient x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\" [attr.id]=\"gradientId\">\n <stop [attr.stop-color]=\"'var(--' + series().colorToken + ')'\" />\n <stop\n offset=\"1\"\n stop-opacity=\"0\"\n [attr.stop-color]=\"'var(--' + series().colorToken + ')'\"\n />\n </linearGradient>\n </defs>\n <path stroke=\"none\" [attr.d]=\"areaPath()\" [attr.fill]=\"'url(#' + gradientId + ')'\" />\n }\n <path\n fill=\"none\"\n [attr.d]=\"path()\"\n [attr.stroke]=\"'var(--' + series().colorToken + ')'\"\n [attr.stroke-width]=\"lineWidth()\"\n />\n @if (showMarkers()) {\n @for (point of markerPoints(); track point.x) {\n <circle\n [attr.cx]=\"point.x\"\n [attr.cy]=\"point.y\"\n [attr.r]=\"markerRadius()\"\n [attr.fill]=\"'var(--' + (markerColor() ?? series().colorToken) + ')'\"\n />\n }\n }\n</svg>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-microchart-line.component';\n","/**\n * Generated bundle index.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,QAAA,EAAA,IAAA,EAAA,yBAAyB,g+BCvBtC,shCA+BA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDRa,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,SAAS;+BACE,oBAAoB,EAAA,eAAA,EAEb,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,shCAAA,EAAA;;;AErBjD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -15,9 +15,17 @@ class SiMicrochartProgressComponent {
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
series = input.required(...(ngDevMode ? [{ debugName: "series" }] : []));
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Progress bar width in pixels.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue 64
|
|
22
|
+
*/
|
|
19
23
|
barWidth = input(64, ...(ngDevMode ? [{ debugName: "barWidth" }] : []));
|
|
20
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Progress bar height in pixels.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue 4
|
|
28
|
+
*/
|
|
21
29
|
barHeight = input(4, ...(ngDevMode ? [{ debugName: "barHeight" }] : []));
|
|
22
30
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: SiMicrochartProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
31
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: SiMicrochartProgressComponent, isStandalone: true, selector: "si-microchart-progress", inputs: { series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, barWidth: { classPropertyName: "barWidth", publicName: "barWidth", isSignal: true, isRequired: false, transformFunction: null }, barHeight: { classPropertyName: "barHeight", publicName: "barHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuenow": "series().valuePercent", "attr.aria-valuemin": "0", "attr.aria-valuemax": "100", "attr.aria-valuetext": "series().valuePercent + \"%\"" } }, ngImport: i0, template: "<div class=\"pb-1 pt-1\" [style.width.px]=\"barWidth()\">\n <div class=\"text-secondary si-body\" aria-hidden=\"true\"> {{ series().valuePercent }}% </div>\n\n <div\n class=\"bar-background w-100\"\n [style.height.px]=\"barHeight()\"\n [style.border-radius.px]=\"barHeight() / 2\"\n >\n <div\n class=\"bar-foreground h-100\"\n [style.width.%]=\"series().valuePercent\"\n [style.backgroundColor]=\"'var(--' + series().colorToken + ')'\"\n [style.height.px]=\"barHeight()\"\n [style.border-radius.px]=\"barHeight() / 2\"\n ></div>\n </div>\n</div>\n", styles: [".bar-background{background-color:var(--element-ui-4)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-native-charts-ng-microchart-progress.mjs","sources":["../../../../projects/native-charts-ng/microchart-progress/si-microchart-progress.component.ts","../../../../projects/native-charts-ng/microchart-progress/si-microchart-progress.component.html","../../../../projects/native-charts-ng/microchart-progress/index.ts","../../../../projects/native-charts-ng/microchart-progress/siemens-native-charts-ng-microchart-progress.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport interface MicrochartProgressSeries {\n /** Value in percent */\n valuePercent: number;\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-progress',\n templateUrl: './si-microchart-progress.component.html',\n styleUrl: './si-microchart-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'progressbar',\n '[attr.aria-valuenow]': 'series().valuePercent',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuetext]': 'series().valuePercent + \"%\"'\n }\n})\nexport class SiMicrochartProgressComponent {\n /**\n * Microchart progress series.\n * Example series can be:\n * @example\n * ```ts\n * Series: MicrochartProgressSeries = { valuePercent: 80, colorToken: 'element-data-7' };\n * ```\n */\n readonly series = input.required<MicrochartProgressSeries>();\n
|
|
1
|
+
{"version":3,"file":"siemens-native-charts-ng-microchart-progress.mjs","sources":["../../../../projects/native-charts-ng/microchart-progress/si-microchart-progress.component.ts","../../../../projects/native-charts-ng/microchart-progress/si-microchart-progress.component.html","../../../../projects/native-charts-ng/microchart-progress/index.ts","../../../../projects/native-charts-ng/microchart-progress/siemens-native-charts-ng-microchart-progress.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport interface MicrochartProgressSeries {\n /** Value in percent */\n valuePercent: number;\n /**\n * Use a data-color. See: {@link https://element.siemens.io/fundamentals/colors/data-visualization-colors/#tokens}\n *\n * @example \"element-data-10\"\n */\n colorToken: string;\n}\n\n@Component({\n selector: 'si-microchart-progress',\n templateUrl: './si-microchart-progress.component.html',\n styleUrl: './si-microchart-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'progressbar',\n '[attr.aria-valuenow]': 'series().valuePercent',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuetext]': 'series().valuePercent + \"%\"'\n }\n})\nexport class SiMicrochartProgressComponent {\n /**\n * Microchart progress series.\n * Example series can be:\n * @example\n * ```ts\n * Series: MicrochartProgressSeries = { valuePercent: 80, colorToken: 'element-data-7' };\n * ```\n */\n readonly series = input.required<MicrochartProgressSeries>();\n /**\n * Progress bar width in pixels.\n *\n * @defaultValue 64\n */\n readonly barWidth = input<number>(64);\n /**\n * Progress bar height in pixels.\n *\n * @defaultValue 4\n */\n readonly barHeight = input<number>(4);\n}\n","<div class=\"pb-1 pt-1\" [style.width.px]=\"barWidth()\">\n <div class=\"text-secondary si-body\" aria-hidden=\"true\"> {{ series().valuePercent }}% </div>\n\n <div\n class=\"bar-background w-100\"\n [style.height.px]=\"barHeight()\"\n [style.border-radius.px]=\"barHeight() / 2\"\n >\n <div\n class=\"bar-foreground h-100\"\n [style.width.%]=\"series().valuePercent\"\n [style.backgroundColor]=\"'var(--' + series().colorToken + ')'\"\n [style.height.px]=\"barHeight()\"\n [style.border-radius.px]=\"barHeight() / 2\"\n ></div>\n </div>\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-microchart-progress.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;AAGG;MA2BU,6BAA6B,CAAA;AACxC;;;;;;;AAOG;AACM,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAA4B;AAC5D;;;;AAIG;AACM,IAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,oDAAC;AACrC;;;;AAIG;AACM,IAAA,SAAS,GAAG,KAAK,CAAS,CAAC,qDAAC;uGArB1B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA7B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,6rBC9B1C,ilBAiBA,EAAA,MAAA,EAAA,CAAA,yDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDaa,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAbzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EAAA,eAAA,EAGjB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,sBAAsB,EAAE,uBAAuB;AAC/C,wBAAA,sBAAsB,EAAE,GAAG;AAC3B,wBAAA,sBAAsB,EAAE,KAAK;AAC7B,wBAAA,uBAAuB,EAAE;AAC1B,qBAAA,EAAA,QAAA,EAAA,ilBAAA,EAAA,MAAA,EAAA,CAAA,yDAAA,CAAA,EAAA;;;AE5BH;;;AAGG;;ACHH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/native-charts-ng",
|
|
3
3
|
"description": "Element Native charts library.",
|
|
4
|
-
"version": "49.
|
|
4
|
+
"version": "49.15.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@angular/common": "21 - 22",
|
|
22
22
|
"@angular/core": "21 - 22",
|
|
23
|
-
"@siemens/element-theme": "49.
|
|
23
|
+
"@siemens/element-theme": "49.15.0"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
"./docs.json": {
|
|
@@ -19,9 +19,17 @@ interface SeriesInternal {
|
|
|
19
19
|
colorToken: string;
|
|
20
20
|
}
|
|
21
21
|
declare class SiMicrochartBarComponent {
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Chart width in pixels.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue 64
|
|
26
|
+
*/
|
|
23
27
|
readonly width: _angular_core.InputSignal<number>;
|
|
24
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Chart height in pixels.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue 24
|
|
32
|
+
*/
|
|
25
33
|
readonly height: _angular_core.InputSignal<number>;
|
|
26
34
|
/**
|
|
27
35
|
* Microchart bar series.
|
|
@@ -21,9 +21,17 @@ declare class SiMicrochartLineComponent {
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
readonly series: _angular_core.InputSignal<MicrochartLineSeries>;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Chart width in pixels.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue 64
|
|
28
|
+
*/
|
|
25
29
|
readonly width: _angular_core.InputSignal<number>;
|
|
26
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Chart height in pixels.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue 24
|
|
34
|
+
*/
|
|
27
35
|
readonly height: _angular_core.InputSignal<number>;
|
|
28
36
|
/**
|
|
29
37
|
* Display circular markers at each data point on the line.
|
|
@@ -20,9 +20,17 @@ declare class SiMicrochartProgressComponent {
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
readonly series: _angular_core.InputSignal<MicrochartProgressSeries>;
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Progress bar width in pixels.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue 64
|
|
27
|
+
*/
|
|
24
28
|
readonly barWidth: _angular_core.InputSignal<number>;
|
|
25
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Progress bar height in pixels.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue 4
|
|
33
|
+
*/
|
|
26
34
|
readonly barHeight: _angular_core.InputSignal<number>;
|
|
27
35
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiMicrochartProgressComponent, never>;
|
|
28
36
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiMicrochartProgressComponent, "si-microchart-progress", never, { "series": { "alias": "series"; "required": true; "isSignal": true; }; "barWidth": { "alias": "barWidth"; "required": false; "isSignal": true; }; "barHeight": { "alias": "barHeight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|