tsichart-core 2.1.6 → 2.1.7
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/dist/index.d.ts +78 -35
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,8 +21,71 @@ declare class Strings {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
interface HorizontalMarker {
|
|
24
|
-
color: string;
|
|
25
24
|
value: number;
|
|
25
|
+
color: string;
|
|
26
|
+
condition?: 'Greater Than' | 'Less Than';
|
|
27
|
+
opacity?: number;
|
|
28
|
+
label?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Configuration options for the LineChart component.
|
|
33
|
+
*
|
|
34
|
+
* Provides type safety for LineChart-specific configuration with all properties being optional.
|
|
35
|
+
* Based on ChartOptions class, allowing partial configuration where defaults are applied internally.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* This type includes all properties from ChartOptions as optional fields:
|
|
39
|
+
* - **Appearance**: theme, color, legend, tooltip, grid, isArea, interpolationFunction
|
|
40
|
+
* - **Axis Configuration**: xAxisHidden, yAxisHidden, yAxisState, yExtent, aggTopMargin
|
|
41
|
+
* - **Brush Settings**: brushMoveAction, brushMoveEndAction, brushContextMenuActions, brushHandlesVisible,
|
|
42
|
+
* brushRangeVisible, snapBrush, minBrushWidth, keepBrush, brushClearable, autoTriggerBrushContextMenu
|
|
43
|
+
* - **Interaction**: focusHidden, onMouseover, onMouseout, onSticky, onUnsticky, shouldSticky
|
|
44
|
+
* - **Markers**: markers, onMarkersChange, labelSeriesWithMarker
|
|
45
|
+
* - **Swim Lanes**: swimLaneOptions (for stacked charts with multiple y-axes)
|
|
46
|
+
* - **Time Configuration**: timeFrame, offset, is24HourTime, dateLocale, xAxisTimeFormat
|
|
47
|
+
* - **UI Controls**: hideChartControlPanel, suppressResizeListener
|
|
48
|
+
* - **Data Display**: includeEnvelope, includeDots
|
|
49
|
+
* - **Styling**: strings (for i18n), noAnimate
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const lineChartOptions: ILineChartOptions = {
|
|
54
|
+
* theme: 'dark',
|
|
55
|
+
* legend: 'shown',
|
|
56
|
+
* yAxisState: 'stacked',
|
|
57
|
+
* brushHandlesVisible: true,
|
|
58
|
+
* interpolationFunction: 'curveMonotoneX',
|
|
59
|
+
* labelSeriesWithMarker: true
|
|
60
|
+
* };
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
interface BackgroundBand {
|
|
64
|
+
y0: number;
|
|
65
|
+
y1: number;
|
|
66
|
+
color: string;
|
|
67
|
+
opacity?: number;
|
|
68
|
+
label?: string;
|
|
69
|
+
}
|
|
70
|
+
type ILineChartOptions = Partial<Omit<ChartOptions, 'onSelect' | 'onInput' | 'onKeydown' | 'onInstanceClick' | 'hierarchyOptions' | 'withContextMenu' | 'timeSeriesIdProperties' | 'isTemporal' | 'spMeasures' | 'scatterPlotRadius' | 'spAxisLabels'>> & {
|
|
71
|
+
backgroundBands?: BackgroundBand[];
|
|
72
|
+
horizontalMarkers?: HorizontalMarker[];
|
|
73
|
+
swimLaneOptions?: {
|
|
74
|
+
[laneIdx: number]: {
|
|
75
|
+
showBackgroundBands?: boolean;
|
|
76
|
+
backgroundBands?: BackgroundBand[];
|
|
77
|
+
horizontalMarkers?: HorizontalMarker[];
|
|
78
|
+
backgroundBandCondition?: BackgroundBandCondition;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
interface BackgroundBandCondition {
|
|
84
|
+
condition: 'Greater Than' | 'Less Than';
|
|
85
|
+
thresholdValue: number;
|
|
86
|
+
color: string;
|
|
87
|
+
opacity?: number;
|
|
88
|
+
label?: string;
|
|
26
89
|
}
|
|
27
90
|
|
|
28
91
|
interface swimLaneOption {
|
|
@@ -31,6 +94,9 @@ interface swimLaneOption {
|
|
|
31
94
|
onClick?: (lane: number) => any;
|
|
32
95
|
collapseEvents?: string;
|
|
33
96
|
horizontalMarkers?: Array<HorizontalMarker>;
|
|
97
|
+
showBackgroundBands?: boolean;
|
|
98
|
+
backgroundBands?: BackgroundBand[];
|
|
99
|
+
backgroundBandCondition?: BackgroundBandCondition;
|
|
34
100
|
}
|
|
35
101
|
declare class ChartOptions {
|
|
36
102
|
aggTopMargin: number;
|
|
@@ -441,40 +507,6 @@ declare class LineChartData extends ChartComponentData {
|
|
|
441
507
|
mergeDataToDisplayStateAndTimeArrays(data: any, aggregateExpressionOptions?: any): void;
|
|
442
508
|
}
|
|
443
509
|
|
|
444
|
-
/**
|
|
445
|
-
* Configuration options for the LineChart component.
|
|
446
|
-
*
|
|
447
|
-
* Provides type safety for LineChart-specific configuration with all properties being optional.
|
|
448
|
-
* Based on ChartOptions class, allowing partial configuration where defaults are applied internally.
|
|
449
|
-
*
|
|
450
|
-
* @remarks
|
|
451
|
-
* This type includes all properties from ChartOptions as optional fields:
|
|
452
|
-
* - **Appearance**: theme, color, legend, tooltip, grid, isArea, interpolationFunction
|
|
453
|
-
* - **Axis Configuration**: xAxisHidden, yAxisHidden, yAxisState, yExtent, aggTopMargin
|
|
454
|
-
* - **Brush Settings**: brushMoveAction, brushMoveEndAction, brushContextMenuActions, brushHandlesVisible,
|
|
455
|
-
* brushRangeVisible, snapBrush, minBrushWidth, keepBrush, brushClearable, autoTriggerBrushContextMenu
|
|
456
|
-
* - **Interaction**: focusHidden, onMouseover, onMouseout, onSticky, onUnsticky, shouldSticky
|
|
457
|
-
* - **Markers**: markers, onMarkersChange, labelSeriesWithMarker
|
|
458
|
-
* - **Swim Lanes**: swimLaneOptions (for stacked charts with multiple y-axes)
|
|
459
|
-
* - **Time Configuration**: timeFrame, offset, is24HourTime, dateLocale, xAxisTimeFormat
|
|
460
|
-
* - **UI Controls**: hideChartControlPanel, suppressResizeListener
|
|
461
|
-
* - **Data Display**: includeEnvelope, includeDots
|
|
462
|
-
* - **Styling**: strings (for i18n), noAnimate
|
|
463
|
-
*
|
|
464
|
-
* @example
|
|
465
|
-
* ```typescript
|
|
466
|
-
* const lineChartOptions: ILineChartOptions = {
|
|
467
|
-
* theme: 'dark',
|
|
468
|
-
* legend: 'shown',
|
|
469
|
-
* yAxisState: 'stacked',
|
|
470
|
-
* brushHandlesVisible: true,
|
|
471
|
-
* interpolationFunction: 'curveMonotoneX',
|
|
472
|
-
* labelSeriesWithMarker: true
|
|
473
|
-
* };
|
|
474
|
-
* ```
|
|
475
|
-
*/
|
|
476
|
-
type ILineChartOptions = Partial<Omit<ChartOptions, 'onSelect' | 'onInput' | 'onKeydown' | 'onInstanceClick' | 'hierarchyOptions' | 'withContextMenu' | 'timeSeriesIdProperties' | 'isTemporal' | 'spMeasures' | 'scatterPlotRadius' | 'spAxisLabels'>>;
|
|
477
|
-
|
|
478
510
|
declare class LineChart extends TemporalXAxisComponent {
|
|
479
511
|
private targetElement;
|
|
480
512
|
private focus;
|
|
@@ -537,6 +569,16 @@ declare class LineChart extends TemporalXAxisComponent {
|
|
|
537
569
|
private _playbackMarker;
|
|
538
570
|
constructor(renderTarget: Element);
|
|
539
571
|
LineChart(): void;
|
|
572
|
+
/**
|
|
573
|
+
* Render colored horizontal background bands behind chart data, strictly between horizontal marker values.
|
|
574
|
+
* @param bands Array of BackgroundBand objects
|
|
575
|
+
* @param markers Array of horizontal marker objects (must be sorted by value ascending)
|
|
576
|
+
*/
|
|
577
|
+
private ensureBackgroundBandsGroup;
|
|
578
|
+
private createAutoBandsFromMarkers;
|
|
579
|
+
private createBandFromCondition;
|
|
580
|
+
private drawBackgroundBands;
|
|
581
|
+
private renderSwimLaneBackgroundBands;
|
|
540
582
|
getBrushPositions(): {
|
|
541
583
|
leftPos: any;
|
|
542
584
|
rightPos: any;
|
|
@@ -592,6 +634,7 @@ declare class LineChart extends TemporalXAxisComponent {
|
|
|
592
634
|
private filteredValueExist;
|
|
593
635
|
addMarker: () => void;
|
|
594
636
|
private voronoiExists;
|
|
637
|
+
private focusVoronoiSite;
|
|
595
638
|
private voronoiMousemove;
|
|
596
639
|
private voronoiContextMenu;
|
|
597
640
|
private voronoiClick;
|