@aquera/nile-visualization 2.9.29 → 2.9.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +1 -0
- package/dist/src/internal/types/chart-forecast-config.type.d.ts +35 -0
- package/dist/src/internal/types/chart-forecast-config.type.js +2 -0
- package/dist/src/internal/types/index.d.ts +1 -0
- package/dist/src/internal/types/primitive-chart-config.type.d.ts +2 -1
- package/dist/src/nile-chart/index.d.ts +1 -1
- package/dist/src/nile-chart/nile-chart-config.d.ts +20 -81
- package/dist/src/nile-chart/nile-chart-skeleton.js +1 -1
- package/dist/src/nile-chart/nile-chart.d.ts +9 -0
- package/dist/src/nile-chart/nile-chart.js +68 -4
- package/dist/src/nile-filter-chart/nile-filter-chart.d.ts +2 -0
- package/dist/src/nile-filter-chart/nile-filter-chart.js +14 -0
- package/dist/src/nile-filter-chart/utils/prompt.js +31 -6
- package/dist/src/nile-filter-chart/utils/types.d.ts +2 -0
- package/dist/src/nile-forecast-chart/index.d.ts +2 -0
- package/dist/src/nile-forecast-chart/index.js +2 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.css.d.ts +1 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.css.js +46 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.d.ts +90 -0
- package/dist/src/nile-forecast-chart/nile-forecast-chart.js +551 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -36,6 +36,10 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
|
36
36
|
|
|
37
37
|
In this section, you can find the updates for each release of `nile-visualization`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
|
|
38
38
|
|
|
39
|
+
#### Version 2.9.30 (July 28, 2026)
|
|
40
|
+
- Nile Forecast Chart: Added the `forecast` chart type (`<nile-forecast-chart>`) — a datetime series split into a measured half and a projected half. Pass measured series in `data` and projected series in `forecastData` (paired by series `name`), or put the whole timeline in `data` and mark the split with `forecastStart`; with no projection it renders as an ordinary time-series chart, so a chart can gain its forecast later without re-mounting. The projected half is dashed (`forecastDashStyle`, default `Dot`) or, for `column` series, recolored via `forecastColor`, with a labeled boundary marker (`showNowLine`, `nowLabel`, `nowLineColor`) and an optional tinted region (`forecastBandLabel`, `forecastBandColor`). Series support `type` (`line` | `spline` | `area` | `areaspline` | `column`), a secondary y-axis via `axis: 'secondary'` (`secondaryAxisTitle`, `secondaryAxisMin`), `valueSuffix`, `showMarkers`, `lineWidth`, and `fillOpacity`. Set `timezone` (IANA) to align the datetime axis with the boundary. Emits `nile-chart-ready`, `nile-chart-click` (`{ point, x, value, seriesName, forecast }`) and `nile-chart-selection`; exposes `setForecast()`, `clearForecast()`, and `resetZoom()` (UIF-1316)
|
|
41
|
+
- Nile Chart: Drag-to-zoom on the forecast chart (`zoom`, default `true`) uses the header reset-zoom control rather than Highcharts' in-plot reset button — the chart intercepts the selection, applies the extremes itself, and reports `nile-chart-selection`; the header button now serves both `master-detail` and `forecast` (UIF-1316)
|
|
42
|
+
|
|
39
43
|
#### Version 2.9.29 (July 27, 2026)
|
|
40
44
|
- Nile Dashboard Builder: Update on Nile Dashboard Builder (UIF-1315)
|
|
41
45
|
- Nile Chart: Added Responsiveness, APIs and Events to Nile Chart (UIF-1313) (UIF-1312) (UIF-1314)
|
package/dist/src/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { NileChart } from './nile-chart/index.js';
|
|
|
15
15
|
export type { NileChartConfig, NileBarChartConfig, NilePieChartConfig, NileTrendlineChartConfig, NileAnomalyChartConfig, NileLineChartConfig, NileAreaChartConfig, NileColumnChartConfig, NileDonutChartConfig, NileScatterChartConfig, NileBubbleChartConfig, NileSplineChartConfig, NileRadarChartConfig, NileGaugeChartConfig, NileWaterfallChartConfig, NileMapChartConfig, NileMasterDetailChartConfig, NileKpiChartConfig, NileListChartConfig, NileMessageChartConfig, ChartType, SwitchAggregation, NileAiConfig, NileChartMenuConfig, NileChartMenuItem, } from './nile-chart/index.js';
|
|
16
16
|
export { convertConfig, registerAdapter } from './nile-chart/index.js';
|
|
17
17
|
export { nileChartConfig } from './nile-chart/index.js';
|
|
18
|
-
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from './nile-chart/index.js';
|
|
18
|
+
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartForecastConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from './nile-chart/index.js';
|
|
19
19
|
export type { SeparatedChartDemoConfig } from './internal/separated-chart-config.js';
|
|
20
20
|
export { NileLineChart } from './nile-line-chart/index.js';
|
|
21
21
|
export type { LineChartSeriesData } from './nile-line-chart/index.js';
|
|
@@ -71,6 +71,8 @@ export { NileXrangeChart } from './nile-xrange-chart/index.js';
|
|
|
71
71
|
export type { XrangeDataPoint } from './nile-xrange-chart/index.js';
|
|
72
72
|
export { NileFanChart } from './nile-fan-chart/index.js';
|
|
73
73
|
export type { FanLinePoint, FanUncertaintyBand } from './nile-fan-chart/index.js';
|
|
74
|
+
export { NileForecastChart } from './nile-forecast-chart/index.js';
|
|
75
|
+
export type { ForecastSeriesData, ForecastPoint, ForecastSeriesType, ForecastDashStyle } from './nile-forecast-chart/index.js';
|
|
74
76
|
export { NileDonutChart } from './nile-donut-chart/index.js';
|
|
75
77
|
export type { DonutChartSeriesData } from './nile-donut-chart/index.js';
|
|
76
78
|
export { NileScatterChart } from './nile-scatter-chart/index.js';
|
package/dist/src/index.js
CHANGED
|
@@ -39,6 +39,7 @@ export { NilePolygonChart } from './nile-polygon-chart/index.js';
|
|
|
39
39
|
export { NileVectorChart } from './nile-vector-chart/index.js';
|
|
40
40
|
export { NileXrangeChart } from './nile-xrange-chart/index.js';
|
|
41
41
|
export { NileFanChart } from './nile-fan-chart/index.js';
|
|
42
|
+
export { NileForecastChart } from './nile-forecast-chart/index.js';
|
|
42
43
|
export { NileDonutChart } from './nile-donut-chart/index.js';
|
|
43
44
|
export { NileScatterChart } from './nile-scatter-chart/index.js';
|
|
44
45
|
export { NileBubbleChart } from './nile-bubble-chart/index.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Options } from 'highcharts';
|
|
2
|
+
import type { ForecastSeriesData, ForecastDashStyle } from '../../nile-forecast-chart/nile-forecast-chart.js';
|
|
3
|
+
export interface ChartForecastConfigType {
|
|
4
|
+
type: 'forecast';
|
|
5
|
+
data: ForecastSeriesData[];
|
|
6
|
+
forecastData?: ForecastSeriesData[];
|
|
7
|
+
forecastStart?: number | null;
|
|
8
|
+
forecastDashStyle?: ForecastDashStyle;
|
|
9
|
+
zoom?: boolean;
|
|
10
|
+
showNowLine?: boolean;
|
|
11
|
+
nowLabel?: string;
|
|
12
|
+
nowLineColor?: string;
|
|
13
|
+
forecastBandLabel?: string;
|
|
14
|
+
forecastBandColor?: string;
|
|
15
|
+
xAxisTitle?: string;
|
|
16
|
+
yAxisTitle?: string;
|
|
17
|
+
secondaryAxisTitle?: string;
|
|
18
|
+
secondaryAxisMin?: number | null;
|
|
19
|
+
timezone?: string;
|
|
20
|
+
height?: string;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
options?: Options;
|
|
23
|
+
showLegend?: boolean;
|
|
24
|
+
chartBg?: string;
|
|
25
|
+
chartBorderRadius?: string | number;
|
|
26
|
+
chartBorder?: string;
|
|
27
|
+
chartShadow?: string;
|
|
28
|
+
chartPadding?: string | number;
|
|
29
|
+
chartMinHeight?: string | number;
|
|
30
|
+
loadingText?: string;
|
|
31
|
+
loadingColor?: string;
|
|
32
|
+
loadingFontSize?: string | number;
|
|
33
|
+
loadingFontFamily?: string;
|
|
34
|
+
loadingBg?: string;
|
|
35
|
+
}
|
|
@@ -40,6 +40,7 @@ export type { ChartPolygonConfigType } from './chart-polygon-config.type.js';
|
|
|
40
40
|
export type { ChartVectorConfigType } from './chart-vector-config.type.js';
|
|
41
41
|
export type { ChartXrangeConfigType } from './chart-xrange-config.type.js';
|
|
42
42
|
export type { ChartFanConfigType } from './chart-fan-config.type.js';
|
|
43
|
+
export type { ChartForecastConfigType } from './chart-forecast-config.type.js';
|
|
43
44
|
export type { ChartFunnelConfigType } from './chart-funnel-config.type.js';
|
|
44
45
|
export type { ChartOrganizationConfigType } from './chart-organization-config.type.js';
|
|
45
46
|
export type { ChartLineColumnConfigType } from './chart-line-column-config.type.js';
|
|
@@ -7,6 +7,7 @@ import type { ChartTimelineConfigType } from './chart-timeline-config.type.js';
|
|
|
7
7
|
import type { ChartMasterDetailConfigType } from './chart-master-detail-config.type.js';
|
|
8
8
|
import type { ChartDumbbellConfigType } from './chart-dumbbell-config.type.js';
|
|
9
9
|
import type { ChartFanConfigType } from './chart-fan-config.type.js';
|
|
10
|
+
import type { ChartForecastConfigType } from './chart-forecast-config.type.js';
|
|
10
11
|
import type { ChartFunnelConfigType } from './chart-funnel-config.type.js';
|
|
11
12
|
import type { ChartOrganizationConfigType } from './chart-organization-config.type.js';
|
|
12
13
|
import type { ChartLineColumnConfigType } from './chart-line-column-config.type.js';
|
|
@@ -35,4 +36,4 @@ import type { ChartXrangeConfigType } from './chart-xrange-config.type.js';
|
|
|
35
36
|
* Chart configs for primitive `<nile-*-chart>` elements (`el.config = { chart, aq }`).
|
|
36
37
|
* Discriminated on `chart.type`.
|
|
37
38
|
*/
|
|
38
|
-
export type PrimitiveChartConfigType = ChartInvertedAreaConfigType | ChartColumnPyramidConfigType | ChartLollipopConfigType | ChartAreaSplineConfigType | ChartAreaNegativeConfigType | ChartAreaRangeConfigType | ChartColumnRangeConfigType | ChartColumnDrilldownConfigType | ChartRadialBarConfigType | ChartVariablePieConfigType | ChartDumbbellLowerConfigType | ChartDumbbellUpperConfigType | ChartEulerConfigType | ChartPolygonConfigType | ChartVectorConfigType | ChartXrangeConfigType | ChartClusterConfigType | ChartStackedConfigType | ChartHistogramConfigType | ChartBellcurveConfigType | ChartBoxplotConfigType | ChartTimelineConfigType | ChartMasterDetailConfigType | ChartDumbbellConfigType | ChartFanConfigType | ChartFunnelConfigType | ChartOrganizationConfigType | ChartLineColumnConfigType | ChartHeatmapConfigType | ChartFlameConfigType | ChartSpiderwebConfigType | ChartKpiConfigType | ChartFilterConfigType;
|
|
39
|
+
export type PrimitiveChartConfigType = ChartInvertedAreaConfigType | ChartColumnPyramidConfigType | ChartLollipopConfigType | ChartAreaSplineConfigType | ChartAreaNegativeConfigType | ChartAreaRangeConfigType | ChartColumnRangeConfigType | ChartColumnDrilldownConfigType | ChartRadialBarConfigType | ChartVariablePieConfigType | ChartDumbbellLowerConfigType | ChartDumbbellUpperConfigType | ChartEulerConfigType | ChartPolygonConfigType | ChartVectorConfigType | ChartXrangeConfigType | ChartClusterConfigType | ChartStackedConfigType | ChartHistogramConfigType | ChartBellcurveConfigType | ChartBoxplotConfigType | ChartTimelineConfigType | ChartMasterDetailConfigType | ChartDumbbellConfigType | ChartFanConfigType | ChartForecastConfigType | ChartFunnelConfigType | ChartOrganizationConfigType | ChartLineColumnConfigType | ChartHeatmapConfigType | ChartFlameConfigType | ChartSpiderwebConfigType | ChartKpiConfigType | ChartFilterConfigType;
|
|
@@ -2,4 +2,4 @@ export { NileChart } from './nile-chart.js';
|
|
|
2
2
|
export type { NileChartConfig, NileBarChartConfig, NilePieChartConfig, NileTrendlineChartConfig, NileAnomalyChartConfig, NileLineChartConfig, NileAreaChartConfig, NileColumnChartConfig, NileDonutChartConfig, NileScatterChartConfig, NileBubbleChartConfig, NileSplineChartConfig, NileRadarChartConfig, NileGaugeChartConfig, NileWaterfallChartConfig, NileMasterDetailChartConfig, NileKpiChartConfig, NileMapChartConfig, NileListChartConfig, NileMessageChartConfig, ChartType, SwitchAggregation, NileAiConfig, NileChartMenuConfig, NileChartMenuItem, } from './nile-chart-config.js';
|
|
3
3
|
export { convertConfig, registerAdapter } from '../internal/chart-adapters.js';
|
|
4
4
|
export { nileChartConfig } from './nile-chart-config-builder.js';
|
|
5
|
-
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
|
|
5
|
+
export type { AiConfigType, SwitchableConfigType, AqConfigType, ChartColorPaletteConfig, ColorPaletteName, ColorPaletteSize, ChartBarConfigType, ChartPieConfigType, ChartTrendlineConfigType, ChartAnomalyConfigType, ChartLineConfigType, ChartAreaConfigType, ChartInvertedAreaConfigType, ChartColumnConfigType, ChartDonutConfigType, ChartScatterConfigType, ChartBubbleConfigType, ChartSplineConfigType, ChartRadarConfigType, ChartGaugeConfigType, ChartWaterfallConfigType, ChartClusterConfigType, ChartStackedConfigType, ChartHistogramConfigType, ChartBellcurveConfigType, ChartBoxplotConfigType, ChartTimelineConfigType, ChartMasterDetailConfigType, ChartDumbbellConfigType, ChartDumbbellLowerConfigType, ChartDumbbellUpperConfigType, ChartColumnPyramidConfigType, ChartLollipopConfigType, ChartAreaSplineConfigType, ChartAreaNegativeConfigType, ChartAreaRangeConfigType, ChartColumnRangeConfigType, ChartColumnDrilldownConfigType, ChartRadialBarConfigType, ChartVariablePieConfigType, ChartEulerConfigType, ChartPolygonConfigType, ChartVectorConfigType, ChartXrangeConfigType, ChartFanConfigType, ChartForecastConfigType, ChartFunnelConfigType, ChartOrganizationConfigType, ChartLineColumnConfigType, ChartHeatmapConfigType, ChartFlameConfigType, ChartSpiderwebConfigType, ChartKpiConfigType, ChartKpiPropsType, ChartMapConfigType, PrimitiveChartConfigType, SeparatedChartConfigInputType, AllChartConfigType, ChartConfigType, NileChartConfigInputType, CSSObject, LegendConfig, LegendNavigationConfig, LegendTitleConfig, LegendAccessibilityConfig, ChartSpacingConfig, ChartAiPanelPayload, ChartAiSenderPayload, NileAiPanelConfigInputType, NileAiSenderConfigInputType, } from '../internal/types/index.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ChartConfigType } from '../internal/types/chart-config.type.js';
|
|
2
|
-
/** Every supported `chart.type` value for `<nile-chart>`. */
|
|
3
2
|
export type ChartType = ChartConfigType['type'];
|
|
4
3
|
import type { BarChartSeriesData } from '../nile-bar-chart/nile-bar-chart.js';
|
|
5
4
|
import type { PieChartSeriesData } from '../nile-pie-chart/nile-pie-chart.js';
|
|
@@ -16,6 +15,7 @@ import type { SplineChartSeriesData } from '../nile-spline-chart/nile-spline-cha
|
|
|
16
15
|
import type { RadarChartSeriesData } from '../nile-radar-chart/nile-radar-chart.js';
|
|
17
16
|
import type { GaugeBand } from '../nile-gauge-chart/nile-gauge-chart.js';
|
|
18
17
|
import type { WaterfallDataPoint } from '../nile-waterfall-chart/nile-waterfall-chart.js';
|
|
18
|
+
import type { ForecastSeriesData, ForecastDashStyle } from '../nile-forecast-chart/nile-forecast-chart.js';
|
|
19
19
|
import type { KpiVariant, KpiValueFormat, KpiNumberSystem, SparklineType, TrendDirection } from '../nile-kpi-chart/nile-kpi-chart.js';
|
|
20
20
|
import type { MapChartDataPoint } from '../nile-map-chart/nile-map-chart.js';
|
|
21
21
|
import type { StatusLightConfig } from '../nile-chart-message/nile-chart-message.js';
|
|
@@ -52,23 +52,12 @@ import type { XrangeDataPoint } from '../nile-xrange-chart/nile-xrange-chart.js'
|
|
|
52
52
|
import type { LineColumnSeriesPart } from '../nile-line-column-chart/nile-line-column-chart.js';
|
|
53
53
|
import type { ChartColorPaletteConfig } from '../internal/types/chart-color-palette.type.js';
|
|
54
54
|
export type SwitchAggregation = 'by-category' | 'by-series' | 'flatten';
|
|
55
|
-
/**
|
|
56
|
-
* A built-in menu action (fullscreen, print, or a download).
|
|
57
|
-
* Set the matching flag to `true`; optionally override the displayed `label`.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* { type: 'default', downloadPng: true }
|
|
61
|
-
* { type: 'default', downloadCsv: true, label: 'Export CSV', divider: true }
|
|
62
|
-
*/
|
|
63
55
|
export interface NileChartMenuItemDefault {
|
|
64
56
|
type: 'default';
|
|
65
|
-
/** Override the default label (e.g. "Download PNG"). */
|
|
66
57
|
label?: string;
|
|
67
|
-
/** Optional nile-glyph icon name shown as a leading prefix (e.g. `'download'`). */
|
|
68
58
|
glyph?: string;
|
|
69
59
|
method?: string;
|
|
70
60
|
color?: string;
|
|
71
|
-
/** Show a divider line above this item. */
|
|
72
61
|
divider?: boolean;
|
|
73
62
|
fullscreen?: true;
|
|
74
63
|
print?: true;
|
|
@@ -76,70 +65,24 @@ export interface NileChartMenuItemDefault {
|
|
|
76
65
|
downloadSvg?: true;
|
|
77
66
|
downloadCsv?: true;
|
|
78
67
|
}
|
|
79
|
-
/**
|
|
80
|
-
* A custom menu item. Clicking it fires a `nile-menu-change` event with `{ id }`.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* { type: 'custom', label: 'Send to Slack', id: 'send-slack' }
|
|
84
|
-
*/
|
|
85
68
|
export interface NileChartMenuItemCustom {
|
|
86
69
|
type: 'custom';
|
|
87
|
-
/** Label shown in the menu. */
|
|
88
70
|
label: string;
|
|
89
|
-
/** Identifier emitted in the `nile-menu-change` event when clicked. */
|
|
90
71
|
id: string;
|
|
91
|
-
/** Optional nile-glyph icon name shown as a leading prefix (e.g. `'share-07'`). */
|
|
92
72
|
glyph?: string;
|
|
93
|
-
/** Render method for the leading glyph (passed to nile-glyph `method`, e.g. `'fill'`, `'stroke'`). */
|
|
94
73
|
method?: string;
|
|
95
|
-
/** Color for the leading glyph (passed to nile-glyph `color`, e.g. a hex value or CSS var). */
|
|
96
74
|
color?: string;
|
|
97
|
-
/** Show a divider line above this item. */
|
|
98
75
|
divider?: boolean;
|
|
99
76
|
}
|
|
100
|
-
/**
|
|
101
|
-
* A group that renders a section header followed by its child items.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* {
|
|
105
|
-
* type: 'group',
|
|
106
|
-
* label: 'Export',
|
|
107
|
-
* items: [
|
|
108
|
-
* { type: 'default', downloadPng: true },
|
|
109
|
-
* { type: 'default', downloadCsv: true },
|
|
110
|
-
* ]
|
|
111
|
-
* }
|
|
112
|
-
*/
|
|
113
77
|
export interface NileChartMenuItemGroup {
|
|
114
78
|
type: 'group';
|
|
115
|
-
/** Text shown as the section header. */
|
|
116
79
|
label: string;
|
|
117
|
-
/** Items rendered under this group header. */
|
|
118
80
|
items: Array<NileChartMenuItemDefault | NileChartMenuItemCustom>;
|
|
119
|
-
/** Show a divider line above the group header. */
|
|
120
81
|
divider?: boolean;
|
|
121
82
|
}
|
|
122
83
|
export type NileChartMenuItem = NileChartMenuItemDefault | NileChartMenuItemCustom | NileChartMenuItemGroup;
|
|
123
|
-
/**
|
|
124
|
-
* Controls the chart's actions menu.
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* menu: {
|
|
128
|
-
* enabled: true,
|
|
129
|
-
* items: [
|
|
130
|
-
* { type: 'default', downloadPng: true },
|
|
131
|
-
* { type: 'default', downloadCsv: true },
|
|
132
|
-
* { type: 'custom', label: 'Share report', id: 'share-report', divider: true },
|
|
133
|
-
* ]
|
|
134
|
-
* }
|
|
135
|
-
*/
|
|
136
84
|
export interface NileChartMenuConfig {
|
|
137
|
-
/** Show the menu trigger button. Must be `true` to enable the menu. */
|
|
138
85
|
enabled?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Ordered list of menu items. Each item is either a built-in action
|
|
141
|
-
* (`type: 'default'`) or a custom event-driven item (`type: 'custom'`).
|
|
142
|
-
*/
|
|
143
86
|
items?: NileChartMenuItem[];
|
|
144
87
|
}
|
|
145
88
|
export interface NileAiConfig {
|
|
@@ -150,9 +93,7 @@ export interface NileAiConfig {
|
|
|
150
93
|
export interface NileChartConfigBase extends HighchartsPassthroughConfig {
|
|
151
94
|
chartTitle?: string;
|
|
152
95
|
chartSubtitle?: string;
|
|
153
|
-
/** Font size for the header title (number → px, or any CSS length string). */
|
|
154
96
|
titleFontSize?: string | number;
|
|
155
|
-
/** Font size for the header subtitle (number → px, or any CSS length string). */
|
|
156
97
|
subtitleFontSize?: string | number;
|
|
157
98
|
noHeader?: boolean;
|
|
158
99
|
noPadding?: boolean;
|
|
@@ -167,13 +108,7 @@ export interface NileChartConfigBase extends HighchartsPassthroughConfig {
|
|
|
167
108
|
menu?: NileChartMenuConfig;
|
|
168
109
|
menuItems?: NileChartMenuItem[];
|
|
169
110
|
legend?: LegendConfig;
|
|
170
|
-
/** Color palette applied to the chart's series. */
|
|
171
111
|
colorPalette?: ChartColorPaletteConfig;
|
|
172
|
-
/**
|
|
173
|
-
* Space (px) between the chart's outer edge and its plot area — maps to
|
|
174
|
-
* Highcharts `chart.spacingTop/Right/Bottom/Left`. Applies to every chart
|
|
175
|
-
* type. e.g. `{ right: 40 }` gives a right-aligned legend room to breathe.
|
|
176
|
-
*/
|
|
177
112
|
chartSpacing?: ChartSpacingConfig;
|
|
178
113
|
chartBg?: string;
|
|
179
114
|
chartBorderRadius?: string | number;
|
|
@@ -271,12 +206,6 @@ export interface NileMapChartConfig extends NileChartConfigBase {
|
|
|
271
206
|
seriesType?: 'map' | 'mapline' | 'mappoint' | 'mapbubble' | 'tiledwebmap';
|
|
272
207
|
zoom?: boolean;
|
|
273
208
|
}
|
|
274
|
-
/**
|
|
275
|
-
* Tabular grid variant of `<nile-chart>` — renders a `<nile-data-grid>` and
|
|
276
|
-
* exposes its full public property surface.
|
|
277
|
-
*
|
|
278
|
-
* Use `type: 'grid'`.
|
|
279
|
-
*/
|
|
280
209
|
export interface NileGridChartConfig extends NileChartConfigBase {
|
|
281
210
|
type: 'grid';
|
|
282
211
|
data: unknown[];
|
|
@@ -468,7 +397,6 @@ export interface NileMasterDetailChartConfig extends NileChartConfigBase {
|
|
|
468
397
|
seriesColor?: string;
|
|
469
398
|
detailType?: string;
|
|
470
399
|
masterType?: string;
|
|
471
|
-
/** Render only the master (overview) pane — no detail chart. */
|
|
472
400
|
masterOnly?: boolean;
|
|
473
401
|
masterCollapsible?: boolean;
|
|
474
402
|
xAxisType?: 'datetime' | 'linear' | 'logarithmic' | 'category';
|
|
@@ -494,6 +422,24 @@ export interface NileFanChartConfig extends NileChartConfigBase {
|
|
|
494
422
|
forecastStartIndex?: number;
|
|
495
423
|
forecastBandLabel?: string;
|
|
496
424
|
}
|
|
425
|
+
export interface NileForecastChartConfig extends NileChartConfigBase {
|
|
426
|
+
type: 'forecast';
|
|
427
|
+
data: ForecastSeriesData[];
|
|
428
|
+
forecastData?: ForecastSeriesData[];
|
|
429
|
+
forecastStart?: number | null;
|
|
430
|
+
forecastDashStyle?: ForecastDashStyle;
|
|
431
|
+
zoom?: boolean;
|
|
432
|
+
showNowLine?: boolean;
|
|
433
|
+
nowLabel?: string;
|
|
434
|
+
nowLineColor?: string;
|
|
435
|
+
forecastBandLabel?: string;
|
|
436
|
+
forecastBandColor?: string;
|
|
437
|
+
xAxisTitle?: string;
|
|
438
|
+
yAxisTitle?: string;
|
|
439
|
+
secondaryAxisTitle?: string;
|
|
440
|
+
secondaryAxisMin?: number | null;
|
|
441
|
+
timezone?: string;
|
|
442
|
+
}
|
|
497
443
|
export interface NileFunnelChartConfig extends NileChartConfigBase {
|
|
498
444
|
type: 'funnel';
|
|
499
445
|
data: FunnelDataPoint[];
|
|
@@ -566,7 +512,6 @@ export interface NileLineColumnChartConfig extends NileChartConfigBase {
|
|
|
566
512
|
}
|
|
567
513
|
export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
568
514
|
type: 'kpi';
|
|
569
|
-
/** Display variant. Default: 'default'. */
|
|
570
515
|
variant?: KpiVariant;
|
|
571
516
|
label?: string;
|
|
572
517
|
value?: number | string;
|
|
@@ -619,15 +564,10 @@ export interface NileKpiChartConfig extends NileChartConfigBase {
|
|
|
619
564
|
cardPaddingVertical?: string | number;
|
|
620
565
|
cardPaddingHorizontal?: string | number;
|
|
621
566
|
contentGap?: string | number;
|
|
622
|
-
/** Abbreviation scale. Default 'auto'. */
|
|
623
567
|
valueFormat?: KpiValueFormat;
|
|
624
|
-
/** Decimal places on the abbreviated value. */
|
|
625
568
|
precision?: number | null;
|
|
626
|
-
/** Base unit (e.g. 'L', 'g', 'm') combined with the magnitude prefix: "1.5KL", "2.5Kg". */
|
|
627
569
|
unit?: string;
|
|
628
|
-
/** BCP 47 locale for number formatting, e.g. 'en-IN'. Defaults to browser locale. */
|
|
629
570
|
locale?: string;
|
|
630
|
-
/** Number system: 'indian' (1,00,000 / L / Cr) or 'international' (100,000 / K / M / B / T). */
|
|
631
571
|
numberSystem?: KpiNumberSystem;
|
|
632
572
|
tooltipEnabled?: boolean;
|
|
633
573
|
}
|
|
@@ -656,5 +596,4 @@ export interface NileListChartConfig extends NileChartConfigBase {
|
|
|
656
596
|
markerColor?: string;
|
|
657
597
|
allowHtml?: boolean;
|
|
658
598
|
}
|
|
659
|
-
|
|
660
|
-
export type NileChartConfig = NileBarChartConfig | NilePieChartConfig | NileLineChartConfig | NileAreaChartConfig | NileColumnChartConfig | NileDonutChartConfig | NileScatterChartConfig | NileBubbleChartConfig | NileSplineChartConfig | NileRadarChartConfig | NileGaugeChartConfig | NileWaterfallChartConfig | NileMapChartConfig | NileGridChartConfig | NileTrendlineChartConfig | NileAnomalyChartConfig | NileHistogramChartConfig | NileBellcurveChartConfig | NileBoxplotChartConfig | NileStackedChartConfig | NileClusterChartConfig | NileColumnPyramidChartConfig | NileColumnRangeChartConfig | NileColumnDrilldownChartConfig | NileLollipopChartConfig | NileInvertedAreaChartConfig | NileAreaSplineChartConfig | NileAreaNegativeChartConfig | NileAreaRangeChartConfig | NileDumbbellChartConfig | NileDumbbellLowerChartConfig | NileDumbbellUpperChartConfig | NileRadialBarChartConfig | NileSpiderwebChartConfig | NileTimelineChartConfig | NileMasterDetailChartConfig | NileFanChartConfig | NileFunnelChartConfig | NileOrganizationChartConfig | NileHeatmapChartConfig | NileFlameChartConfig | NileVariablePieChartConfig | NileEulerChartConfig | NilePolygonChartConfig | NileVectorChartConfig | NileXrangeChartConfig | NileLineColumnChartConfig | NileKpiChartConfig | NileFilterChartConfig | NileMessageChartConfig | NileListChartConfig;
|
|
599
|
+
export type NileChartConfig = NileBarChartConfig | NilePieChartConfig | NileLineChartConfig | NileAreaChartConfig | NileColumnChartConfig | NileDonutChartConfig | NileScatterChartConfig | NileBubbleChartConfig | NileSplineChartConfig | NileRadarChartConfig | NileGaugeChartConfig | NileWaterfallChartConfig | NileMapChartConfig | NileGridChartConfig | NileTrendlineChartConfig | NileAnomalyChartConfig | NileHistogramChartConfig | NileBellcurveChartConfig | NileBoxplotChartConfig | NileStackedChartConfig | NileClusterChartConfig | NileColumnPyramidChartConfig | NileColumnRangeChartConfig | NileColumnDrilldownChartConfig | NileLollipopChartConfig | NileInvertedAreaChartConfig | NileAreaSplineChartConfig | NileAreaNegativeChartConfig | NileAreaRangeChartConfig | NileDumbbellChartConfig | NileDumbbellLowerChartConfig | NileDumbbellUpperChartConfig | NileRadialBarChartConfig | NileSpiderwebChartConfig | NileTimelineChartConfig | NileMasterDetailChartConfig | NileFanChartConfig | NileForecastChartConfig | NileFunnelChartConfig | NileOrganizationChartConfig | NileHeatmapChartConfig | NileFlameChartConfig | NileVariablePieChartConfig | NileEulerChartConfig | NilePolygonChartConfig | NileVectorChartConfig | NileXrangeChartConfig | NileLineColumnChartConfig | NileKpiChartConfig | NileFilterChartConfig | NileMessageChartConfig | NileListChartConfig;
|
|
@@ -5,7 +5,7 @@ const SKELETON_TYPE_MAP = {
|
|
|
5
5
|
columnRange: 'columns', columnDrilldown: 'columns', lollipop: 'columns',
|
|
6
6
|
line: 'line', area: 'line', spline: 'line', areaSpline: 'line',
|
|
7
7
|
invertedArea: 'line', areaNegative: 'line', areaRange: 'line',
|
|
8
|
-
fan: 'line', bellcurve: 'line', 'master-detail': 'line',
|
|
8
|
+
fan: 'line', forecast: 'line', bellcurve: 'line', 'master-detail': 'line',
|
|
9
9
|
trendline: 'trendline', anomaly: 'anomaly',
|
|
10
10
|
pie: 'pie', donut: 'pie', variablePie: 'pie', radialBar: 'pie', gauge: 'pie', euler: 'pie',
|
|
11
11
|
scatter: 'scatter', bubble: 'scatter', dumbbell: 'scatter', boxplot: 'scatter',
|
|
@@ -29,6 +29,7 @@ import '../nile-dumbbell-chart/index.js';
|
|
|
29
29
|
import '../nile-dumbbell-lower-chart/index.js';
|
|
30
30
|
import '../nile-dumbbell-upper-chart/index.js';
|
|
31
31
|
import '../nile-fan-chart/index.js';
|
|
32
|
+
import '../nile-forecast-chart/index.js';
|
|
32
33
|
import '../nile-funnel-chart/index.js';
|
|
33
34
|
import '../nile-organization-chart/index.js';
|
|
34
35
|
import '../nile-line-column-chart/index.js';
|
|
@@ -144,10 +145,18 @@ export declare class NileChart extends NileElement {
|
|
|
144
145
|
private hasHeaderActionsSlot;
|
|
145
146
|
private aiPanel;
|
|
146
147
|
private masterDetailChart;
|
|
148
|
+
private forecastChart;
|
|
147
149
|
/** True while the inner master-detail chart is zoomed — drives the header
|
|
148
150
|
* "Reset zoom" button. Reflected from the chart's `nile-master-detail-zoom`. */
|
|
149
151
|
private masterZoomed;
|
|
150
152
|
private onMasterZoom;
|
|
153
|
+
/** True while the inner forecast chart is zoomed — drives the same header
|
|
154
|
+
* "Reset zoom" button. Reflected from the chart's `nile-forecast-zoom`. */
|
|
155
|
+
private forecastZoomed;
|
|
156
|
+
private onForecastZoom;
|
|
157
|
+
/** Reset-zoom lives in the header for every chart type that supports zoom. */
|
|
158
|
+
private get showResetZoom();
|
|
159
|
+
private resetActiveZoom;
|
|
151
160
|
private get effectiveSummary();
|
|
152
161
|
/** AI panel shows when ai.enabled is true OR when a summary is provided. */
|
|
153
162
|
private get aiEnabled();
|
|
@@ -39,6 +39,7 @@ import '../nile-dumbbell-chart/index.js';
|
|
|
39
39
|
import '../nile-dumbbell-lower-chart/index.js';
|
|
40
40
|
import '../nile-dumbbell-upper-chart/index.js';
|
|
41
41
|
import '../nile-fan-chart/index.js';
|
|
42
|
+
import '../nile-forecast-chart/index.js';
|
|
42
43
|
import '../nile-funnel-chart/index.js';
|
|
43
44
|
import '../nile-organization-chart/index.js';
|
|
44
45
|
import '../nile-line-column-chart/index.js';
|
|
@@ -64,6 +65,7 @@ import '../nile-filter-chart/index.js';
|
|
|
64
65
|
import '../nile-chart-message/nile-chart-message.js';
|
|
65
66
|
import '../nile-chart-list/nile-chart-list.js';
|
|
66
67
|
import '../nile-ai-panel/index.js';
|
|
68
|
+
import { FORECAST_NOW_LINE_COLOR } from '../nile-forecast-chart/nile-forecast-chart.js';
|
|
67
69
|
const CORE_CHART_LABELS = {
|
|
68
70
|
bar: 'Bar',
|
|
69
71
|
pie: 'Pie',
|
|
@@ -223,6 +225,9 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
223
225
|
/** True while the inner master-detail chart is zoomed — drives the header
|
|
224
226
|
* "Reset zoom" button. Reflected from the chart's `nile-master-detail-zoom`. */
|
|
225
227
|
this.masterZoomed = false;
|
|
228
|
+
/** True while the inner forecast chart is zoomed — drives the same header
|
|
229
|
+
* "Reset zoom" button. Reflected from the chart's `nile-forecast-zoom`. */
|
|
230
|
+
this.forecastZoomed = false;
|
|
226
231
|
this.handleOutsideClick = (e) => {
|
|
227
232
|
const path = e.composedPath();
|
|
228
233
|
if (!path.includes(this)) {
|
|
@@ -287,6 +292,22 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
287
292
|
onMasterZoom(e) {
|
|
288
293
|
this.masterZoomed = !!e.detail?.zoomed;
|
|
289
294
|
}
|
|
295
|
+
onForecastZoom(e) {
|
|
296
|
+
this.forecastZoomed = !!e.detail?.zoomed;
|
|
297
|
+
}
|
|
298
|
+
/** Reset-zoom lives in the header for every chart type that supports zoom. */
|
|
299
|
+
get showResetZoom() {
|
|
300
|
+
const type = this.activeType ?? this.resolvedConfig?.type;
|
|
301
|
+
return (this.masterZoomed && type === 'master-detail')
|
|
302
|
+
|| (this.forecastZoomed && type === 'forecast');
|
|
303
|
+
}
|
|
304
|
+
resetActiveZoom() {
|
|
305
|
+
const type = this.activeType ?? this.resolvedConfig?.type;
|
|
306
|
+
if (type === 'master-detail')
|
|
307
|
+
this.masterDetailChart?.resetZoom();
|
|
308
|
+
else if (type === 'forecast')
|
|
309
|
+
this.forecastChart?.resetZoom();
|
|
310
|
+
}
|
|
290
311
|
get effectiveSummary() {
|
|
291
312
|
return this.resolvedConfig?.summary ?? this.summary;
|
|
292
313
|
}
|
|
@@ -495,8 +516,10 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
495
516
|
const converted = convertConfig(this.resolvedConfig, toType);
|
|
496
517
|
this.activeType = toType;
|
|
497
518
|
this.activeConfig = converted;
|
|
498
|
-
// Leaving master-detail drops any active zoom
|
|
519
|
+
// Leaving master-detail or forecast drops any active zoom, and with it the
|
|
520
|
+
// header reset button.
|
|
499
521
|
this.masterZoomed = false;
|
|
522
|
+
this.forecastZoomed = false;
|
|
500
523
|
this.closeMenu();
|
|
501
524
|
this.emit('nile-chart-type-change', {
|
|
502
525
|
fromType,
|
|
@@ -590,7 +613,7 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
590
613
|
this.lightDomHasSlot('header') ||
|
|
591
614
|
this.lightDomHasSlot('header-actions') ||
|
|
592
615
|
hasBuiltinActions ||
|
|
593
|
-
this.
|
|
616
|
+
this.showResetZoom);
|
|
594
617
|
}
|
|
595
618
|
buildExportingOptions() {
|
|
596
619
|
return { exporting: { enabled: true, buttons: { contextButton: { enabled: false } } } };
|
|
@@ -784,14 +807,14 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
784
807
|
</div>
|
|
785
808
|
<div class="nile-chart-header-actions" part="header-actions">
|
|
786
809
|
<slot name="header-actions" @slotchange=${this.onHeaderActionsSlotChange}></slot>
|
|
787
|
-
${this.
|
|
810
|
+
${this.showResetZoom
|
|
788
811
|
? html `<nile-tooltip content="Reset zoom" placement="top" part="reset-zoom-tooltip">
|
|
789
812
|
<button
|
|
790
813
|
type="button"
|
|
791
814
|
class="nile-chart-menu-trigger nile-chart-reset-zoom"
|
|
792
815
|
part="reset-zoom"
|
|
793
816
|
aria-label="Reset zoom"
|
|
794
|
-
@click=${() => this.
|
|
817
|
+
@click=${() => this.resetActiveZoom()}
|
|
795
818
|
>
|
|
796
819
|
<nile-glyph name="refresh" size="16" part="reset-zoom-glyph"></nile-glyph>
|
|
797
820
|
</button>
|
|
@@ -1506,6 +1529,41 @@ let NileChart = NileChart_1 = class NileChart extends NileElement {
|
|
|
1506
1529
|
.loadingFontFamily=${config.loadingFontFamily ?? ''}
|
|
1507
1530
|
.loadingBg=${config.loadingBg ?? ''}
|
|
1508
1531
|
></nile-fan-chart>`;
|
|
1532
|
+
case 'forecast':
|
|
1533
|
+
return html `<nile-forecast-chart
|
|
1534
|
+
.data=${config.data}
|
|
1535
|
+
.forecastData=${config.forecastData ?? []}
|
|
1536
|
+
.height=${this.hasAttribute('fit') ? null : (config.height ?? '100%')}
|
|
1537
|
+
.forecastStart=${config.forecastStart ?? null}
|
|
1538
|
+
.forecastDashStyle=${config.forecastDashStyle ?? 'Dot'}
|
|
1539
|
+
.zoom=${config.zoom ?? true}
|
|
1540
|
+
@nile-forecast-zoom=${(e) => this.onForecastZoom(e)}
|
|
1541
|
+
.showNowLine=${config.showNowLine ?? true}
|
|
1542
|
+
.nowLabel=${config.nowLabel ?? 'Now'}
|
|
1543
|
+
.nowLineColor=${config.nowLineColor ?? FORECAST_NOW_LINE_COLOR}
|
|
1544
|
+
.forecastBandLabel=${config.forecastBandLabel ?? ''}
|
|
1545
|
+
.forecastBandColor=${config.forecastBandColor ?? ''}
|
|
1546
|
+
.xAxisTitle=${config.xAxisTitle ?? ''}
|
|
1547
|
+
.yAxisTitle=${config.yAxisTitle ?? ''}
|
|
1548
|
+
.secondaryAxisTitle=${config.secondaryAxisTitle ?? ''}
|
|
1549
|
+
.secondaryAxisMin=${config.secondaryAxisMin ?? null}
|
|
1550
|
+
.timezone=${config.timezone ?? ''}
|
|
1551
|
+
.showLegend=${config.legend?.show ?? true}
|
|
1552
|
+
.legend=${config.legend ?? null}
|
|
1553
|
+
.options=${mergedOptions}
|
|
1554
|
+
.loading=${config.loading ?? false}
|
|
1555
|
+
.chartBg=${config.chartBg ?? ''}
|
|
1556
|
+
.chartBorderRadius=${config.chartBorderRadius ?? ''}
|
|
1557
|
+
.chartBorder=${config.chartBorder ?? ''}
|
|
1558
|
+
.chartShadow=${config.chartShadow ?? ''}
|
|
1559
|
+
.chartPadding=${config.chartPadding ?? ''}
|
|
1560
|
+
.chartMinHeight=${config.chartMinHeight ?? ''}
|
|
1561
|
+
.loadingText=${config.loadingText ?? 'Loading...'}
|
|
1562
|
+
.loadingColor=${config.loadingColor ?? ''}
|
|
1563
|
+
.loadingFontSize=${config.loadingFontSize ?? ''}
|
|
1564
|
+
.loadingFontFamily=${config.loadingFontFamily ?? ''}
|
|
1565
|
+
.loadingBg=${config.loadingBg ?? ''}
|
|
1566
|
+
></nile-forecast-chart>`;
|
|
1509
1567
|
case 'funnel':
|
|
1510
1568
|
return html `<nile-funnel-chart
|
|
1511
1569
|
.data=${config.data}
|
|
@@ -2212,9 +2270,15 @@ __decorate([
|
|
|
2212
2270
|
__decorate([
|
|
2213
2271
|
query('nile-master-detail-chart')
|
|
2214
2272
|
], NileChart.prototype, "masterDetailChart", void 0);
|
|
2273
|
+
__decorate([
|
|
2274
|
+
query('nile-forecast-chart')
|
|
2275
|
+
], NileChart.prototype, "forecastChart", void 0);
|
|
2215
2276
|
__decorate([
|
|
2216
2277
|
state()
|
|
2217
2278
|
], NileChart.prototype, "masterZoomed", void 0);
|
|
2279
|
+
__decorate([
|
|
2280
|
+
state()
|
|
2281
|
+
], NileChart.prototype, "forecastZoomed", void 0);
|
|
2218
2282
|
NileChart = NileChart_1 = __decorate([
|
|
2219
2283
|
customElement('nile-chart')
|
|
2220
2284
|
], NileChart);
|
|
@@ -29,6 +29,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
|
|
|
29
29
|
/** Id of the prompt control whose input currently has focus (drives the
|
|
30
30
|
* nile-dropdown panel open state). null when no prompt is focused. */
|
|
31
31
|
promptFocusedId: string | null;
|
|
32
|
+
promptPickedIds: Set<string>;
|
|
32
33
|
/** Pixel width of each prompt control's bordered field — kept in sync with
|
|
33
34
|
* the rendered `.fc-prompt__field` via a ResizeObserver attached in
|
|
34
35
|
* prompt.ts. Consumed by the suggestion tooltip so its popup matches the
|
|
@@ -75,6 +76,7 @@ export declare class NileFilterChart extends NileElement implements FilterChartH
|
|
|
75
76
|
*/
|
|
76
77
|
submitPrompt(ctrl: NormalizedFilterControl): void;
|
|
77
78
|
setPromptActiveIndex(id: string, idx: number): void;
|
|
79
|
+
setPromptPicked(id: string, picked: boolean): void;
|
|
78
80
|
setPromptFocused(id: string, focused: boolean): void;
|
|
79
81
|
setPromptFieldWidth(id: string, width: number): void;
|
|
80
82
|
private _validateOrClear;
|
|
@@ -46,6 +46,7 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
|
|
|
46
46
|
/** Id of the prompt control whose input currently has focus (drives the
|
|
47
47
|
* nile-dropdown panel open state). null when no prompt is focused. */
|
|
48
48
|
this.promptFocusedId = null;
|
|
49
|
+
this.promptPickedIds = new Set();
|
|
49
50
|
/** Pixel width of each prompt control's bordered field — kept in sync with
|
|
50
51
|
* the rendered `.fc-prompt__field` via a ResizeObserver attached in
|
|
51
52
|
* prompt.ts. Consumed by the suggestion tooltip so its popup matches the
|
|
@@ -155,6 +156,16 @@ let NileFilterChart = NileFilterChart_1 = class NileFilterChart extends NileElem
|
|
|
155
156
|
setPromptActiveIndex(id, idx) {
|
|
156
157
|
this.promptActiveIndex = new Map(this.promptActiveIndex).set(id, idx);
|
|
157
158
|
}
|
|
159
|
+
setPromptPicked(id, picked) {
|
|
160
|
+
if (this.promptPickedIds.has(id) === picked)
|
|
161
|
+
return;
|
|
162
|
+
const next = new Set(this.promptPickedIds);
|
|
163
|
+
if (picked)
|
|
164
|
+
next.add(id);
|
|
165
|
+
else
|
|
166
|
+
next.delete(id);
|
|
167
|
+
this.promptPickedIds = next;
|
|
168
|
+
}
|
|
158
169
|
setPromptFocused(id, focused) {
|
|
159
170
|
if (focused) {
|
|
160
171
|
this.promptFocusedId = id;
|
|
@@ -653,6 +664,9 @@ __decorate([
|
|
|
653
664
|
__decorate([
|
|
654
665
|
state()
|
|
655
666
|
], NileFilterChart.prototype, "promptFocusedId", void 0);
|
|
667
|
+
__decorate([
|
|
668
|
+
state()
|
|
669
|
+
], NileFilterChart.prototype, "promptPickedIds", void 0);
|
|
656
670
|
__decorate([
|
|
657
671
|
state()
|
|
658
672
|
], NileFilterChart.prototype, "promptFieldWidth", void 0);
|