@eric-emg/symphiq-components 1.2.249 → 1.2.250
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/symphiq-components.mjs +27 -7
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +34 -33
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -56759,7 +56759,8 @@ class LineChartComponent {
|
|
|
56759
56759
|
// Check for explicit keywords
|
|
56760
56760
|
if (name.includes('last year') ||
|
|
56761
56761
|
name.includes('prior year') ||
|
|
56762
|
-
name.includes('previous year')
|
|
56762
|
+
name.includes('previous year') ||
|
|
56763
|
+
name.includes('comparison')) {
|
|
56763
56764
|
return true;
|
|
56764
56765
|
}
|
|
56765
56766
|
// Check for year patterns - extract any 4-digit year and compare to current year
|
|
@@ -56770,6 +56771,13 @@ class LineChartComponent {
|
|
|
56770
56771
|
}
|
|
56771
56772
|
return false;
|
|
56772
56773
|
}
|
|
56774
|
+
isProjectionSeries(seriesData) {
|
|
56775
|
+
if (!seriesData || !seriesData.name) {
|
|
56776
|
+
return false;
|
|
56777
|
+
}
|
|
56778
|
+
const name = seriesData.name.toLowerCase();
|
|
56779
|
+
return name.includes('projection') || name.includes('projected') || name.includes('target');
|
|
56780
|
+
}
|
|
56773
56781
|
extractMetricName(seriesName) {
|
|
56774
56782
|
// Extract metric name from series name by removing year patterns
|
|
56775
56783
|
// e.g., "Purchase Revenue (2025)" -> "Purchase Revenue"
|
|
@@ -56968,8 +56976,9 @@ class LineChartComponent {
|
|
|
56968
56976
|
seriesColorValue = axisColors[yaxisLabel] || axisColorPalette[index % axisColorPalette.length];
|
|
56969
56977
|
}
|
|
56970
56978
|
const seriesColor = color(seriesColorValue);
|
|
56971
|
-
// Check if this is a prior year series for YoY charts
|
|
56979
|
+
// Check if this is a prior year or projection series for YoY charts
|
|
56972
56980
|
const isPriorYear = isYoYChart && this.isPriorYearSeries(seriesData);
|
|
56981
|
+
const isProjection = this.isProjectionSeries(seriesData);
|
|
56973
56982
|
if (!this.chartElement || !this.root)
|
|
56974
56983
|
return;
|
|
56975
56984
|
const series = this.chartElement.series.push(LineSeries.new(this.root, {
|
|
@@ -56981,7 +56990,7 @@ class LineChartComponent {
|
|
|
56981
56990
|
stroke: seriesColor
|
|
56982
56991
|
}));
|
|
56983
56992
|
// Store valueFormat and prior year flag in userData for tooltip formatting
|
|
56984
|
-
series.set('userData', { valueFormat: seriesData.valueFormat, isPriorYear });
|
|
56993
|
+
series.set('userData', { valueFormat: seriesData.valueFormat, isPriorYear, isProjection });
|
|
56985
56994
|
// Disable individual series tooltips - use floating tooltip instead
|
|
56986
56995
|
series.set('tooltip', undefined);
|
|
56987
56996
|
// Configure stroke styling based on series type
|
|
@@ -56999,6 +57008,16 @@ class LineChartComponent {
|
|
|
56999
57008
|
stroke.set('strokeOpacity', 0.5);
|
|
57000
57009
|
});
|
|
57001
57010
|
}
|
|
57011
|
+
else if (isProjection) {
|
|
57012
|
+
// Apply dotted line for projection data
|
|
57013
|
+
series.strokes.template.setAll({
|
|
57014
|
+
strokeDasharray: [10, 5],
|
|
57015
|
+
strokeWidth: 3
|
|
57016
|
+
});
|
|
57017
|
+
series.strokes.each((stroke) => {
|
|
57018
|
+
stroke.set('strokeDasharray', [10, 5]);
|
|
57019
|
+
});
|
|
57020
|
+
}
|
|
57002
57021
|
// Add bullets with larger hit area for better hover detection
|
|
57003
57022
|
series.bullets.push(() => {
|
|
57004
57023
|
const bulletConfig = {
|
|
@@ -57052,10 +57071,10 @@ class LineChartComponent {
|
|
|
57052
57071
|
}
|
|
57053
57072
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LineChartComponent, [{
|
|
57054
57073
|
type: Component,
|
|
57055
|
-
args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
57056
|
-
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
57057
|
-
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
57058
|
-
</div>
|
|
57074
|
+
args: [{ selector: 'symphiq-line-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
57075
|
+
<div class="chart-container" [class.mini-mode]="!showAxisLabels()">
|
|
57076
|
+
<div #chartdiv class="chart" [style.height]="chartHeight()" style="width: 100%;"></div>
|
|
57077
|
+
</div>
|
|
57059
57078
|
`, styles: [".chart-container{width:100%;padding:1rem}.chart-container.mini-mode{padding:.25rem}\n"] }]
|
|
57060
57079
|
}], () => [], { chart: [{ type: i0.Input, args: [{ isSignal: true, alias: "chart", required: false }] }], showAxisLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAxisLabels", required: false }] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }], currencySymbol: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencySymbol", required: false }] }], chartDiv: [{
|
|
57061
57080
|
type: ViewChild,
|
|
@@ -57893,6 +57912,7 @@ class MetricReportModalComponent {
|
|
|
57893
57912
|
chartType: 'LINE',
|
|
57894
57913
|
title: 'Pace',
|
|
57895
57914
|
description: '',
|
|
57915
|
+
lineChartUseCase: LineChartUseCaseEnum.THIS_YEAR_VS_LAST_YEAR,
|
|
57896
57916
|
lineChartData: {
|
|
57897
57917
|
series: [
|
|
57898
57918
|
{
|