@oliasoft-open-source/charts-library 5.10.0-beta-3 → 5.10.0-beta-4
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 +66 -97
- package/dist/index.js +848 -876
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -329,7 +329,7 @@ export declare interface ICommonAnnotations {
|
|
|
329
329
|
controlAnnotation?: boolean;
|
|
330
330
|
enableDragAnnotation?: boolean;
|
|
331
331
|
enableCalloutAnnotation?: boolean;
|
|
332
|
-
|
|
332
|
+
verticalMarkersAnnotation?: IVerticalMarkersAnnotation;
|
|
333
333
|
annotationsData?: ICommonAnnotationsData[];
|
|
334
334
|
labelAnnotation?: ICommonAnnotation;
|
|
335
335
|
}
|
|
@@ -483,7 +483,7 @@ export declare interface ICommonOptions {
|
|
|
483
483
|
dragData?: ICommonDragData;
|
|
484
484
|
annotations?: ICommonAnnotations;
|
|
485
485
|
plugins?: {
|
|
486
|
-
|
|
486
|
+
verticalMarkersPlugin?: {
|
|
487
487
|
enabled?: boolean;
|
|
488
488
|
};
|
|
489
489
|
};
|
|
@@ -771,8 +771,6 @@ export declare interface ILineLegend extends ICommonLegend {
|
|
|
771
771
|
usePointStyle?: boolean;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
export declare type ILineMarkersAnnotation = TLineMarkersOptions;
|
|
775
|
-
|
|
776
774
|
export declare interface ILineRange {
|
|
777
775
|
[key: string]: ILineChartRange;
|
|
778
776
|
}
|
|
@@ -1004,36 +1002,14 @@ export declare interface IUnitOptions {
|
|
|
1004
1002
|
setSelectedUnit: () => void;
|
|
1005
1003
|
}
|
|
1006
1004
|
|
|
1005
|
+
export declare type IVerticalMarkersAnnotation = TVerticalMarkersOptions;
|
|
1006
|
+
|
|
1007
1007
|
export declare enum Key {
|
|
1008
1008
|
Shift = "Shift"
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
1011
|
export declare const LineChart: (props: ILineChartProps) => JSX_2.Element;
|
|
1012
1012
|
|
|
1013
|
-
export declare enum LineMarkerDirection {
|
|
1014
|
-
Vertical = "vertical",
|
|
1015
|
-
Horizontal = "horizontal"
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
export declare enum LineMarkerLabelPosition {
|
|
1019
|
-
Left = "left",
|
|
1020
|
-
Right = "right",
|
|
1021
|
-
Top = "top",
|
|
1022
|
-
Bottom = "bottom",
|
|
1023
|
-
OnLine = "onLine"
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
export declare enum LineMarkerSide {
|
|
1027
|
-
Left = "left",
|
|
1028
|
-
Right = "right"
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export declare enum LineMarkerTextAlign {
|
|
1032
|
-
Left = "left",
|
|
1033
|
-
Right = "right",
|
|
1034
|
-
Center = "center"
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
1013
|
export declare enum PanZoomMode {
|
|
1038
1014
|
X = "x",
|
|
1039
1015
|
Y = "y",
|
|
@@ -1083,109 +1059,58 @@ export declare type TGeneratedPieChartDatasets = IGeneratedPieChartDataset[];
|
|
|
1083
1059
|
|
|
1084
1060
|
export declare type TGeneratedScatterChartDatasets = IGeneratedScatterChartDataset[];
|
|
1085
1061
|
|
|
1086
|
-
export declare
|
|
1062
|
+
export declare enum TooltipLabel {
|
|
1063
|
+
Y = "yLabel",
|
|
1064
|
+
X = "xLabel"
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export declare type TPrimitive = string | number | boolean | null;
|
|
1068
|
+
|
|
1069
|
+
export declare type TStickSide = 'left' | 'right';
|
|
1087
1070
|
|
|
1088
|
-
export declare type
|
|
1071
|
+
export declare type TVerticalMarkerItem = {
|
|
1089
1072
|
id?: string;
|
|
1090
|
-
direction?: TLineMarkerDirection;
|
|
1091
1073
|
xScaleID?: string;
|
|
1092
1074
|
yScaleID?: string;
|
|
1093
1075
|
xValue?: number;
|
|
1094
|
-
yValue?: number;
|
|
1095
1076
|
yStartValue?: number;
|
|
1096
|
-
yEndValue?: number;
|
|
1097
|
-
xStartValue?: number;
|
|
1098
|
-
xEndValue?: number;
|
|
1099
|
-
lengthPx?: number;
|
|
1100
1077
|
value?: number;
|
|
1101
1078
|
label?: string | string[];
|
|
1102
1079
|
font?: string;
|
|
1103
1080
|
labelOffsetPx?: number;
|
|
1104
1081
|
stickToEdge?: boolean;
|
|
1105
|
-
stickToGroup?: boolean;
|
|
1106
1082
|
stickSide?: TStickSide;
|
|
1107
|
-
groupOffsetPx?: number;
|
|
1108
1083
|
reverse?: boolean;
|
|
1109
1084
|
color?: string;
|
|
1110
1085
|
opacity?: number;
|
|
1111
1086
|
lineWidth?: number;
|
|
1112
1087
|
lineDash?: number[];
|
|
1113
|
-
startTick?: TLineMarkerTick;
|
|
1114
|
-
endTick?: TLineMarkerTick;
|
|
1115
|
-
extras?: TMarkerExtraItem[];
|
|
1116
1088
|
display?: boolean;
|
|
1117
1089
|
};
|
|
1118
1090
|
|
|
1119
|
-
export declare type
|
|
1120
|
-
|
|
1121
|
-
export declare type TLineMarkersOptions = {
|
|
1091
|
+
export declare type TVerticalMarkersOptions = {
|
|
1122
1092
|
enabled?: boolean;
|
|
1123
1093
|
itemGapPx?: number;
|
|
1124
1094
|
edgePaddingPx?: number;
|
|
1125
|
-
horizontalLineLengthPx?: number;
|
|
1126
|
-
lineDirection?: TLineMarkerDirection;
|
|
1127
|
-
labelCollisionPx?: number;
|
|
1128
|
-
labelCollisionClusterXPx?: number;
|
|
1129
|
-
enableLabelCollisionResolver?: boolean;
|
|
1130
1095
|
stickToEdge?: boolean;
|
|
1131
|
-
stickToGroup?: boolean;
|
|
1132
1096
|
stickSide?: TStickSide;
|
|
1133
1097
|
reverse?: boolean;
|
|
1134
1098
|
xValue?: number;
|
|
1135
|
-
yValue?: number;
|
|
1136
|
-
yEndValue?: number;
|
|
1137
|
-
xStartValue?: number;
|
|
1138
|
-
xEndValue?: number;
|
|
1139
|
-
lengthPx?: number;
|
|
1140
1099
|
yStartValue?: number;
|
|
1141
1100
|
color?: string;
|
|
1142
1101
|
opacity?: number;
|
|
1143
1102
|
lineWidth?: number;
|
|
1144
1103
|
lineDash?: number[];
|
|
1145
|
-
|
|
1146
|
-
endTick?: TLineMarkerTick;
|
|
1147
|
-
items?: TLineMarkerItem[];
|
|
1104
|
+
items?: TVerticalMarkerItem[];
|
|
1148
1105
|
};
|
|
1149
1106
|
|
|
1150
|
-
export declare type
|
|
1151
|
-
|
|
1152
|
-
export declare type TLineMarkerTick = {
|
|
1153
|
-
enabled?: boolean;
|
|
1107
|
+
export declare type TVerticalMarkerTick = {
|
|
1154
1108
|
label?: string | string[];
|
|
1155
1109
|
color?: string;
|
|
1156
1110
|
font?: string;
|
|
1157
1111
|
labelOffsetPx?: number;
|
|
1158
|
-
labelPosition?: TLineMarkerLabelPosition;
|
|
1159
|
-
side?: TStickSide;
|
|
1160
|
-
reverse?: boolean;
|
|
1161
|
-
sizePx?: number;
|
|
1162
1112
|
};
|
|
1163
1113
|
|
|
1164
|
-
export declare type TMarkerExtraItem = {
|
|
1165
|
-
id?: string;
|
|
1166
|
-
display?: boolean;
|
|
1167
|
-
yScaleID?: string;
|
|
1168
|
-
yValue?: number;
|
|
1169
|
-
value?: number;
|
|
1170
|
-
lengthPx?: number;
|
|
1171
|
-
side?: TStickSide;
|
|
1172
|
-
reverse?: boolean;
|
|
1173
|
-
color?: string;
|
|
1174
|
-
opacity?: number;
|
|
1175
|
-
lineWidth?: number;
|
|
1176
|
-
lineDash?: number[];
|
|
1177
|
-
tick?: TLineMarkerTick;
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
export declare enum TooltipLabel {
|
|
1181
|
-
Y = "yLabel",
|
|
1182
|
-
X = "xLabel"
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
export declare type TPrimitive = string | number | boolean | null;
|
|
1186
|
-
|
|
1187
|
-
export declare type TStickSide = LineMarkerSide;
|
|
1188
|
-
|
|
1189
1114
|
export declare type UnusedParameter = unknown;
|
|
1190
1115
|
|
|
1191
1116
|
export { }
|
|
@@ -1198,19 +1123,63 @@ declare module 'chart.js' {
|
|
|
1198
1123
|
}
|
|
1199
1124
|
|
|
1200
1125
|
|
|
1126
|
+
/**
|
|
1127
|
+
* Vertical Markers Plugin
|
|
1128
|
+
*
|
|
1129
|
+
* This plugin draws vertical helper lines on top of the chart.
|
|
1130
|
+
* with a small triangle end cap ("boot") and a text label.
|
|
1131
|
+
*
|
|
1132
|
+
* Where to configure:
|
|
1133
|
+
* - Enable switch: options.plugins.verticalMarkersPlugin.enabled
|
|
1134
|
+
* - Data and style: options.annotations.verticalMarkersAnnotation
|
|
1135
|
+
*
|
|
1136
|
+
* Global props (verticalMarkersAnnotation):
|
|
1137
|
+
* - enabled: Turn markers on or off.
|
|
1138
|
+
* - items: List of marker objects to draw.
|
|
1139
|
+
* - itemGapPx: Space in pixels between marker lines.
|
|
1140
|
+
* - edgePaddingPx: Distance from chart left/right edge when sticky mode is used.
|
|
1141
|
+
* - stickToEdge: If true, use chart edge as base X position.
|
|
1142
|
+
* - stickSide: Which edge to use in sticky mode: 'left' or 'right'.
|
|
1143
|
+
* - xValue: Optional base X value from the X scale (used instead of edge).
|
|
1144
|
+
* - yStartValue: Optional start Y value for all lines (if not set, start from top;
|
|
1145
|
+
* if reverse is true, start from bottom).
|
|
1146
|
+
* - reverse: If true, lines go from bottom to top. If false, top to bottom.
|
|
1147
|
+
* - color: Default line and triangle color.
|
|
1148
|
+
* - opacity: Default line opacity.
|
|
1149
|
+
* - lineWidth: Default line width.
|
|
1150
|
+
* - lineDash: Default dash pattern for lines.
|
|
1151
|
+
*
|
|
1152
|
+
* Item props (each object in items):
|
|
1153
|
+
* - value: Required Y value where the marker line ends and triangle is placed.
|
|
1154
|
+
* - label: Optional text near the triangle.
|
|
1155
|
+
* - display: Show or hide this item.
|
|
1156
|
+
* - stickToEdge: Per-item override of global stickToEdge.
|
|
1157
|
+
* - stickSide: Per-item override of global stickSide.
|
|
1158
|
+
* - xValue: Per-item override of global xValue.
|
|
1159
|
+
* - yStartValue: Per-item override of global yStartValue.
|
|
1160
|
+
* - reverse: Per-item override of global reverse.
|
|
1161
|
+
* - color: Per-item override of global color.
|
|
1162
|
+
* - opacity: Per-item override of global opacity.
|
|
1163
|
+
* - lineWidth: Per-item override of global lineWidth.
|
|
1164
|
+
* - lineDash: Per-item override of global lineDash.
|
|
1165
|
+
* - font: Optional label font.
|
|
1166
|
+
* - labelOffsetPx: Optional label offset in pixels.
|
|
1167
|
+
* - xScaleID: Optional custom X scale id for xValue conversion.
|
|
1168
|
+
* - yScaleID: Optional custom Y scale id for value conversion.
|
|
1169
|
+
*/
|
|
1201
1170
|
declare module 'chart.js' {
|
|
1202
1171
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
};
|
|
1172
|
+
verticalMarkersPlugin?: {
|
|
1173
|
+
enabled?: boolean;
|
|
1174
|
+
} | TVerticalMarkersOptions;
|
|
1206
1175
|
}
|
|
1207
1176
|
}
|
|
1208
1177
|
|
|
1209
1178
|
|
|
1210
1179
|
declare module 'chart.js' {
|
|
1211
1180
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1181
|
+
calloutConnectorPlugin?: {
|
|
1182
|
+
enableCalloutAnnotation?: boolean;
|
|
1183
|
+
};
|
|
1215
1184
|
}
|
|
1216
1185
|
}
|