@skdx/angular-charts 0.35.0 → 0.37.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/skdx-angular-charts-bubble.mjs +21 -5
- package/fesm2022/skdx-angular-charts-bubble.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts-gauge.mjs +1 -1
- package/fesm2022/skdx-angular-charts-gauge.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts-heatmap.mjs +3 -3
- package/fesm2022/skdx-angular-charts-heatmap.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts-internal.mjs +34 -13
- package/fesm2022/skdx-angular-charts-internal.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts-map.mjs +3 -3
- package/fesm2022/skdx-angular-charts-map.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts-scatter.mjs +21 -9
- package/fesm2022/skdx-angular-charts-scatter.mjs.map +1 -1
- package/fesm2022/skdx-angular-charts.mjs.map +1 -1
- package/package.json +2 -2
- package/types/skdx-angular-charts-bubble.d.ts +14 -4
- package/types/skdx-angular-charts-gauge.d.ts +2 -2
- package/types/skdx-angular-charts-heatmap.d.ts +3 -3
- package/types/skdx-angular-charts-internal.d.ts +11 -1
- package/types/skdx-angular-charts-map.d.ts +3 -3
- package/types/skdx-angular-charts-scatter.d.ts +14 -6
- package/types/skdx-angular-charts.d.ts +1 -1
|
@@ -33,9 +33,21 @@ class SkdxBubbleChartComponent extends SkdxSizedBase {
|
|
|
33
33
|
/** Colors bubbles by their `value` (or `z`). */
|
|
34
34
|
this.colorScale = input(/* @ts-ignore */
|
|
35
35
|
...(ngDevMode ? [undefined, { debugName: "colorScale" }] : /* istanbul ignore next */ []));
|
|
36
|
-
/** Draw the color scale under the plot. */
|
|
37
|
-
this.colorLegend = input(
|
|
38
|
-
...(ngDevMode ? [{ debugName: "colorLegend" }] : /* istanbul ignore next */ []));
|
|
36
|
+
/** Draw the color scale under the plot; an object sets orientation and title. */
|
|
37
|
+
this.colorLegend = input(/* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [undefined, { debugName: "colorLegend" }] : /* istanbul ignore next */ []));
|
|
39
|
+
/** Extra invisible hover radius in pixels. */
|
|
40
|
+
this.hitRadius = input(/* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [undefined, { debugName: "hitRadius" }] : /* istanbul ignore next */ []));
|
|
42
|
+
/** Ring offset in pixels for overlapping points. */
|
|
43
|
+
this.jitter = input(/* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [undefined, { debugName: "jitter" }] : /* istanbul ignore next */ []));
|
|
45
|
+
/** Least-squares fit per series; true is linear. */
|
|
46
|
+
this.trendline = input(/* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [undefined, { debugName: "trendline" }] : /* istanbul ignore next */ []));
|
|
48
|
+
/** Systematic sampling above this many points. */
|
|
49
|
+
this.sampling = input(/* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [undefined, { debugName: "sampling" }] : /* istanbul ignore next */ []));
|
|
39
51
|
this.layout = computed(() => layoutBubbleChart({
|
|
40
52
|
...this.sized(),
|
|
41
53
|
series: this.series(),
|
|
@@ -48,11 +60,15 @@ class SkdxBubbleChartComponent extends SkdxSizedBase {
|
|
|
48
60
|
annotations: this.annotations(),
|
|
49
61
|
colorScale: this.colorScale(),
|
|
50
62
|
colorLegend: this.colorLegend(),
|
|
63
|
+
hitRadius: this.hitRadius(),
|
|
64
|
+
jitter: this.jitter(),
|
|
65
|
+
trendline: this.trendline(),
|
|
66
|
+
sampling: this.sampling(),
|
|
51
67
|
}), /* @ts-ignore */
|
|
52
68
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
53
69
|
}
|
|
54
70
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SkdxBubbleChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: SkdxBubbleChartComponent, isStandalone: true, selector: "skdx-bubble-chart", inputs: { series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, sizeRange: { classPropertyName: "sizeRange", publicName: "sizeRange", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, xAxis: { classPropertyName: "xAxis", publicName: "xAxis", isSignal: true, isRequired: false, transformFunction: null }, yAxis: { classPropertyName: "yAxis", publicName: "yAxis", isSignal: true, isRequired: false, transformFunction: null }, zAxis: { classPropertyName: "zAxis", publicName: "zAxis", isSignal: true, isRequired: false, transformFunction: null }, references: { classPropertyName: "references", publicName: "references", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", isSignal: true, isRequired: false, transformFunction: null }, colorScale: { classPropertyName: "colorScale", publicName: "colorScale", isSignal: true, isRequired: false, transformFunction: null }, colorLegend: { classPropertyName: "colorLegend", publicName: "colorLegend", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: SkdxBubbleChartComponent, isStandalone: true, selector: "skdx-bubble-chart", inputs: { series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, sizeRange: { classPropertyName: "sizeRange", publicName: "sizeRange", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, xAxis: { classPropertyName: "xAxis", publicName: "xAxis", isSignal: true, isRequired: false, transformFunction: null }, yAxis: { classPropertyName: "yAxis", publicName: "yAxis", isSignal: true, isRequired: false, transformFunction: null }, zAxis: { classPropertyName: "zAxis", publicName: "zAxis", isSignal: true, isRequired: false, transformFunction: null }, references: { classPropertyName: "references", publicName: "references", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", isSignal: true, isRequired: false, transformFunction: null }, colorScale: { classPropertyName: "colorScale", publicName: "colorScale", isSignal: true, isRequired: false, transformFunction: null }, colorLegend: { classPropertyName: "colorLegend", publicName: "colorLegend", isSignal: true, isRequired: false, transformFunction: null }, hitRadius: { classPropertyName: "hitRadius", publicName: "hitRadius", isSignal: true, isRequired: false, transformFunction: null }, jitter: { classPropertyName: "jitter", publicName: "jitter", isSignal: true, isRequired: false, transformFunction: null }, trendline: { classPropertyName: "trendline", publicName: "trendline", isSignal: true, isRequired: false, transformFunction: null }, sampling: { classPropertyName: "sampling", publicName: "sampling", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
56
72
|
<skdx-chart-root
|
|
57
73
|
[layout]="layout()"
|
|
58
74
|
[options]="options()"
|
|
@@ -109,7 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
109
125
|
></skdx-chart-root>
|
|
110
126
|
`,
|
|
111
127
|
}]
|
|
112
|
-
}], propDecorators: { series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], sizeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeRange", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], xAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxis", required: false }] }], yAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxis", required: false }] }], zAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAxis", required: false }] }], references: [{ type: i0.Input, args: [{ isSignal: true, alias: "references", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", required: false }] }], colorScale: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorScale", required: false }] }], colorLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorLegend", required: false }] }] } });
|
|
128
|
+
}], propDecorators: { series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], sizeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeRange", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], xAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "xAxis", required: false }] }], yAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "yAxis", required: false }] }], zAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAxis", required: false }] }], references: [{ type: i0.Input, args: [{ isSignal: true, alias: "references", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", required: false }] }], colorScale: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorScale", required: false }] }], colorLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorLegend", required: false }] }], hitRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "hitRadius", required: false }] }], jitter: [{ type: i0.Input, args: [{ isSignal: true, alias: "jitter", required: false }] }], trendline: [{ type: i0.Input, args: [{ isSignal: true, alias: "trendline", required: false }] }], sampling: [{ type: i0.Input, args: [{ isSignal: true, alias: "sampling", required: false }] }] } });
|
|
113
129
|
|
|
114
130
|
/**
|
|
115
131
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skdx-angular-charts-bubble.mjs","sources":["../../src/bubble/index.ts","../../src/bubble/skdx-angular-charts-bubble.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutBubbleChart,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type Annotation,\n type AxisOptions,\n type BubbleSeries,\n type ColorScale,\n type Reference,\n} from '@skdx/angular-charts/internal';\n\n/** Three quantities per mark: x, y and a magnitude the bubble's area follows. */\n@Component({\n selector: 'skdx-bubble-chart',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"bubble\"\n [label]=\"label() ?? 'Bubble chart'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxBubbleChartComponent extends SkdxSizedBase {\n readonly series = input.required<BubbleSeries[]>();\n /** Smallest and largest bubble radius in pixels. */\n readonly sizeRange = input<[number, number]>();\n /** Write each bubble's label on it. */\n readonly labels = input(false);\n readonly xAxis = input<AxisOptions>();\n readonly yAxis = input<AxisOptions>();\n /** How the magnitude is named and written. */\n readonly zAxis = input<Pick<AxisOptions, 'format' | 'label'>>();\n readonly references = input<Reference[]>();\n readonly annotations = input<Annotation[]>();\n /** Colors bubbles by their `value` (or `z`). */\n readonly colorScale = input<ColorScale>();\n /** Draw the color scale under the plot. */\n readonly colorLegend = input(
|
|
1
|
+
{"version":3,"file":"skdx-angular-charts-bubble.mjs","sources":["../../src/bubble/index.ts","../../src/bubble/skdx-angular-charts-bubble.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutBubbleChart,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type Annotation,\n type AxisOptions,\n type BubbleSeries,\n type ColorLegendOptions,\n type ColorScale,\n type Reference,\n} from '@skdx/angular-charts/internal';\n\n/** Three quantities per mark: x, y and a magnitude the bubble's area follows. */\n@Component({\n selector: 'skdx-bubble-chart',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"bubble\"\n [label]=\"label() ?? 'Bubble chart'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxBubbleChartComponent extends SkdxSizedBase {\n readonly series = input.required<BubbleSeries[]>();\n /** Smallest and largest bubble radius in pixels. */\n readonly sizeRange = input<[number, number]>();\n /** Write each bubble's label on it. */\n readonly labels = input(false);\n readonly xAxis = input<AxisOptions>();\n readonly yAxis = input<AxisOptions>();\n /** How the magnitude is named and written. */\n readonly zAxis = input<Pick<AxisOptions, 'format' | 'label'>>();\n readonly references = input<Reference[]>();\n readonly annotations = input<Annotation[]>();\n /** Colors bubbles by their `value` (or `z`). */\n readonly colorScale = input<ColorScale>();\n /** Draw the color scale under the plot; an object sets orientation and title. */\n readonly colorLegend = input<boolean | ColorLegendOptions>();\n /** Extra invisible hover radius in pixels. */\n readonly hitRadius = input<number>();\n /** Ring offset in pixels for overlapping points. */\n readonly jitter = input<number>();\n /** Least-squares fit per series; true is linear. */\n readonly trendline = input<\n boolean | 'linear' | 'exponential' | 'logarithmic' | 'power' | 'polynomial'\n >();\n /** Systematic sampling above this many points. */\n readonly sampling = input<'none' | 'auto' | { threshold: number }>();\n\n protected readonly layout = computed(() =>\n layoutBubbleChart({\n ...this.sized(),\n series: this.series(),\n sizeRange: this.sizeRange(),\n labels: this.labels(),\n xAxis: this.xAxis(),\n yAxis: this.yAxis(),\n zAxis: this.zAxis(),\n references: this.references(),\n annotations: this.annotations(),\n colorScale: this.colorScale(),\n colorLegend: this.colorLegend(),\n hitRadius: this.hitRadius(),\n jitter: this.jitter(),\n trendline: this.trendline(),\n sampling: this.sampling(),\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;AAIG;AAgBH;AA+BM,MAAO,wBAAyB,SAAQ,aAAa,CAAA;AA9B3D,IAAA,WAAA,GAAA;;QA+BW,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ;mFAAkB;;AAEzC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAoB;;QAErC,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK;mFAAC;AACrB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAe;AAC5B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAe;;AAE5B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAyC;AACtD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAe;AACjC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAgB;;AAEnC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAc;;AAEhC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAgC;;AAEnD,QAAA,IAAA,CAAA,SAAS,GAAG,KA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EAAA,UAAA,EAAA,QAAA,EAAA,WAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FA0BrB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA9BpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA;AACF,iBAAA;;;AClDD;;AAEG;;"}
|
|
@@ -36,7 +36,7 @@ class SkdxGaugeChartComponent extends SkdxSizedBase {
|
|
|
36
36
|
/** A marker at this value. */
|
|
37
37
|
this.target = input(/* @ts-ignore */
|
|
38
38
|
...(ngDevMode ? [undefined, { debugName: "target" }] : /* istanbul ignore next */ []));
|
|
39
|
-
/** Tick count including both ends; 0 for none. Defaults to 5. */
|
|
39
|
+
/** Tick count including both ends; false or 0 for none, true for 5. Defaults to 5. */
|
|
40
40
|
this.ticks = input(/* @ts-ignore */
|
|
41
41
|
...(ngDevMode ? [undefined, { debugName: "ticks" }] : /* istanbul ignore next */ []));
|
|
42
42
|
/** Write the tick values. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skdx-angular-charts-gauge.mjs","sources":["../../src/gauge/index.ts","../../src/gauge/skdx-angular-charts-gauge.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutGaugeChart,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type Band,\n} from '@skdx/angular-charts/internal';\n\n/** One reading on an arc scale: a needle over threshold bands (`radial`), or the arc filled up to the value (`solid`). */\n@Component({\n selector: 'skdx-gauge-chart',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"gauge\"\n [label]=\"label() ?? 'Gauge chart'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxGaugeChartComponent extends SkdxSizedBase {\n /** The reading; values outside min–max are clamped. */\n readonly value = input.required<number>();\n /** Scale start. Defaults to 0. */\n readonly min = input<number>();\n /** Scale end. Defaults to 100. */\n readonly max = input<number>();\n readonly variant = input<'radial' | 'solid'>();\n /** Degrees clockwise from 12 o'clock; -90/90 is a semi-circle. */\n readonly startAngle = input<number>();\n readonly endAngle = input<number>();\n /** Arc thickness as a fraction of the radius. */\n readonly thickness = input<number>();\n /** Threshold sectors in value units. */\n readonly bands = input<Band[]>();\n /** A marker at this value. */\n readonly target = input<number>();\n /** Tick count including both ends; 0 for none. Defaults to 5. */\n readonly ticks = input<number>();\n /** Write the tick values. */\n readonly tickLabels = input(true);\n /** Text in the middle; defaults to the formatted value. */\n readonly centerLabel = input<string>();\n /** Smaller text under the value, e.g. the metric name. */\n readonly caption = input<string>();\n\n protected readonly layout = computed(() =>\n layoutGaugeChart({\n ...this.sized(),\n value: this.value(),\n min: this.min(),\n max: this.max(),\n variant: this.variant(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n thickness: this.thickness(),\n bands: this.bands(),\n target: this.target(),\n ticks: this.ticks(),\n tickLabels: this.tickLabels(),\n centerLabel: this.centerLabel(),\n caption: this.caption(),\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;AAIG;AAWH;AA+BM,MAAO,uBAAwB,SAAQ,aAAa,CAAA;AA9B1D,IAAA,WAAA,GAAA;;;QAgCW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAAU;;AAEhC,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;;AAErB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;AACrB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAsB;;AAErC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAU;AAC5B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAU;;AAE1B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;AAE3B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAU;;AAExB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"skdx-angular-charts-gauge.mjs","sources":["../../src/gauge/index.ts","../../src/gauge/skdx-angular-charts-gauge.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutGaugeChart,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type Band,\n} from '@skdx/angular-charts/internal';\n\n/** One reading on an arc scale: a needle over threshold bands (`radial`), or the arc filled up to the value (`solid`). */\n@Component({\n selector: 'skdx-gauge-chart',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"gauge\"\n [label]=\"label() ?? 'Gauge chart'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxGaugeChartComponent extends SkdxSizedBase {\n /** The reading; values outside min–max are clamped. */\n readonly value = input.required<number>();\n /** Scale start. Defaults to 0. */\n readonly min = input<number>();\n /** Scale end. Defaults to 100. */\n readonly max = input<number>();\n readonly variant = input<'radial' | 'solid'>();\n /** Degrees clockwise from 12 o'clock; -90/90 is a semi-circle. */\n readonly startAngle = input<number>();\n readonly endAngle = input<number>();\n /** Arc thickness as a fraction of the radius. */\n readonly thickness = input<number>();\n /** Threshold sectors in value units. */\n readonly bands = input<Band[]>();\n /** A marker at this value. */\n readonly target = input<number>();\n /** Tick count including both ends; false or 0 for none, true for 5. Defaults to 5. */\n readonly ticks = input<number | boolean>();\n /** Write the tick values. */\n readonly tickLabels = input(true);\n /** Text in the middle; defaults to the formatted value. */\n readonly centerLabel = input<string>();\n /** Smaller text under the value, e.g. the metric name. */\n readonly caption = input<string>();\n\n protected readonly layout = computed(() =>\n layoutGaugeChart({\n ...this.sized(),\n value: this.value(),\n min: this.min(),\n max: this.max(),\n variant: this.variant(),\n startAngle: this.startAngle(),\n endAngle: this.endAngle(),\n thickness: this.thickness(),\n bands: this.bands(),\n target: this.target(),\n ticks: this.ticks(),\n tickLabels: this.tickLabels(),\n centerLabel: this.centerLabel(),\n caption: this.caption(),\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;AAIG;AAWH;AA+BM,MAAO,uBAAwB,SAAQ,aAAa,CAAA;AA9B1D,IAAA,WAAA,GAAA;;;QAgCW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAAU;;AAEhC,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;;AAErB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;AACrB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAsB;;AAErC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAU;AAC5B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAU;;AAE1B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;AAE3B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAU;;AAExB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAoB;;QAEjC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,IAAI;uFAAC;;AAExB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK;mGAAU;;AAE7B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAU;AAEf,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MACnC,gBA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IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA;AACF,iBAAA;;;AC7CD;;AAEG;;"}
|
|
@@ -43,9 +43,9 @@ class SkdxHeatmapComponent extends SkdxSizedBase {
|
|
|
43
43
|
/** A full color scale; wins over color/diverging/steps/domain. */
|
|
44
44
|
this.colorScale = input(/* @ts-ignore */
|
|
45
45
|
...(ngDevMode ? [undefined, { debugName: "colorScale" }] : /* istanbul ignore next */ []));
|
|
46
|
-
/** Draw the color scale under the grid. */
|
|
47
|
-
this.colorLegend = input(
|
|
48
|
-
...(ngDevMode ? [{ debugName: "colorLegend" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** Draw the color scale under the grid; an object sets orientation and title. */
|
|
47
|
+
this.colorLegend = input(/* @ts-ignore */
|
|
48
|
+
...(ngDevMode ? [undefined, { debugName: "colorLegend" }] : /* istanbul ignore next */ []));
|
|
49
49
|
/** Fill for null cells. */
|
|
50
50
|
this.missingColor = input(/* @ts-ignore */
|
|
51
51
|
...(ngDevMode ? [undefined, { debugName: "missingColor" }] : /* istanbul ignore next */ []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skdx-angular-charts-heatmap.mjs","sources":["../../src/heatmap/index.ts","../../src/heatmap/skdx-angular-charts-heatmap.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutHeatmap,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type CalendarCell,\n type ColorScale,\n type Value,\n} from '@skdx/angular-charts/internal';\n\n/** A grid of cells whose opacity follows the value; `calendar` lays days out as weekday rows and week columns. */\n@Component({\n selector: 'skdx-heatmap',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"heatmap\"\n [label]=\"label() ?? 'Heatmap'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxHeatmapComponent extends SkdxSizedBase {\n readonly rows = input<string[]>();\n readonly columns = input<string[]>();\n /** `data[row][column]`. */\n readonly data = input<Value[][]>();\n /** One value per day, instead of rows/columns/data. */\n readonly calendar = input<CalendarCell[]>();\n readonly color = input<string>();\n /** Split around zero: negatives use `negativeColor`. */\n readonly diverging = input(false);\n readonly negativeColor = input<string>();\n /** Write each value in its cell. */\n readonly labels = input(false);\n /** Value range the opacity ramp covers. */\n readonly domain = input<[number, number]>();\n /** Quantize the color ramp into this many steps. */\n readonly steps = input<number>();\n /** First day of the calendar week. */\n readonly weekStart = input<'monday' | 'sunday'>();\n /** A full color scale; wins over color/diverging/steps/domain. */\n readonly colorScale = input<ColorScale>();\n /** Draw the color scale under the grid. */\n readonly colorLegend = input(
|
|
1
|
+
{"version":3,"file":"skdx-angular-charts-heatmap.mjs","sources":["../../src/heatmap/index.ts","../../src/heatmap/skdx-angular-charts-heatmap.ts"],"sourcesContent":["/*\n * Copyright (c) 2026 SkandaDX\n * This file is part of the SkandaDX organization.\n * Licensed under the MIT License. See LICENSE in the repository root.\n */\n\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nimport {\n layoutHeatmap,\n SkdxChartRootComponent,\n SkdxSizedBase,\n type CalendarCell,\n type ColorLegendOptions,\n type ColorScale,\n type Value,\n} from '@skdx/angular-charts/internal';\n\n/** A grid of cells whose opacity follows the value; `calendar` lays days out as weekday rows and week columns. */\n@Component({\n selector: 'skdx-heatmap',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SkdxChartRootComponent],\n template: `\n <skdx-chart-root\n [layout]=\"layout()\"\n [options]=\"options()\"\n kind=\"heatmap\"\n [label]=\"label() ?? 'Heatmap'\"\n [zoomable]=\"zoomable()\"\n [selectionMode]=\"selectionMode()\"\n [editable]=\"editable()\"\n [syncId]=\"syncId()\"\n [crosshair]=\"syncedCrosshair()\"\n [responsive]=\"!!responsive()\"\n (itemClick)=\"itemClick.emit($event)\"\n (dataIssue)=\"dataIssue.emit($event)\"\n (taskChange)=\"taskChange.emit($event)\"\n (hiddenSeriesChange)=\"toggle($event)\"\n (zoomChange)=\"zoom.set($event)\"\n (viewChange)=\"view.set($event)\"\n (selectedChange)=\"selected.set($event)\"\n (highlightedChange)=\"highlighted.set($event)\"\n (syncChange)=\"sync($event)\"\n (measured)=\"measuredWidth.set($event)\"\n ></skdx-chart-root>\n `,\n})\nexport class SkdxHeatmapComponent extends SkdxSizedBase {\n readonly rows = input<string[]>();\n readonly columns = input<string[]>();\n /** `data[row][column]`. */\n readonly data = input<Value[][]>();\n /** One value per day, instead of rows/columns/data. */\n readonly calendar = input<CalendarCell[]>();\n readonly color = input<string>();\n /** Split around zero: negatives use `negativeColor`. */\n readonly diverging = input(false);\n readonly negativeColor = input<string>();\n /** Write each value in its cell. */\n readonly labels = input(false);\n /** Value range the opacity ramp covers. */\n readonly domain = input<[number, number]>();\n /** Quantize the color ramp into this many steps. */\n readonly steps = input<number>();\n /** First day of the calendar week. */\n readonly weekStart = input<'monday' | 'sunday'>();\n /** A full color scale; wins over color/diverging/steps/domain. */\n readonly colorScale = input<ColorScale>();\n /** Draw the color scale under the grid; an object sets orientation and title. */\n readonly colorLegend = input<boolean | ColorLegendOptions>();\n /** Fill for null cells. */\n readonly missingColor = input<string>();\n /** Gap between cells in pixels. */\n readonly cellGap = input<number>();\n /** Cell corner radius in pixels. */\n readonly cellRadius = input<number>();\n /** Order rows by their sum. */\n readonly rowOrder = input<'asc' | 'desc'>();\n /** Order columns by their sum. */\n readonly columnOrder = input<'asc' | 'desc'>();\n\n protected readonly layout = computed(() =>\n layoutHeatmap({\n ...this.sized(),\n rows: this.rows(),\n columns: this.columns(),\n data: this.data(),\n calendar: this.calendar(),\n color: this.color(),\n diverging: this.diverging(),\n negativeColor: this.negativeColor(),\n labels: this.labels(),\n domain: this.domain(),\n steps: this.steps(),\n weekStart: this.weekStart(),\n colorScale: this.colorScale(),\n colorLegend: this.colorLegend(),\n missingColor: this.missingColor(),\n cellGap: this.cellGap(),\n cellRadius: this.cellRadius(),\n rowOrder: this.rowOrder(),\n columnOrder: this.columnOrder(),\n }),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;;AAIG;AAcH;AA+BM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AA9BvD,IAAA,WAAA,GAAA;;AA+BW,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAY;AACxB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAY;;AAE3B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAa;;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK;gGAAkB;AAClC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;QAEvB,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK;sFAAC;AACxB,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK;qGAAU;;QAE/B,IAAA,CAAA,MAAM,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AA,WAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FA0BrB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBA9BhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA;AACF,iBAAA;;;AChDD;;AAEG;;"}
|
|
@@ -396,6 +396,15 @@ const CHART_COLORS = {
|
|
|
396
396
|
};
|
|
397
397
|
/** Semantic color of a reference line, band or threshold sector. */
|
|
398
398
|
const variantColor = (variant = 'neutral') => variant === 'neutral' ? CHART_COLORS.axis : `var(--skdx-color-${variant}-500)`;
|
|
399
|
+
/**
|
|
400
|
+
* Semantic color for text: the line and band colors are mid-scale fills that fall under 2:1 on
|
|
401
|
+
* text, so labels use the theme's readable text token for the same meaning.
|
|
402
|
+
*/
|
|
403
|
+
const variantTextColor = (variant = 'neutral') => variant === 'neutral'
|
|
404
|
+
? CHART_COLORS.label
|
|
405
|
+
: variant === 'primary'
|
|
406
|
+
? 'var(--skdx-color-text-accent)'
|
|
407
|
+
: `var(--skdx-color-text-${variant})`;
|
|
399
408
|
const seriesColor = (index, override) => override ?? SERIES_COLORS[index % SERIES_COLORS.length];
|
|
400
409
|
|
|
401
410
|
/*
|
|
@@ -1018,7 +1027,8 @@ function referenceShapes(refs, s) {
|
|
|
1018
1027
|
const clampY = (v) => Math.max(plot.y, Math.min(bottom, v));
|
|
1019
1028
|
for (const r of refs ?? []) {
|
|
1020
1029
|
const color = r.color ?? variantColor(r.variant);
|
|
1021
|
-
const
|
|
1030
|
+
const text = r.color ?? variantTextColor(r.variant);
|
|
1031
|
+
const meta = { part: 'reference-label', fill: text };
|
|
1022
1032
|
// Under horizontal orientation the value axis is x, so y references become vertical.
|
|
1023
1033
|
const yAsX = s.horizontal === true;
|
|
1024
1034
|
if ('y' in r) {
|
|
@@ -1045,9 +1055,9 @@ function referenceShapes(refs, s) {
|
|
|
1045
1055
|
const a = px(s.y(r.y1, r.axis ?? 'left'));
|
|
1046
1056
|
const b = px(s.y(r.y2, r.axis ?? 'left'));
|
|
1047
1057
|
if (yAsX)
|
|
1048
|
-
shapes.push(...vband(clampX(Math.min(a, b)), clampX(Math.max(a, b)), plot, color, r.label));
|
|
1058
|
+
shapes.push(...vband(clampX(Math.min(a, b)), clampX(Math.max(a, b)), plot, color, r.label, text));
|
|
1049
1059
|
else
|
|
1050
|
-
shapes.push(...hband(clampY(Math.min(a, b)), clampY(Math.max(a, b)), plot, color, r.label));
|
|
1060
|
+
shapes.push(...hband(clampY(Math.min(a, b)), clampY(Math.max(a, b)), plot, color, r.label, text));
|
|
1051
1061
|
}
|
|
1052
1062
|
else {
|
|
1053
1063
|
const a = s.x(r.x1);
|
|
@@ -1057,9 +1067,9 @@ function referenceShapes(refs, s) {
|
|
|
1057
1067
|
const lo = px(Math.min(a, b));
|
|
1058
1068
|
const hi = px(Math.max(a, b));
|
|
1059
1069
|
if (yAsX)
|
|
1060
|
-
shapes.push(...hband(clampY(lo), clampY(hi), plot, color, r.label));
|
|
1070
|
+
shapes.push(...hband(clampY(lo), clampY(hi), plot, color, r.label, text));
|
|
1061
1071
|
else
|
|
1062
|
-
shapes.push(...vband(clampX(lo), clampX(hi), plot, color, r.label));
|
|
1072
|
+
shapes.push(...vband(clampX(lo), clampX(hi), plot, color, r.label, text));
|
|
1063
1073
|
}
|
|
1064
1074
|
}
|
|
1065
1075
|
return shapes;
|
|
@@ -1094,7 +1104,7 @@ function vline(x, y1, y2, stroke, text, extra) {
|
|
|
1094
1104
|
};
|
|
1095
1105
|
return text ? [line, label(x + 4, y1 + 10, text, { ...extra, anchor: 'start' })] : [line];
|
|
1096
1106
|
}
|
|
1097
|
-
function hband(y1, y2, plot, fill, text) {
|
|
1107
|
+
function hband(y1, y2, plot, fill, text, textFill) {
|
|
1098
1108
|
const band = {
|
|
1099
1109
|
kind: 'rect',
|
|
1100
1110
|
part: 'reference-area',
|
|
@@ -1111,13 +1121,13 @@ function hband(y1, y2, plot, fill, text) {
|
|
|
1111
1121
|
band,
|
|
1112
1122
|
label(plot.x + plot.width - 4, y1 + 12, text, {
|
|
1113
1123
|
part: 'reference-label',
|
|
1114
|
-
fill,
|
|
1124
|
+
fill: textFill,
|
|
1115
1125
|
anchor: 'end',
|
|
1116
1126
|
}),
|
|
1117
1127
|
]
|
|
1118
1128
|
: [band];
|
|
1119
1129
|
}
|
|
1120
|
-
function vband(x1, x2, plot, fill, text) {
|
|
1130
|
+
function vband(x1, x2, plot, fill, text, textFill) {
|
|
1121
1131
|
const band = {
|
|
1122
1132
|
kind: 'rect',
|
|
1123
1133
|
part: 'reference-area',
|
|
@@ -1130,7 +1140,14 @@ function vband(x1, x2, plot, fill, text) {
|
|
|
1130
1140
|
title: text,
|
|
1131
1141
|
};
|
|
1132
1142
|
return text
|
|
1133
|
-
? [
|
|
1143
|
+
? [
|
|
1144
|
+
band,
|
|
1145
|
+
label(x1 + 4, plot.y + 12, text, {
|
|
1146
|
+
part: 'reference-label',
|
|
1147
|
+
fill: textFill,
|
|
1148
|
+
anchor: 'start',
|
|
1149
|
+
}),
|
|
1150
|
+
]
|
|
1134
1151
|
: [band];
|
|
1135
1152
|
}
|
|
1136
1153
|
/**
|
|
@@ -1145,6 +1162,7 @@ function annotationShapes(annotations, s) {
|
|
|
1145
1162
|
const bottom = plot.y + plot.height;
|
|
1146
1163
|
for (const a of annotations ?? []) {
|
|
1147
1164
|
const color = a.color ?? variantColor(a.variant);
|
|
1165
|
+
const textColor = a.color ?? variantTextColor(a.variant);
|
|
1148
1166
|
const at = (x, y, axis) => {
|
|
1149
1167
|
const cx = s.x(x);
|
|
1150
1168
|
if (cx === undefined)
|
|
@@ -1182,7 +1200,7 @@ function annotationShapes(annotations, s) {
|
|
|
1182
1200
|
item: title ? item(title) : undefined,
|
|
1183
1201
|
});
|
|
1184
1202
|
if (a.label)
|
|
1185
|
-
shapes.push(label(px(x + 4), px(y + 12), a.label, { part: 'annotation-label', fill:
|
|
1203
|
+
shapes.push(label(px(x + 4), px(y + 12), a.label, { part: 'annotation-label', fill: textColor }));
|
|
1186
1204
|
continue;
|
|
1187
1205
|
}
|
|
1188
1206
|
const p = at(a.x, a.y, a.axis);
|
|
@@ -1191,7 +1209,7 @@ function annotationShapes(annotations, s) {
|
|
|
1191
1209
|
if (a.type === 'text') {
|
|
1192
1210
|
shapes.push(label(p.x, p.y, a.text, {
|
|
1193
1211
|
part: 'annotation-text',
|
|
1194
|
-
fill:
|
|
1212
|
+
fill: textColor,
|
|
1195
1213
|
anchor: 'middle',
|
|
1196
1214
|
baseline: 'middle',
|
|
1197
1215
|
title: a.label,
|
|
@@ -1224,7 +1242,7 @@ function annotationShapes(annotations, s) {
|
|
|
1224
1242
|
stroke: color,
|
|
1225
1243
|
}, label(tx, ty, a.label, {
|
|
1226
1244
|
part: 'annotation-label',
|
|
1227
|
-
fill:
|
|
1245
|
+
fill: textColor,
|
|
1228
1246
|
anchor: dx >= 0 ? 'start' : 'end',
|
|
1229
1247
|
baseline: 'middle',
|
|
1230
1248
|
}));
|
|
@@ -9233,7 +9251,8 @@ function layoutBumpChart(input) {
|
|
|
9233
9251
|
texts.push(label(px(last.x + r + 4), last.y, s.name, {
|
|
9234
9252
|
part: 'series-label',
|
|
9235
9253
|
baseline: 'middle',
|
|
9236
|
-
|
|
9254
|
+
// Text-safe: a mid-scale series color lands under 2:1 on the page; the line ends here anyway.
|
|
9255
|
+
fill: CHART_COLORS.label,
|
|
9237
9256
|
}));
|
|
9238
9257
|
}
|
|
9239
9258
|
});
|
|
@@ -9677,6 +9696,7 @@ class SkdxChartShapesComponent {
|
|
|
9677
9696
|
[attr.dominant-baseline]="s.baseline"
|
|
9678
9697
|
[attr.fill]="s.fill"
|
|
9679
9698
|
[attr.font-weight]="s.weight"
|
|
9699
|
+
[attr.pointer-events]="s.item ? null : 'none'"
|
|
9680
9700
|
[attr.transform]="s.rotate ? 'rotate(' + s.rotate + ' ' + s.x + ' ' + s.y + ')' : null"
|
|
9681
9701
|
[textContent]="s.text"
|
|
9682
9702
|
></svg:text>
|
|
@@ -9775,6 +9795,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
9775
9795
|
[attr.dominant-baseline]="s.baseline"
|
|
9776
9796
|
[attr.fill]="s.fill"
|
|
9777
9797
|
[attr.font-weight]="s.weight"
|
|
9798
|
+
[attr.pointer-events]="s.item ? null : 'none'"
|
|
9778
9799
|
[attr.transform]="s.rotate ? 'rotate(' + s.rotate + ' ' + s.x + ' ' + s.y + ')' : null"
|
|
9779
9800
|
[textContent]="s.text"
|
|
9780
9801
|
></svg:text>
|