@tectra-ng/charts 0.4.1 → 0.4.3
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/bar-list/README.md +1 -1
- package/boxplot/README.md +1 -1
- package/bullet/README.md +1 -1
- package/candlestick/README.md +1 -1
- package/column/README.md +3 -3
- package/combo/README.md +1 -1
- package/core/README.md +8 -6
- package/fesm2022/tectra-ng-charts-candlestick.mjs +23 -7
- package/fesm2022/tectra-ng-charts-candlestick.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-column.mjs +1 -1
- package/fesm2022/tectra-ng-charts-column.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-core.mjs +81 -18
- package/fesm2022/tectra-ng-charts-core.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-funnel.mjs +29 -7
- package/fesm2022/tectra-ng-charts-funnel.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gantt.mjs +487 -27
- package/fesm2022/tectra-ng-charts-gantt.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-gauge.mjs +79 -34
- package/fesm2022/tectra-ng-charts-gauge.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-org-chart.mjs +36 -8
- package/fesm2022/tectra-ng-charts-org-chart.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-pie.mjs +27 -9
- package/fesm2022/tectra-ng-charts-pie.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-radial-bar.mjs +5 -4
- package/fesm2022/tectra-ng-charts-radial-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-range-area.mjs +113 -58
- package/fesm2022/tectra-ng-charts-range-area.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-rank-line.mjs +79 -31
- package/fesm2022/tectra-ng-charts-rank-line.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sankey.mjs +99 -18
- package/fesm2022/tectra-ng-charts-sankey.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs +53 -7
- package/fesm2022/tectra-ng-charts-segmented-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-sunburst.mjs +31 -3
- package/fesm2022/tectra-ng-charts-sunburst.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts-waterfall.mjs +57 -20
- package/fesm2022/tectra-ng-charts-waterfall.mjs.map +1 -1
- package/fesm2022/tectra-ng-charts.mjs +1 -1
- package/funnel/README.md +2 -2
- package/gantt/README.md +12 -8
- package/gauge/README.md +3 -3
- package/line/README.md +1 -1
- package/org-chart/README.md +1 -0
- package/package.json +5 -5
- package/pie/README.md +5 -4
- package/radar/README.md +1 -1
- package/radial-bar/README.md +2 -2
- package/range-area/README.md +2 -1
- package/rank-line/README.md +3 -2
- package/sankey/README.md +1 -1
- package/segmented-bar/README.md +2 -1
- package/treemap/README.md +1 -1
- package/types/tectra-ng-charts-bar-list.d.ts +1 -1
- package/types/tectra-ng-charts-boxplot.d.ts +1 -1
- package/types/tectra-ng-charts-bullet.d.ts +1 -1
- package/types/tectra-ng-charts-candlestick.d.ts +7 -3
- package/types/tectra-ng-charts-candlestick.d.ts.map +1 -1
- package/types/tectra-ng-charts-column.d.ts +3 -3
- package/types/tectra-ng-charts-combo.d.ts +1 -1
- package/types/tectra-ng-charts-core.d.ts +45 -10
- package/types/tectra-ng-charts-core.d.ts.map +1 -1
- package/types/tectra-ng-charts-funnel.d.ts +8 -2
- package/types/tectra-ng-charts-funnel.d.ts.map +1 -1
- package/types/tectra-ng-charts-gantt.d.ts +166 -10
- package/types/tectra-ng-charts-gantt.d.ts.map +1 -1
- package/types/tectra-ng-charts-gauge.d.ts +21 -6
- package/types/tectra-ng-charts-gauge.d.ts.map +1 -1
- package/types/tectra-ng-charts-line.d.ts +1 -1
- package/types/tectra-ng-charts-org-chart.d.ts +13 -2
- package/types/tectra-ng-charts-org-chart.d.ts.map +1 -1
- package/types/tectra-ng-charts-pie.d.ts +13 -4
- package/types/tectra-ng-charts-pie.d.ts.map +1 -1
- package/types/tectra-ng-charts-radar.d.ts +1 -1
- package/types/tectra-ng-charts-radial-bar.d.ts +3 -2
- package/types/tectra-ng-charts-radial-bar.d.ts.map +1 -1
- package/types/tectra-ng-charts-range-area.d.ts +12 -3
- package/types/tectra-ng-charts-range-area.d.ts.map +1 -1
- package/types/tectra-ng-charts-rank-line.d.ts +28 -10
- package/types/tectra-ng-charts-rank-line.d.ts.map +1 -1
- package/types/tectra-ng-charts-sankey.d.ts +36 -9
- package/types/tectra-ng-charts-sankey.d.ts.map +1 -1
- package/types/tectra-ng-charts-segmented-bar.d.ts +11 -2
- package/types/tectra-ng-charts-segmented-bar.d.ts.map +1 -1
- package/types/tectra-ng-charts-sunburst.d.ts +10 -0
- package/types/tectra-ng-charts-sunburst.d.ts.map +1 -1
- package/types/tectra-ng-charts-treemap.d.ts +1 -1
- package/types/tectra-ng-charts-waterfall.d.ts +25 -6
- package/types/tectra-ng-charts-waterfall.d.ts.map +1 -1
- package/types/tectra-ng-charts.d.ts +1 -1
- package/waterfall/README.md +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-waterfall.mjs","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall.icons.ts","../../../../packages/charts/waterfall/src/waterfall.theme.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.html"],"sourcesContent":["import { TxWaterfallItem, TxWaterfallStep } from './waterfall-chart.types';\n\n/**\n * Turns items into steps with a running total; a total item shows the sum so far and missing values count as zero.\n */\nexport function waterfallSteps(items: readonly TxWaterfallItem[]): TxWaterfallStep[] {\n let running = 0;\n return items.map((item, index) => {\n if (item.total) {\n return { index, label: item.label, kind: 'total', change: running, from: 0, to: running, color: item.color ?? null };\n }\n const change = item.value !== null && item.value !== undefined && Number.isFinite(item.value) ? item.value : 0;\n const from = running;\n running += change;\n return { index, label: item.label, kind: change < 0 ? 'down' : 'up', change, from, to: running, color: item.color ?? null };\n });\n}\n\n/** Smallest and largest running total, always including 0. */\nexport function waterfallExtent(steps: readonly TxWaterfallStep[]): [number, number] {\n let min = 0;\n let max = 0;\n for (const step of steps) {\n min = Math.min(min, step.from, step.to);\n max = Math.max(max, step.from, step.to);\n }\n return [min, max];\n}\n","import { TxIconSet, txIconChartBar } from '@tectra-ng/icons';\n\nexport const WATERFALL_ICON_DEFAULTS: TxIconSet = {\n 'chart-bar': txIconChartBar,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const WATERFALL_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxBandScale,\n TxChartAxes,\n TxChartFrame,\n TxChartHoverBand,\n TxChartGridMode,\n TxChartHeight,\n TxChartLabelMode,\n TxChartLegendAlign,\n TxChartLegendItem,\n TxChartLegendPosition,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n cartesianLayout,\n chartBandRect,\n chartNumberFormatter,\n chartSummary,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n stepIndex,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { waterfallExtent, waterfallSteps } from './waterfall-layout';\nimport { TxWaterfallBarEvent, TxWaterfallChartBar, TxWaterfallChartPart, TxWaterfallConnector, TxWaterfallItem, TxWaterfallKind } from './waterfall-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { WATERFALL_ICON_DEFAULTS } from './waterfall.icons';\nimport { WATERFALL_THEME } from './waterfall.theme';\n\nconst DEFAULT_WIDTH = 0.56;\nconst LABEL_GAP = 4;\n\n@Component({\n selector: 'tx-waterfall-chart',\n imports: [TxChartFrame, TxChartAxes, TxChartHoverBand],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-waterfall-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-waterfall-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-waterfall-chart--entering]': 'entrance.active()',\n '[class.tx-waterfall-chart--morph]': 'morph()',\n '[class.tx-waterfall-chart--active]': 'active() !== null',\n },\n viewProviders: [provideTxIconDefaults(WATERFALL_ICON_DEFAULTS)],\n})\nexport class TxWaterfallChart {\n private readonly waterfallTheme = injectTokens(WATERFALL_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxWaterfallItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly dataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly legendPosition = input<TxChartLegendPosition>('top');\n readonly legendAlign = input<TxChartLegendAlign>('start');\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly yMin = input<number | undefined>(undefined);\n readonly yMax = input<number | undefined>(undefined);\n readonly xAxisTitle = input('');\n readonly yAxisTitle = input('');\n readonly grid = input<TxChartGridMode>('value');\n readonly labelMode = input<TxChartLabelMode>('auto');\n readonly maxLabelWidth = input(220);\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxWaterfallChartPart, TxWaterfallChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly barClick = output<TxWaterfallBarEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('waterfallChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly morph = signal(false);\n readonly active = signal<number | null>(null);\n readonly barWidth = signal(DEFAULT_WIDTH);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly steps = computed(() => waterfallSteps(this.list()));\n readonly isEmpty = computed(() => !this.list().length);\n readonly kinds = computed(() => new Set(this.steps().map((step) => step.kind)));\n readonly legendShown = computed(() => this.showLegend() && this.kinds().size > 1);\n readonly size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly signed = computed(() => {\n const format = this.valueFormatter();\n return (value: number) => (value > 0 ? `+${format(value)}` : value < 0 ? `−${format(-value)}` : format(value));\n });\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const labels = this.steps().map((step) => step.label);\n return cartesianLayout({\n width,\n height,\n intl: this.intl(),\n category: {\n kind: 'band',\n labels,\n count: labels.length,\n labelMode: this.labelMode(),\n maxLabelWidth: this.maxLabelWidth(),\n title: this.xAxisTitle() || undefined,\n },\n value: {\n extent: waterfallExtent(this.steps()),\n format: this.valueFormat(),\n includeZero: true,\n min: this.yMin(),\n max: this.yMax(),\n title: this.yAxisTitle() || undefined,\n },\n grid: this.grid(),\n });\n });\n\n readonly bars = computed<TxWaterfallChartBar[]>(() => {\n const layout = this.layout();\n const band = layout.category as TxBandScale;\n const width = band.bandwidth * Math.min(1, Math.max(0.05, this.barWidth()));\n const scale = layout.value;\n return this.steps().map((step) => {\n const a = scale.map(step.from);\n const b = scale.map(step.to);\n const y = Math.min(a, b);\n const height = Math.max(1, Math.abs(b - a));\n const above = step.kind === 'total' ? step.to >= 0 : step.change >= 0;\n return {\n ...step,\n key: `${step.index}:${step.label}`,\n x: band.center(step.index) - width / 2,\n y,\n width,\n height,\n text: this.dataLabels() ? (step.kind === 'total' ? this.valueFormatter()(step.to) : this.signed()(step.change)) : null,\n textY: above ? y - LABEL_GAP : y + height + LABEL_GAP,\n above,\n };\n });\n });\n\n readonly hoverBand = computed(() => {\n const index = this.active();\n return index === null ? null : chartBandRect(this.layout().category as TxBandScale, index, this.layout().plot);\n });\n\n readonly connectorLines = computed<TxWaterfallConnector[]>(() => {\n if (!this.connectors()) return [];\n const bars = this.bars();\n const scale = this.layout().value;\n return bars.slice(0, -1).map((bar, index) => {\n const next = bars[index + 1];\n return { key: `${bar.key}>${next.key}`, x1: bar.x + bar.width, x2: next.x, y: scale.map(bar.to) };\n });\n });\n\n readonly legendItems = computed<TxChartLegendItem[]>(() => {\n const t = this.translations();\n const names: Record<TxWaterfallKind, string> = { up: t.chartIncrease, down: t.chartDecrease, total: t.chartTotal };\n return (['up', 'down', 'total'] as const)\n .filter((kind) => this.kinds().has(kind))\n .map((kind) => ({ key: kind, label: names[kind], color: `var(--tx-chart-waterfall-${kind}-color)` }));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const bar = this.bars()[index];\n if (!bar) return null;\n const t = this.translations();\n const color = bar.color ?? `var(--tx-chart-waterfall-${bar.kind}-color)`;\n const rows =\n bar.kind === 'total'\n ? [{ label: t.chartTotal, value: this.valueFormatter()(bar.to), color, raw: bar.to, seriesIndex: 0, active: true }]\n : [\n { label: t.chartChange, value: this.signed()(bar.change), color, raw: bar.change, seriesIndex: 0, active: true },\n { label: t.chartTotal, value: this.valueFormatter()(bar.to), color: 'transparent', raw: bar.to, seriesIndex: 1 },\n ];\n return { title: bar.label, rows, index, x: bar.x + bar.width / 2, y: bar.above ? bar.y : bar.y + bar.height, placement: bar.above ? 'top' : 'bottom' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const steps = this.steps();\n const last = steps[steps.length - 1];\n const text = chartSummary(t, this.intl(), t.chartWaterfall, 1, steps.length, null);\n const withTotal = last ? `${text}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(last.to)}` : text;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${withTotal}` : withTotal;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'change', label: t.chartChange },\n { key: 'total', label: t.chartTotal },\n ],\n rows: this.steps().map((step) => ({\n label: step.label,\n cells: [step.kind === 'total' ? '—' : this.signed()(step.change), this.valueFormatter()(step.to)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n const next = readTokenNumber(this.host.nativeElement, '--tx-chart-bar-width', DEFAULT_WIDTH);\n if (next !== this.barWidth()) this.barWidth.set(next);\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const plot = this.layout().plot;\n const band = this.layout().category as TxBandScale;\n const inside = event.x >= plot.left && event.x <= plot.left + plot.width && event.y >= plot.top - 8 && event.y <= plot.top + plot.height + 8;\n const index = inside ? band.indexAt(event.x) : -1;\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const step = this.steps()[index];\n this.barClick.emit({ index, label: step.label, change: step.change, total: step.to, kind: step.kind });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const index = stepIndex(event.key, this.active() ?? -1, this.steps().length);\n if (index < 0) return;\n this.active.set(index);\n const step = this.steps()[index];\n const t = this.translations();\n this.frame()?.announce(\n step.kind === 'total'\n ? `${step.label}: ${t.chartTotal} ${this.valueFormatter()(step.to)}`\n : `${step.label}: ${this.signed()(step.change)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(step.to)}`,\n );\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n </svg:g>\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAKA,SAAgB,eAAe,OAAiC;CAC9D,IAAI,UAAU;CACd,OAAO,MAAM,KAAK,MAAM,UAAS;EAC/B,IAAI,KAAK,OACP,OAAO;GAAE;GAAO,OAAO,KAAK;GAAO,MAAM;GAAS,QAAQ;GAAS,MAAM;GAAG,IAAI;GAAS,OAAO,KAAK,SAAS;EAAI;EAEpH,MAAM,SAAS,KAAK,UAAU,QAAQ,KAAK,UAAU,UAAa,OAAO,SAAS,KAAK,KAAK,IAAI,KAAK,QAAQ;EAC7G,MAAM,OAAO;EACb,WAAW;EACX,OAAO;GAAE;GAAO,OAAO,KAAK;GAA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,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-charts-waterfall.mjs","names":[],"sources":["../../../../packages/charts/waterfall/src/waterfall-layout.ts","../../../../packages/charts/waterfall/src/waterfall.icons.ts","../../../../packages/charts/waterfall/src/waterfall.theme.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.ts","../../../../packages/charts/waterfall/src/waterfall-chart.component.html"],"sourcesContent":["import { TxWaterfallItem, TxWaterfallStep } from './waterfall-chart.types';\n\nfunction finite(value: number | null | undefined): value is number {\n return value !== null && value !== undefined && Number.isFinite(value);\n}\n\n/**\n * Turns items into steps with a running total; a total item shows the sum so far, or its own value\n * (an opening balance, a measured subtotal) that the next steps start from. Missing values count as zero.\n */\nexport function waterfallSteps(items: readonly TxWaterfallItem[]): TxWaterfallStep[] {\n let running = 0;\n return items.map((item, index) => {\n if (item.total) {\n running = finite(item.value) ? item.value : running;\n return { index, label: item.label, kind: 'total', change: running, from: 0, to: running, color: item.color ?? null };\n }\n const change = finite(item.value) ? item.value : 0;\n const from = running;\n running += change;\n return { index, label: item.label, kind: change < 0 ? 'down' : 'up', change, from, to: running, color: item.color ?? null };\n });\n}\n\n/** Smallest and largest running total, always including 0. */\nexport function waterfallExtent(steps: readonly TxWaterfallStep[]): [number, number] {\n let min = 0;\n let max = 0;\n for (const step of steps) {\n min = Math.min(min, step.from, step.to);\n max = Math.max(max, step.from, step.to);\n }\n return [min, max];\n}\n\n/** Box of a data label: horizontal centre, width, top and bottom in px. */\nexport interface TxWaterfallLabelBox {\n /** Horizontal centre, in px. */\n x: number;\n /** Width, in px. */\n width: number;\n /** Top edge, in px. */\n top: number;\n /** Bottom edge, in px. */\n bottom: number;\n /** Totals are placed first, so they win a collision. */\n total: boolean;\n}\n\n/** Which data labels to draw: totals first, then left to right, leaving out any label that overlaps a kept one. */\nexport function visibleLabels(boxes: readonly TxWaterfallLabelBox[], gap = 4): boolean[] {\n const order = boxes.map((_, index) => index).sort((a, b) => Number(boxes[b].total) - Number(boxes[a].total) || a - b);\n const kept: TxWaterfallLabelBox[] = [];\n const visible = boxes.map(() => false);\n for (const index of order) {\n const box = boxes[index];\n const hits = kept.some(\n (other) => Math.abs(other.x - box.x) < (other.width + box.width) / 2 + gap && box.top < other.bottom && other.top < box.bottom,\n );\n if (!hits) {\n kept.push(box);\n visible[index] = true;\n }\n }\n return visible;\n}\n","import { TxIconSet, txIconChartBar } from '@tectra-ng/icons';\n\nexport const WATERFALL_ICON_DEFAULTS: TxIconSet = {\n 'chart-bar': txIconChartBar,\n};\n","import { chartTokens } from '@tectra-ng/themes';\n\nexport const WATERFALL_THEME = {\n chart: chartTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n TxBandScale,\n TxChartAxes,\n TxChartFrame,\n TxChartHoverBand,\n TxChartGridMode,\n TxChartHeight,\n TxChartLabelMode,\n TxChartLegendAlign,\n TxChartLegendItem,\n TxChartLegendPosition,\n TxChartPointerEvent,\n TxChartTooltipData,\n TxChartTooltipTemplate,\n TxChartValueFormat,\n cartesianLayout,\n chartBandRect,\n chartNumberFormatter,\n chartSummary,\n compactValueFormatter,\n initialChartSize,\n injectChartEntrance,\n readTokenNumber,\n stepIndex,\n textWidth,\n} from '@tectra-ng/charts/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraChartTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { visibleLabels, waterfallExtent, waterfallSteps } from './waterfall-layout';\nimport { TxWaterfallBarEvent, TxWaterfallChartBar, TxWaterfallChartPart, TxWaterfallConnector, TxWaterfallItem, TxWaterfallKind } from './waterfall-chart.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { WATERFALL_ICON_DEFAULTS } from './waterfall.icons';\nimport { WATERFALL_THEME } from './waterfall.theme';\n\nconst DEFAULT_WIDTH = 0.56;\nconst LABEL_GAP = 4;\nconst LABEL_FONT_SIZE = 11;\n\nfunction signedFormat(format: (value: number) => string): (value: number) => string {\n return (value) => (value > 0 ? `+${format(value)}` : value < 0 ? `−${format(-value)}` : format(value));\n}\n\n@Component({\n selector: 'tx-waterfall-chart',\n imports: [TxChartFrame, TxChartAxes, TxChartHoverBand],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-waterfall-chart',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-waterfall-chart--fill]': 'typeof height() === \"string\"',\n '[class.tx-waterfall-chart--entering]': 'entrance.active()',\n '[class.tx-waterfall-chart--morph]': 'morph()',\n '[class.tx-waterfall-chart--active]': 'active() !== null',\n },\n viewProviders: [provideTxIconDefaults(WATERFALL_ICON_DEFAULTS)],\n})\nexport class TxWaterfallChart {\n private readonly waterfallTheme = injectTokens(WATERFALL_THEME);\n\n private locale = inject(TxLocaleService);\n private host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly translations = injectTranslations();\n\n readonly items = input<readonly TxWaterfallItem[] | null | undefined>([]);\n readonly height = input<TxChartHeight>(350);\n readonly dataLabels = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly connectors = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly showLegend = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly legendPosition = input<TxChartLegendPosition>('top');\n readonly legendAlign = input<TxChartLegendAlign>('start');\n readonly showTooltip = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly valueFormat = input<TxChartValueFormat>('number');\n readonly yMin = input<number | undefined>(undefined);\n readonly yMax = input<number | undefined>(undefined);\n readonly xAxisTitle = input('');\n readonly yAxisTitle = input('');\n readonly grid = input<TxChartGridMode>('value');\n readonly labelMode = input<TxChartLabelMode>('auto');\n readonly maxLabelWidth = input(220);\n readonly toolbar = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input('');\n readonly dt = input<TectraDeepPartial<TectraChartTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxWaterfallChartPart, TxWaterfallChart> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly barClick = output<TxWaterfallBarEvent>();\n\n readonly tooltipTemplate = contentChild(TxChartTooltipTemplate);\n private readonly frame = viewChild(TxChartFrame);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('waterfallChart', this, this.pt, this.ptOptions);\n readonly tokenStyle = computed(() => toStyleObject(this.dt(), '--tx-chart'));\n readonly hostStyle = computed(() => ({ ...this.tokenStyle(), ...this.passThrough().root?.style }));\n readonly entrance = injectChartEntrance();\n readonly morph = signal(false);\n readonly active = signal<number | null>(null);\n readonly barWidth = signal(DEFAULT_WIDTH);\n\n private readonly intl = computed(() => this.locale.locale().intl);\n readonly list = computed(() => this.items() ?? []);\n readonly steps = computed(() => waterfallSteps(this.list()));\n readonly isEmpty = computed(() => !this.list().length);\n readonly kinds = computed(() => new Set(this.steps().map((step) => step.kind)));\n readonly legendShown = computed(() => this.showLegend() && this.kinds().size > 1);\n readonly size = linkedSignal(() => initialChartSize(this.height(), this.legendShown() ? this.legendPosition() : null, undefined, this.toolbar()));\n\n readonly valueFormatter = computed(() => chartNumberFormatter(this.intl(), this.valueFormat()));\n readonly signed = computed(() => signedFormat(this.valueFormatter()));\n private readonly shortFormatter = computed(() => compactValueFormatter(this.intl(), this.valueFormat()));\n private readonly shortSigned = computed(() => signedFormat(this.shortFormatter()));\n\n readonly layout = computed(() => {\n const { width, height } = this.size();\n const labels = this.steps().map((step) => step.label);\n return cartesianLayout({\n width,\n height,\n intl: this.intl(),\n category: {\n kind: 'band',\n labels,\n count: labels.length,\n labelMode: this.labelMode(),\n maxLabelWidth: this.maxLabelWidth(),\n title: this.xAxisTitle() || undefined,\n },\n value: {\n extent: waterfallExtent(this.steps()),\n format: this.valueFormat(),\n includeZero: true,\n min: this.yMin(),\n max: this.yMax(),\n title: this.yAxisTitle() || undefined,\n },\n grid: this.grid(),\n });\n });\n\n readonly bars = computed<TxWaterfallChartBar[]>(() => {\n const layout = this.layout();\n const band = layout.category as TxBandScale;\n const width = band.bandwidth * Math.min(1, Math.max(0.05, this.barWidth()));\n const scale = layout.value;\n const bars = this.steps().map((step) => {\n const a = scale.map(step.from);\n const b = scale.map(step.to);\n const y = Math.min(a, b);\n const height = Math.max(1, Math.abs(b - a));\n const above = step.kind === 'total' ? step.to >= 0 : step.change >= 0;\n return {\n ...step,\n key: `${step.index}:${step.label}`,\n x: band.center(step.index) - width / 2,\n y,\n width,\n height,\n text: this.dataLabels() ? this.labelText(step.kind === 'total', step.kind === 'total' ? step.to : step.change, band.step) : null,\n textY: above ? y - LABEL_GAP : y + height + LABEL_GAP,\n above,\n };\n });\n const visible = visibleLabels(\n bars.map((bar) => ({\n x: bar.x + bar.width / 2,\n width: textWidth(bar.text ?? '', LABEL_FONT_SIZE),\n top: bar.above ? bar.textY - LABEL_FONT_SIZE : bar.textY,\n bottom: bar.above ? bar.textY : bar.textY + LABEL_FONT_SIZE,\n total: bar.kind === 'total',\n })),\n );\n return bars.map((bar, index) => (visible[index] ? bar : { ...bar, text: null }));\n });\n\n readonly hoverBand = computed(() => {\n const index = this.active();\n return index === null ? null : chartBandRect(this.layout().category as TxBandScale, index, this.layout().plot);\n });\n\n readonly connectorLines = computed<TxWaterfallConnector[]>(() => {\n if (!this.connectors()) return [];\n const bars = this.bars();\n const scale = this.layout().value;\n return bars.slice(0, -1).map((bar, index) => {\n const next = bars[index + 1];\n return { key: `${bar.key}>${next.key}`, x1: bar.x + bar.width, x2: next.x, y: scale.map(bar.to) };\n });\n });\n\n readonly legendItems = computed<TxChartLegendItem[]>(() => {\n const t = this.translations();\n const names: Record<TxWaterfallKind, string> = { up: t.chartIncrease, down: t.chartDecrease, total: t.chartTotal };\n return (['up', 'down', 'total'] as const)\n .filter((kind) => this.kinds().has(kind))\n .map((kind) => ({ key: kind, label: names[kind], color: `var(--tx-chart-waterfall-${kind}-color)` }));\n });\n\n readonly tooltip = computed<TxChartTooltipData | null>(() => {\n const index = this.active();\n if (index === null || !this.showTooltip()) return null;\n const bar = this.bars()[index];\n if (!bar) return null;\n const t = this.translations();\n const color = bar.color ?? `var(--tx-chart-waterfall-${bar.kind}-color)`;\n const rows =\n bar.kind === 'total'\n ? [{ label: t.chartTotal, value: this.valueFormatter()(bar.to), color, raw: bar.to, seriesIndex: 0, active: true }]\n : [\n { label: t.chartChange, value: this.signed()(bar.change), color, raw: bar.change, seriesIndex: 0, active: true },\n { label: t.chartTotal, value: this.valueFormatter()(bar.to), color: 'transparent', raw: bar.to, seriesIndex: 1 },\n ];\n return { title: bar.label, rows, index, x: bar.x + bar.width / 2, y: bar.above ? bar.y : bar.y + bar.height, placement: bar.above ? 'top' : 'bottom' };\n });\n\n readonly summary = computed(() => {\n const t = this.translations();\n const steps = this.steps();\n const last = steps[steps.length - 1];\n const text = chartSummary(t, this.intl(), t.chartWaterfall, 1, steps.length, null);\n const withTotal = last ? `${text}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(last.to)}` : text;\n return this.ariaLabel() ? `${this.ariaLabel()}. ${withTotal}` : withTotal;\n });\n\n readonly dataTable = computed(() => {\n const t = this.translations();\n return {\n columns: [\n { key: 'change', label: t.chartChange },\n { key: 'total', label: t.chartTotal },\n ],\n rows: this.steps().map((step) => ({\n label: step.label,\n cells: [step.kind === 'total' ? '—' : this.signed()(step.change), this.valueFormatter()(step.to)],\n })),\n };\n });\n\n constructor() {\n afterNextRender(() => setTimeout(() => this.morph.set(true), 120));\n afterRenderEffect(() => {\n this.dt();\n const next = readTokenNumber(this.host.nativeElement, '--tx-chart-bar-width', DEFAULT_WIDTH);\n if (next !== this.barWidth()) this.barWidth.set(next);\n });\n }\n\n onPointer(event: TxChartPointerEvent): void {\n if (event.type === 'leave') {\n this.active.set(null);\n return;\n }\n const plot = this.layout().plot;\n const band = this.layout().category as TxBandScale;\n const inside = event.x >= plot.left && event.x <= plot.left + plot.width && event.y >= plot.top - 8 && event.y <= plot.top + plot.height + 8;\n const index = inside ? band.indexAt(event.x) : -1;\n this.active.set(index >= 0 ? index : null);\n if (event.type === 'click' && index >= 0) {\n const step = this.steps()[index];\n this.barClick.emit({ index, label: step.label, change: step.change, total: step.to, kind: step.kind });\n }\n }\n\n onNavigate(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.active.set(null);\n return;\n }\n const index = stepIndex(event.key, this.active() ?? -1, this.steps().length);\n if (index < 0) return;\n this.active.set(index);\n const step = this.steps()[index];\n const t = this.translations();\n this.frame()?.announce(\n step.kind === 'total'\n ? `${step.label}: ${t.chartTotal} ${this.valueFormatter()(step.to)}`\n : `${step.label}: ${this.signed()(step.change)}, ${t.chartTotal.toLocaleLowerCase(this.intl())} ${this.valueFormatter()(step.to)}`,\n );\n }\n\n private labelText(total: boolean, value: number, room: number): string {\n const full = total ? this.valueFormatter()(value) : this.signed()(value);\n return textWidth(full, LABEL_FONT_SIZE) <= room - LABEL_GAP ? full : total ? this.shortFormatter()(value) : this.shortSigned()(value);\n }\n}\n","<tx-chart-frame\n [height]=\"height()\"\n [(size)]=\"size\"\n [legendItems]=\"legendItems()\"\n [showLegend]=\"legendShown()\"\n [legendPosition]=\"legendPosition()\"\n [legendAlign]=\"legendAlign()\"\n [legendToggle]=\"false\"\n [empty]=\"isEmpty()\"\n [loading]=\"loading()\"\n [toolbar]=\"toolbar()\"\n [exportName]=\"ariaLabel()\"\n emptyIcon=\"chart-bar\"\n [summary]=\"summary()\"\n [table]=\"dataTable()\"\n [tooltip]=\"tooltip()\"\n [tooltipTemplate]=\"tooltipTemplate()?.template\"\n [panelStyle]=\"tokenStyle()\"\n [parts]=\"passThrough()\"\n [styled]=\"!isUnstyled()\"\n (pointer)=\"onPointer($event)\"\n (navigate)=\"onNavigate($event)\"\n (tooltipClosed)=\"active.set(null)\"\n>\n <svg:g [tx-chart-hover-band]=\"hoverBand()\" [part]=\"passThrough().hoverBand\" />\n <svg:g [tx-chart-axes]=\"layout().axes\" [gridPart]=\"passThrough().grid\" [axisPart]=\"passThrough().axis\" />\n @if (connectors()) {\n <svg:g class=\"tx-waterfall-chart__connectors\">\n @for (line of connectorLines(); track line.key) {\n <svg:line\n class=\"tx-waterfall-chart__connector\"\n [class]=\"passThrough().connector?.class\"\n [style]=\"passThrough().connector?.style\"\n [attr.x1]=\"line.x1\"\n [attr.x2]=\"line.x2\"\n [attr.y1]=\"line.y\"\n [attr.y2]=\"line.y\"\n />\n }\n </svg:g>\n }\n <svg:g class=\"tx-waterfall-chart__bars\">\n @for (bar of bars(); track bar.key) {\n <svg:rect\n class=\"tx-waterfall-chart__bar\"\n [class.tx-waterfall-chart__bar--active]=\"active() === bar.index\"\n [class]=\"passThrough().bar?.class\"\n [style]=\"passThrough().bar?.style\"\n [attr.data-kind]=\"bar.kind\"\n [attr.data-index]=\"bar.index\"\n [attr.data-dir]=\"bar.above ? 'up' : 'down'\"\n [attr.x]=\"bar.x\"\n [attr.y]=\"bar.y\"\n [attr.width]=\"bar.width\"\n [attr.height]=\"bar.height\"\n [style.--tx-waterfall-chart-own]=\"bar.color\"\n [style.--tx-waterfall-chart-order]=\"bar.index\"\n />\n }\n </svg:g>\n @if (dataLabels()) {\n <svg:g class=\"tx-waterfall-chart__labels\">\n @for (bar of bars(); track bar.key) {\n @if (bar.text) {\n <svg:text\n class=\"tx-waterfall-chart__label\"\n [class]=\"passThrough().dataLabel?.class\"\n [style]=\"passThrough().dataLabel?.style\"\n [attr.data-kind]=\"bar.kind\"\n text-anchor=\"middle\"\n [attr.dominant-baseline]=\"bar.above ? 'auto' : 'hanging'\"\n [attr.x]=\"bar.x + bar.width / 2\"\n [attr.y]=\"bar.textY\"\n >\n {{ bar.text }}\n </svg:text>\n }\n }\n </svg:g>\n }\n</tx-chart-frame>\n"],"mappings":";;;;;;;;AAEA,SAAS,OAAO,OAAgC;CAC9C,OAAO,UAAU,QAAQ,UAAU,UAAa,OAAO,SAAS,KAAK;AACvE;AAMA,SAAgB,eAAe,OAAiC;CAC9D,IAAI,UAAU;CACd,OAAO,MAAM,KAAK,MAAM,UAAS;EAC/B,IAAI,KAAK,OAAO;GACd,UAAU,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ;GAC5C,OAAO;IAAE;IAAO,OAAO,KAAK;IAAO,MAAM;IAAS,QAAQ;IAAS,MAAM;IAAG,IAAI;IAAS,OAAO,KAAK,SAAS;GAAI;EACpH;EACA,MAAM,SAAS,OAAO,KAAK,KAAK,IAAI,KAAK,QAAQ;EACjD,MAAM,OAAO;EACb,WAAW;EACX,OAAO;GAAE;GAAO,OAAO,KAAK;GAAO,MAAM,SAAS,IAAI,SAAS;GAAM;GAAQ;GAAM,IAAI;GAAS,OAAO,KAAK,SAAS;EAAI;CAC3H,CAAC;AACH;AAGA,SAAgB,gBAAgB,OAAiC;CAC/D,IAAI,MAAM;CACV,IAAI,MAAM;CACV,KAAK,MAAM,QAAQ,OAAO;EACxB,MAAM,KAAK,IAAI,KAAK,KAAK,MAAM,KAAK,EAAE;EACtC,MAAM,KAAK,IAAI,KAAK,KAAK,MAAM,KAAK,EAAE;CACxC;CACA,OAAO,CAAC,KAAK,GAAG;AAClB;AAiBA,SAAgB,cAAc,OAAuC,MAAM,GAAC;CAC1E,MAAM,QAAQ,MAAM,KAAK,GAAG,UAAU,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,OAAO,MAAM,EAAE,CAAC,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AAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,sBAAsB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC3B,YAAY,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
package/funnel/README.md
CHANGED
|
@@ -16,12 +16,12 @@ import { TxFunnelChart } from '@tectra-ng/charts/funnel';
|
|
|
16
16
|
| items | `{ label, value, color? }[]` — the steps from the top. An empty list shows "No data" |
|
|
17
17
|
| height | Height in px (320), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
18
18
|
| colorful | Gives every step its own palette colour; by default the funnel is one colour |
|
|
19
|
-
| showLabels | Writes the step names in a column on the left (on by default) |
|
|
19
|
+
| showLabels | Writes the step names in a column on the left (on by default), as wide as the longest name up to 40% of the chart (`chart.funnel.labelWidth`); a longer name wraps onto two lines between words, then is cut with the full name in a hint |
|
|
20
20
|
| showValues | Writes the values on the bars, or beside a bar that is too narrow (on by default) |
|
|
21
21
|
| showConversion | Writes the conversion from the step before between the bars (on by default) |
|
|
22
22
|
| connectors | Draws the soft shapes that join the bars (on by default) |
|
|
23
23
|
| showTooltip | Shows the value, the share of the first step and the conversion on hover and keyboard focus |
|
|
24
|
-
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent` or a function |
|
|
24
|
+
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
25
25
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
26
26
|
| loading | Shows a skeleton of the same size |
|
|
27
27
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/gantt/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Gantt Chart
|
|
2
2
|
|
|
3
|
-
`<tx-gantt-chart>` — tasks as bars on a calendar: groups that fold, progress, milestones, a line for today, a scale from days to quarters with horizontal scrolling and zoom. The `timeline` layout puts all tasks of a group on one lane — bookings, shifts, releases. Built in HTML on the design tokens, rendered on the server.
|
|
3
|
+
`<tx-gantt-chart>` — tasks as bars on a calendar: groups that fold, progress, milestones, dependency arrows, a line for today, a scale from days to quarters with horizontal scrolling and zoom. The `timeline` layout puts all tasks of a group on one lane — bookings, shifts, releases. Built in HTML on the design tokens, rendered on the server.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
@@ -13,21 +13,23 @@ import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
|
13
13
|
## Inputs
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
|
-
| tasks | `{ id, label, start, end?, group?, progress?, milestone?, color? }[]`; dates are `Date`, timestamps or ISO strings. A date-only `end` (`'2026-03-06'`) includes that day; without `end` a task lasts one day. `milestone: true` draws a diamond at `start`. An empty list shows "No data" |
|
|
17
|
-
| layout | `tasks` (default) — a row per task under its group, groups fold; `timeline` — a lane per group with all its tasks |
|
|
16
|
+
| tasks | `{ id, label, start, end?, group?, progress?, milestone?, color?, dependsOn? }[]`; dates are `Date`, timestamps or ISO strings. A date-only `end` (`'2026-03-06'`) includes that day; without `end` a task lasts one day. `milestone: true` draws a diamond at `start`. `dependsOn` lists the tasks it waits for: ids (finish-to-start) or `{ id, type }` with `finish-to-start`, `start-to-start`, `finish-to-finish` or `start-to-finish`; unknown ids, self links and links that close a cycle are left out. An empty list shows "No data" |
|
|
17
|
+
| layout | `tasks` (default) — a row per task under its group, groups fold; `timeline` — a lane per group with all its tasks; overlapping tasks of a lane get their own sub-rows |
|
|
18
18
|
| zoom | Two-way: `day`, `week` (default), `month` or `quarter` |
|
|
19
19
|
| start | First date of the scale; the earliest task minus `padding` by default |
|
|
20
|
-
| end | Last date of the scale; the latest task plus `padding` by default |
|
|
20
|
+
| end | Last date of the scale; the latest task plus `padding` by default. The scale always runs to the end of a whole header cell and, when the range is short, on to the edge of the chart |
|
|
21
21
|
| padding | Days of air before the first and after the last task (3) |
|
|
22
22
|
| today | Date of the today line; the current moment by default, `null` hides it. On first render the chart scrolls so that today is in view |
|
|
23
|
-
| barLabels | Task names: `auto` (beside the bar for `tasks`, inside for `timeline`), `outside`, `inside` or `none
|
|
23
|
+
| barLabels | Task names: `auto` (beside the bar for `tasks`, inside for `timeline`), `outside`, `inside` or `none`; a name whose bar starts left of the view sticks to its left edge |
|
|
24
|
+
| showDependencies | Draws the `dependsOn` arrows between the bars (on by default) |
|
|
25
|
+
| dependencyHighlight | Hovering or focusing a task lights up its dependency chain — everything it waits for and everything that waits for it — and dims the rest (on by default) |
|
|
24
26
|
| toolbar | Shows the zoom buttons and the "Today" button (on by default) |
|
|
25
27
|
| maxHeight | Height after which the rows scroll under the sticky header (the `chart.gantt.maxHeight` token by default) |
|
|
26
28
|
| labelHeader | Text of the corner over the names; "Task" or "Timeline" by default |
|
|
27
29
|
| loading | Shows skeleton rows |
|
|
28
30
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
|
29
|
-
| dt | Design tokens of this chart (`chart`) — row and header height, label column, bars, progress, milestones, weekends, today line, folding |
|
|
30
|
-
| pt | Classes and styles of the parts: `root`, `toolbar`, `scroll`, `head`, `corner`, `scale`, `row`, `group`, `label`, `lane`, `bar`, `milestone`, `today`, `empty` |
|
|
31
|
+
| dt | Design tokens of this chart (`chart`) — row and header height, label column, bars, progress, milestones, dependency arrows, dimming, weekends, today line, folding |
|
|
32
|
+
| pt | Classes and styles of the parts: `root`, `toolbar`, `scroll`, `head`, `corner`, `scale`, `row`, `group`, `label`, `lane`, `bar`, `milestone`, `dependency`, `today`, `empty` |
|
|
31
33
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
32
34
|
| unstyled | Removes the tectra styles and keeps the layout and the behaviour |
|
|
33
35
|
|
|
@@ -50,4 +52,6 @@ import { TxGanttChart } from '@tectra-ng/charts/gantt';
|
|
|
50
52
|
|
|
51
53
|
## Notes
|
|
52
54
|
|
|
53
|
-
The names stay in a sticky column and the scale in a sticky header while you scroll both ways. Ctrl (⌘ on a Mac) and the wheel zoom at the pointer, keeping the date under it in place; the zoom buttons keep the centre. A group folds and unfolds with a height animation (none under reduced motion); the tasks of a folded group leave the tab order and the arrow keys skip them. A focused bar scrolls into view. Weekends are shaded on the day scale. Each bar has a tooltip and an accessible name with its dates, length and
|
|
55
|
+
The names stay in a sticky column and the scale in a sticky header while you scroll both ways. Ctrl (⌘ on a Mac) and the wheel zoom at the pointer, keeping the date under it in place; the zoom buttons keep the centre. A group folds and unfolds with a height animation (none under reduced motion); the tasks of a folded group leave the tab order and the arrow keys skip them. A focused bar scrolls into view. Weekends are shaded on the day scale. Each bar has a tooltip and an accessible name with its dates, length, progress and dependencies ("Depends on: …", "Required by: …").
|
|
56
|
+
|
|
57
|
+
Dependency arrows are orthogonal: a short stub out of the predecessor's edge (its end for `finish-…`, its start for `start-…`), a vertical run and a stub with an arrowhead into the successor's start or end; a milestone links from the tips of its diamond. A name beside a bar moves aside for an arrow on that edge. Among the possible routes the chart takes the one that crosses the fewest other bars and names, and when the successor starts before the stub of the predecessor ends the arrow goes around through the gap between the rows. Arrows sit over the grid and under the bars and names. In a folded group the arrows of its tasks move to the summary bar, arrows between two tasks of the same folded group are hidden, and arrows that meet on the same ends are drawn once. The tokens `gantt.dependencyColor`, `dependencyWidth`, `dependencyActiveColor`, `dependencyActiveWidth` and `dimmedOpacity` style them; the highlight fades with the hover duration and without motion under reduced motion.
|
package/gauge/README.md
CHANGED
|
@@ -23,10 +23,10 @@ import { TxGauge } from '@tectra-ng/charts/gauge';
|
|
|
23
23
|
| startAngle | Start of the scale in degrees clockwise from the top (-120) |
|
|
24
24
|
| endAngle | End of the scale (120); `-90` / `90` draws a half circle |
|
|
25
25
|
| label | Caption under the value |
|
|
26
|
-
| valueFormat | Format of the value and the ticks: `number`, `integer`, `compact`, `percent` or a function |
|
|
26
|
+
| valueFormat | Format of the value and the ticks: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
27
27
|
| ticks | Number of ticks to aim for (5) |
|
|
28
|
-
| showTicks | Draws the ticks with their values around the arc |
|
|
29
|
-
| showValue | Writes the value and the caption in the middle |
|
|
28
|
+
| showTicks | Draws the ticks with their values around the arc; labels that would shrink the arc too much turn compact (`2M`), and when even those do not fit only the tick lines stay |
|
|
29
|
+
| showValue | Writes the value and the caption in the middle; a long value gets a smaller font so it stays inside the arc |
|
|
30
30
|
| height | Height in px (220), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
31
31
|
| toolbar | Shows the chart menu: download SVG or PNG (the file is named after `ariaLabel` or `label`) |
|
|
32
32
|
| loading | Shows a skeleton of the same size |
|
package/line/README.md
CHANGED
|
@@ -35,7 +35,7 @@ import { TxLineChart } from '@tectra-ng/charts/line';
|
|
|
35
35
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
36
36
|
| tooltipMode | `shared` (every series at the point) or `single` (the nearest series) |
|
|
37
37
|
| tooltipFormatter | `(value, { seriesIndex, dataPointIndex }) => string` for tooltip values; default — whole numbers in the locale |
|
|
38
|
-
| valueFormat | Value axis format: `number`, `integer`, `compact`, `percent` or a function |
|
|
38
|
+
| valueFormat | Value axis format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
39
39
|
| yScale | `linear` or `log` |
|
|
40
40
|
| yMin | Fixed bottom of the value axis |
|
|
41
41
|
| yMax | Fixed top of the value axis |
|
package/org-chart/README.md
CHANGED
|
@@ -24,6 +24,7 @@ The chart does not change `nodes` itself: handle `nodeToggle`, `expandAll`, `col
|
|
|
24
24
|
| height | Height of the canvas (`calc(100vh - 15rem)`) |
|
|
25
25
|
| busy | Dims the canvas and blocks it while data loads |
|
|
26
26
|
| pathKinds | Node `kind`s that draw the path to the root on hover; `null` — every node |
|
|
27
|
+
| minFitZoom | Smallest zoom of "fit to screen" (0.6), so cards stay readable on a phone; a tree still too wide is centred on its root, one too tall starts at the top |
|
|
27
28
|
| dt | Design tokens of this chart (`chart`, group `orgChart`) |
|
|
28
29
|
| pt | Classes and styles of the parts: `root`, `bar`, `toolbar`, `canvas`, `stage`, `minimap`, `hint` |
|
|
29
30
|
| ptOptions | How `pt` merges with the global pass-through |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/charts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Angular charts drawn as SVG with no chart library: line and area, column and bar, combo with two value axes, scatter and bubble, pie and donut, radar, radial bar, gauge, funnel, waterfall, bullet, candlestick, box plot, range area, gantt, sankey, sunburst, bar list, segmented bar, heatmap, treemap, rank chart, org chart on one core of scales, axes, legend, tooltip and accessibility. Server rendered, themed by design tokens, dark mode ready.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com/components/line-chart",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"@angular/common": "^22.2.0",
|
|
57
57
|
"@angular/core": "^22.2.0",
|
|
58
58
|
"@angular/router": "^22.2.0",
|
|
59
|
-
"@tectra-ng/core": "^0.4.
|
|
60
|
-
"@tectra-ng/icons": "^0.4.
|
|
61
|
-
"@tectra-ng/themes": "^0.4.
|
|
62
|
-
"@tectra-ng/ui": "^0.4.
|
|
59
|
+
"@tectra-ng/core": "^0.4.3",
|
|
60
|
+
"@tectra-ng/icons": "^0.4.3",
|
|
61
|
+
"@tectra-ng/themes": "^0.4.3",
|
|
62
|
+
"@tectra-ng/ui": "^0.4.3"
|
|
63
63
|
},
|
|
64
64
|
"peerDependenciesMeta": {
|
|
65
65
|
"@angular/router": {
|
package/pie/README.md
CHANGED
|
@@ -14,10 +14,11 @@ import { TxPieChart, TxPieLegendPipe } from '@tectra-ng/charts/pie';
|
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
16
|
| pieData | Required. `{ series, labels, colors?, title? }` — values, one label per value, optional own colours and a name shown on top of the tooltip. No values or only zeros show "No data" |
|
|
17
|
-
| chartWidth | Width: px
|
|
18
|
-
|
|
|
17
|
+
| chartWidth | Width: px or a CSS size (`'100%'` — the width of the parent; the chart measures itself) |
|
|
18
|
+
| height | Height in px (400), or a CSS size; the donut fits the width and the height left under the legend |
|
|
19
|
+
| chartHeight | Older name of `height`, used when `height` is not set |
|
|
19
20
|
| showLegend | Shows the legend |
|
|
20
|
-
| legendPosition | `bottom` (default), `top`, `left` or `right
|
|
21
|
+
| legendPosition | `bottom` (default), `top`, `left` or `right`; a side legend moves under the donut when the chart is narrower than 420px |
|
|
21
22
|
| legendAlign | `center` (default), `start` or `end` for a top or bottom legend |
|
|
22
23
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (each value in large type with its share; it replaces the tooltip) |
|
|
23
24
|
| legendValues | Lists the value and the share of each segment in the legend |
|
|
@@ -26,7 +27,7 @@ import { TxPieChart, TxPieLegendPipe } from '@tectra-ng/charts/pie';
|
|
|
26
27
|
| totalFormatter | `(value) => string` for the centre total and the hovered value |
|
|
27
28
|
| tooltipFormatter | `(value, { seriesIndex }) => string` for the tooltip value |
|
|
28
29
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
29
|
-
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent` or a function |
|
|
30
|
+
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
30
31
|
| donutSize | Size of the hole as a share of the radius (`'65%'`); `'0%'` draws a pie |
|
|
31
32
|
| segmentGap | Width in px of the card-coloured gap between segments (2) |
|
|
32
33
|
| segmentRadius | Rounding of the segment corners in px; default — the `chart.pie.segmentRadius` token (4px). It shrinks on narrow segments and thin rings so the shape never breaks; `0` keeps sharp corners |
|
package/radar/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import { TxRadarChart } from '@tectra-ng/charts/radar';
|
|
|
29
29
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (the average of each series, or the value on the focused axis, in large type; it replaces the tooltip) |
|
|
30
30
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
31
31
|
| tooltipFormatter | `(value, { seriesIndex, dataPointIndex }) => string` for tooltip values |
|
|
32
|
-
| valueFormat | Format of the ring values and the tooltip: `number`, `integer`, `compact`, `percent` or a function |
|
|
32
|
+
| valueFormat | Format of the ring values and the tooltip: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
33
33
|
| toolbar | Shows the chart menu in the top right corner: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
34
34
|
| loading | Shows a skeleton of the same size |
|
|
35
35
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/radial-bar/README.md
CHANGED
|
@@ -23,12 +23,12 @@ import { TxRadialBar } from '@tectra-ng/charts/radial-bar';
|
|
|
23
23
|
| centerValue | What the centre shows for an item: `percent` of its max (default) or the `value` |
|
|
24
24
|
| totalLabel | With several items, shows this caption and the average share in the centre until one is hovered |
|
|
25
25
|
| showLegend | Shows the legend; a single item never has one |
|
|
26
|
-
| legendPosition | `top`, `bottom` (default), `left` or `right
|
|
26
|
+
| legendPosition | `top`, `bottom` (default), `left` or `right`; a side legend moves under the chart when it is narrower than 420px |
|
|
27
27
|
| legendAlign | `start`, `center` (default) or `end` for a top or bottom legend |
|
|
28
28
|
| legendVariant | Look of the legend: `dot` (default), `line`, `pill` or `stat` (values in large type with the share; it replaces the tooltip) |
|
|
29
29
|
| legendValues | Adds the value and the share to each legend item |
|
|
30
30
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
31
|
-
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent` or a function |
|
|
31
|
+
| valueFormat | Format of the values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
32
32
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
33
33
|
| loading | Shows a skeleton of the same size |
|
|
34
34
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
package/range-area/README.md
CHANGED
|
@@ -30,13 +30,14 @@ import { TxRangeAreaChart } from '@tectra-ng/charts/range-area';
|
|
|
30
30
|
| xAxisTitle | Title of the x axis |
|
|
31
31
|
| yAxisTitle | Title of the value axis |
|
|
32
32
|
| grid | Grid lines: `value`, `category`, `both` or `none` |
|
|
33
|
+
| annotations | Marks on the plot: `{ type: 'x-line', x }`, `{ type: 'y-line', y }`, `{ type: 'x-band', from, to }`, `{ type: 'y-band', from, to }`, `{ type: 'point', x, y }`, each with an optional `label`, `tone` (`neutral`, `primary`, `success`, `info`, `warn`, `danger`) or `color`; `x` is a category label (or index) or a date with `xType="time"`; bands and lines sit behind the series, points and labels on top |
|
|
33
34
|
| labelMode | Labels that do not fit: `auto`, `rotate` or `skip` |
|
|
34
35
|
| maxLabels | Most x labels to show (10) |
|
|
35
36
|
| toolbar | Shows the chart menu: download SVG, PNG or CSV (the file is named after `ariaLabel`) |
|
|
36
37
|
| loading | Shows a skeleton of the same size |
|
|
37
38
|
| ariaLabel | What the chart shows; starts the summary read by screen readers |
|
|
38
39
|
| dt | Design tokens of this chart (`chart`) — band opacity, edge and line widths, palette |
|
|
39
|
-
| pt | Classes and styles of the parts: `root`, `legend`, `legendItem`, `plot`, `svg`, `grid`, `axis`, `series`, `band`, `edge`, `line`, `marker`, `crosshair`, `tooltip`, `empty`, `skeleton` |
|
|
40
|
+
| pt | Classes and styles of the parts: `root`, `legend`, `legendItem`, `plot`, `svg`, `grid`, `axis`, `series`, `band`, `edge`, `line`, `marker`, `crosshair`, `annotation`, `tooltip`, `empty`, `skeleton` |
|
|
40
41
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
41
42
|
| unstyled | Removes the tectra styles and keeps the behaviour |
|
|
42
43
|
|
package/rank-line/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Rank Chart
|
|
2
2
|
|
|
3
|
-
`<tx-rank-chart>` — positions over time (search ranks, leaderboards): rank 1 on top, one straight line per series in its own colour, a gap where a check has no rank, a tooltip with the date
|
|
3
|
+
`<tx-rank-chart>` — positions over time (search ranks, leaderboards): rank 1 on top, one straight line per series in its own colour, a gap where a check has no rank, a tooltip with the date, the series, the rank and an optional note. Points sit at their real times on a time axis.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
import { TxRankChart } from '@tectra-ng/charts/rank-line';
|
|
@@ -14,7 +14,8 @@ import { TxRankChart } from '@tectra-ng/charts/rank-line';
|
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
16
|
| series | `{ name, color?, points: { time, rank \| null, note? }[] }[]` — a `null` rank leaves a gap; without `color` the series takes one of 12 line colours by its index (`rankLineColor(index)`) |
|
|
17
|
-
| maxRank | The deepest rank on the axis (20); ticks by 5 up to 20
|
|
17
|
+
| maxRank | The deepest rank on the axis (20); rank 1 sits on the top line and `maxRank` on the bottom line; every rank gets a tick up to 10 ranks, then ticks go by 5 up to 20 and by 10 deeper; deeper ranks sit on the bottom line |
|
|
18
|
+
| dateFormat | How the tooltip, the summary and the data table write a date: `Intl.DateTimeFormat` options or `(time) => string`; by default a date, with the time of day only when checks are less than a day apart |
|
|
18
19
|
| rankLabel | Caption of the rank in the tooltip and the data table (`Position: 3`) |
|
|
19
20
|
| height | Height: px (360) or `'100%'` of a parent with a definite height |
|
|
20
21
|
| showLegend | Shows a legend that hides and shows series |
|
package/sankey/README.md
CHANGED
|
@@ -14,7 +14,7 @@ import { TxSankeyChart } from '@tectra-ng/charts/sankey';
|
|
|
14
14
|
| Name | Description |
|
|
15
15
|
|---|---|
|
|
16
16
|
| links | `{ source, target, value, color? }[]` — flows between node ids; self links, zero values and links that close a cycle are left out. An empty list shows "No data" |
|
|
17
|
-
| nodes | `{ id, label?, color? }[]` — optional names and colours; nodes found only in `links` use their id as the name |
|
|
17
|
+
| nodes | `{ id, label?, color? }[]` — optional names and colours; nodes found only in `links` use their id as the name. Names sit right of their nodes (left in the last column); a name that would run into a node or another name moves to the other side, drops its value, is shortened or is hidden (the tooltip still names the node) |
|
|
18
18
|
| height | Height in px (360), or a CSS size such as `'100%'` of a parent with a definite height |
|
|
19
19
|
| align | `justify` (default) — nodes without outgoing flows stand in the last column; `left` — every node stands right after its sources |
|
|
20
20
|
| showValues | Writes the value after each node name when it fits (on by default) |
|
package/segmented-bar/README.md
CHANGED
|
@@ -21,9 +21,10 @@ import { TxSegmentedBar } from '@tectra-ng/charts/segmented-bar';
|
|
|
21
21
|
| hideEmptyInLegend | Leaves parts with no value out of the legend |
|
|
22
22
|
| monoLabels | Writes the legend labels in the monospace font (codes, ids) |
|
|
23
23
|
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent` or a function |
|
|
24
|
+
| loading | Shows a skeleton bar and legend of the same size |
|
|
24
25
|
| ariaLabel | What the bar shows; names the legend list, or starts the summary read on the bar when the legend is hidden |
|
|
25
26
|
| dt | Design tokens of this bar (`chart`, group `segmentedBar`) |
|
|
26
|
-
| pt | Classes and styles of the parts: `root`, `track`, `segment`, `legend`, `legendItem`, `dot`, `label`, `value`, `percent`, `aside` |
|
|
27
|
+
| pt | Classes and styles of the parts: `root`, `track`, `segment`, `legend`, `legendItem`, `dot`, `label`, `value`, `percent`, `aside`, `skeleton` |
|
|
27
28
|
| ptOptions | How `pt` merges with the global pass-through |
|
|
28
29
|
| unstyled | Removes the tectra styles and keeps the behaviour |
|
|
29
30
|
|
package/treemap/README.md
CHANGED
|
@@ -19,7 +19,7 @@ import { TxTreemap } from '@tectra-ng/charts/treemap';
|
|
|
19
19
|
| showValues | Writes the formatted value under the name when it fits |
|
|
20
20
|
| showTooltip | Shows the tooltip on hover and keyboard focus |
|
|
21
21
|
| tooltipFormatter | `(value, { seriesIndex, dataPointIndex }) => string` for the tooltip value |
|
|
22
|
-
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent` or a function |
|
|
22
|
+
| valueFormat | Format of values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function |
|
|
23
23
|
| loading | Shows a skeleton of the same size |
|
|
24
24
|
| ariaLabel | What the treemap shows; starts the summary read by screen readers |
|
|
25
25
|
| dt | Design tokens of this treemap (`chart`, group `treemap`) |
|
|
@@ -49,7 +49,7 @@ export declare class TxBarList {
|
|
|
49
49
|
readonly items: import("@angular/core").InputSignal<readonly TxBarListItem[] | null | undefined>;
|
|
50
50
|
/** How many rows to show (10); the percent stays the share of the whole total */
|
|
51
51
|
readonly limit: import("@angular/core").InputSignal<number>;
|
|
52
|
-
/** Format of values: `number`, `integer`, `compact`, `percent` or a function */
|
|
52
|
+
/** Format of values: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
53
53
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
54
54
|
/** Shows skeleton rows */
|
|
55
55
|
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
@@ -122,7 +122,7 @@ export declare class TxBoxplotChart {
|
|
|
122
122
|
readonly legendAlign: import("@angular/core").InputSignal<TxChartLegendAlign>;
|
|
123
123
|
/** Shows the five numbers and the count of outliers on hover and keyboard focus */
|
|
124
124
|
readonly showTooltip: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
125
|
-
/** Value axis and tooltip format: `number`, `integer`, `compact`, `percent` or a function */
|
|
125
|
+
/** Value axis and tooltip format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
126
126
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
127
127
|
/** Fixed start of the value axis */
|
|
128
128
|
readonly yMin: import("@angular/core").InputSignal<number | undefined>;
|
|
@@ -112,7 +112,7 @@ export declare class TxBulletChart {
|
|
|
112
112
|
readonly height: import("@angular/core").InputSignal<TxChartHeight | undefined>;
|
|
113
113
|
/** Shows the value and the target on hover and keyboard focus */
|
|
114
114
|
readonly showTooltip: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
115
|
-
/** Format of the axis and the tooltip: `number`, `integer`, `compact`, `percent` or a function */
|
|
115
|
+
/** Format of the axis and the tooltip: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
116
116
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
117
117
|
/** Grid lines: `value` (default), `category`, `both` or `none` */
|
|
118
118
|
readonly grid: import("@angular/core").InputSignal<TxChartGridMode>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TxChartGridMode, TxChartHeight, TxChartLabelMode, TxChartPart, TxChartPointerEvent, TxChartTooltipData, TxChartTooltipTemplate, TxChartValueFormat, TxRange } from "@tectra-ng/charts/core";
|
|
1
|
+
import { TxChartGridMode, TxChartHeight, TxChartLabelMode, TxChartPart, TxChartPointerEvent, TxChartTooltipData, TxChartTooltipTemplate, TxChartValueFormat, TxRange, TxTimeInterval } from "@tectra-ng/charts/core";
|
|
2
2
|
import { TxPassThroughOptions } from "@tectra-ng/core/config";
|
|
3
3
|
import { TectraChartTokens, TectraDeepPartial } from "@tectra-ng/themes";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -61,8 +61,12 @@ export interface TxCandleEvent {
|
|
|
61
61
|
}
|
|
62
62
|
/** Timestamps of the candles when every `x` is a `Date` or an ISO date string; `null` otherwise. */
|
|
63
63
|
export declare function candleTimes(candles: readonly TxCandle[]): number[] | null;
|
|
64
|
+
/** Calendar step of the candles: the step that covers the smallest gap between two of them, a day for a single candle. */
|
|
65
|
+
export declare function candleStep(times: readonly number[]): TxTimeInterval;
|
|
64
66
|
/**
|
|
65
|
-
* Axis and tooltip labels of the candles: formatted
|
|
67
|
+
* Axis and tooltip labels of the candles: dates formatted by the step of the data for time data, the `x` values as text
|
|
68
|
+
* otherwise. Axis labels are unique: when the step format repeats a label the full date is used, and a label equal to the
|
|
69
|
+
* one before it is left blank.
|
|
66
70
|
*/
|
|
67
71
|
export declare function candleLabels(candles: readonly TxCandle[], intl: string): {
|
|
68
72
|
axis: string[];
|
|
@@ -105,7 +109,7 @@ export declare class TxCandlestickChart {
|
|
|
105
109
|
readonly yAxisTitle: import("@angular/core").InputSignal<string>;
|
|
106
110
|
/** Grid lines: `value` (default), `category`, `both` or `none` */
|
|
107
111
|
readonly grid: import("@angular/core").InputSignal<TxChartGridMode>;
|
|
108
|
-
/** Date labels that do not fit: `skip` (default), `auto` or `rotate
|
|
112
|
+
/** Date labels that do not fit: `skip` (default), `auto` or `rotate`. Dates are written by the step of the data (days for daily and weekly candles, months for monthly ones), so no two labels repeat */
|
|
109
113
|
readonly labelMode: import("@angular/core").InputSignal<TxChartLabelMode>;
|
|
110
114
|
/** Side of the price axis: `right` (default) or `left` */
|
|
111
115
|
readonly yAxisPosition: import("@angular/core").InputSignal<"left" | "right">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-charts-candlestick.d.ts","names":[],"sources":["../../../../packages/charts/candlestick/src/candlestick-chart.types.ts","../../../../packages/charts/candlestick/src/candlestick-layout.ts","../../../../packages/charts/candlestick/src/candlestick-chart.component.ts"],"mappings":";;;;;iBAGiB;;EAEf,qBAAqB;;EAErB;;EAEA;;EAEA;;EAEA;;EAEA;;;YAIU;;YAGA,yBAAyB;;iBAGpB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA,QAAQ;;;wBCvDM,YAAY,kBAAkB
|
|
1
|
+
{"version":3,"file":"tectra-ng-charts-candlestick.d.ts","names":[],"sources":["../../../../packages/charts/candlestick/src/candlestick-chart.types.ts","../../../../packages/charts/candlestick/src/candlestick-layout.ts","../../../../packages/charts/candlestick/src/candlestick-chart.component.ts"],"mappings":";;;;;iBAGiB;;EAEf,qBAAqB;;EAErB;;EAEA;;EAEA;;EAEA;;EAEA;;;YAIU;;YAGA,yBAAyB;;iBAGpB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAIe;;EAEf;;EAEA;;EAEA,QAAQ;;;wBCvDM,YAAY,kBAAkB;;wBAO9B,WAAW,2BAA2B;;;;;;wBAsBtC,aAAa,kBAAkB,YAAY;EAAiB;EAAgB;;;;;wBAkB5E,aAAa,kBAAkB,YAAY,sBAAsB;;wBAcjE,KAAK,QAAQ;;;;;qBCAhB;mBACM;UAET;UACA;WACC,sCAAY,wCAAA;;WAEZ,8BAAI,qBAAA;;WACJ,iCAAO,YAAA;;WAC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AAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
|
|
@@ -87,7 +87,7 @@ export interface TxColumnLayoutInput {
|
|
|
87
87
|
/** Lays out the bars of a grouped or stacked column chart, with their data labels. */
|
|
88
88
|
export declare function columnBars(input: TxColumnLayoutInput): TxColumnChartBar[];
|
|
89
89
|
/**
|
|
90
|
-
* `<tx-column-chart>` — columns or horizontal bars for comparing values across categories:
|
|
90
|
+
* `<tx-column-chart>` — columns or horizontal bars for comparing values across categories: grouped side by side (default), stacked or 100% stacked. Drawn as SVG by the component, rendered on the server and themed by the design tokens.
|
|
91
91
|
* @see https://tectra-ng.com/components/column-chart
|
|
92
92
|
*/
|
|
93
93
|
export declare class TxColumnChart {
|
|
@@ -101,7 +101,7 @@ export declare class TxColumnChart {
|
|
|
101
101
|
readonly categories: import("@angular/core").InputSignal<readonly (string | number | Date)[] | null | undefined>;
|
|
102
102
|
/** Marks on the plot: `{ type: 'x-line', x }`, `{ type: 'y-line', y }`, `{ type: 'x-band', from, to }`, `{ type: 'y-band', from, to }`, `{ type: 'point', x, y }`, each with an optional `label`, `tone` (`neutral`, `primary`, `success`, `info`, `warn`, `danger`) or `color`; `x` is a category label or index; an `x-band` covers whole categories. In a horizontal chart the lines turn with the axes */
|
|
103
103
|
readonly annotations: import("@angular/core").InputSignal<readonly TxChartAnnotation[] | null | undefined>;
|
|
104
|
-
/** Stacks the series
|
|
104
|
+
/** Stacks the series; by default they are grouped side by side */
|
|
105
105
|
readonly stacked: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
106
106
|
/** `normal` or `100%` (every category to 100%; also turns stacking on) */
|
|
107
107
|
readonly stackType: import("@angular/core").InputSignal<TxColumnChartStackType>;
|
|
@@ -125,7 +125,7 @@ export declare class TxColumnChart {
|
|
|
125
125
|
readonly tooltipMode: import("@angular/core").InputSignal<TxChartTooltipMode>;
|
|
126
126
|
/** `(value, { seriesIndex, dataPointIndex }) => string` for tooltip and data label values; default — the locale number format */
|
|
127
127
|
readonly tooltipFormatter: import("@angular/core").InputSignal<TxChartTooltipFormatter | null>;
|
|
128
|
-
/** Value axis format: `number`, `integer`, `compact`, `percent` or a function */
|
|
128
|
+
/** Value axis format: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
129
129
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
130
130
|
/** `linear` or `log` */
|
|
131
131
|
readonly yScale: import("@angular/core").InputSignal<TxValueScaleKind>;
|
|
@@ -152,7 +152,7 @@ export declare class TxComboChart {
|
|
|
152
152
|
readonly tooltipMode: import("@angular/core").InputSignal<TxChartTooltipMode>;
|
|
153
153
|
/** `(value, { seriesIndex, dataPointIndex }) => string` for tooltip values; default — the format of the series' axis */
|
|
154
154
|
readonly tooltipFormatter: import("@angular/core").InputSignal<TxChartTooltipFormatter | null>;
|
|
155
|
-
/** Format of the main value axis: `number`, `integer`, `compact`, `percent` or a function */
|
|
155
|
+
/** Format of the main value axis: `number`, `integer`, `compact`, `percent`, a currency (`{ currency: 'USD' }`) or a function */
|
|
156
156
|
readonly valueFormat: import("@angular/core").InputSignal<TxChartValueFormat>;
|
|
157
157
|
/** Format of the second value axis; the main one by default */
|
|
158
158
|
readonly y2ValueFormat: import("@angular/core").InputSignal<TxChartValueFormat | undefined>;
|