@oliasoft-open-source/charts-library 5.10.0-beta-4 → 5.10.0
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 +98 -67
- package/dist/index.js +876 -848
- 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
|
+
lineMarkersAnnotation?: ILineMarkersAnnotation;
|
|
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
|
+
lineMarkersPlugin?: {
|
|
487
487
|
enabled?: boolean;
|
|
488
488
|
};
|
|
489
489
|
};
|
|
@@ -771,6 +771,8 @@ export declare interface ILineLegend extends ICommonLegend {
|
|
|
771
771
|
usePointStyle?: boolean;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
export declare type ILineMarkersAnnotation = TLineMarkersOptions;
|
|
775
|
+
|
|
774
776
|
export declare interface ILineRange {
|
|
775
777
|
[key: string]: ILineChartRange;
|
|
776
778
|
}
|
|
@@ -1002,14 +1004,36 @@ export declare interface IUnitOptions {
|
|
|
1002
1004
|
setSelectedUnit: () => void;
|
|
1003
1005
|
}
|
|
1004
1006
|
|
|
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
|
+
|
|
1013
1037
|
export declare enum PanZoomMode {
|
|
1014
1038
|
X = "x",
|
|
1015
1039
|
Y = "y",
|
|
@@ -1059,58 +1083,109 @@ export declare type TGeneratedPieChartDatasets = IGeneratedPieChartDataset[];
|
|
|
1059
1083
|
|
|
1060
1084
|
export declare type TGeneratedScatterChartDatasets = IGeneratedScatterChartDataset[];
|
|
1061
1085
|
|
|
1062
|
-
export declare
|
|
1063
|
-
Y = "yLabel",
|
|
1064
|
-
X = "xLabel"
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
export declare type TPrimitive = string | number | boolean | null;
|
|
1086
|
+
export declare type TLineMarkerDirection = LineMarkerDirection;
|
|
1068
1087
|
|
|
1069
|
-
export declare type
|
|
1070
|
-
|
|
1071
|
-
export declare type TVerticalMarkerItem = {
|
|
1088
|
+
export declare type TLineMarkerItem = {
|
|
1072
1089
|
id?: string;
|
|
1090
|
+
direction?: TLineMarkerDirection;
|
|
1073
1091
|
xScaleID?: string;
|
|
1074
1092
|
yScaleID?: string;
|
|
1075
1093
|
xValue?: number;
|
|
1094
|
+
yValue?: number;
|
|
1076
1095
|
yStartValue?: number;
|
|
1096
|
+
yEndValue?: number;
|
|
1097
|
+
xStartValue?: number;
|
|
1098
|
+
xEndValue?: number;
|
|
1099
|
+
lengthPx?: number;
|
|
1077
1100
|
value?: number;
|
|
1078
1101
|
label?: string | string[];
|
|
1079
1102
|
font?: string;
|
|
1080
1103
|
labelOffsetPx?: number;
|
|
1081
1104
|
stickToEdge?: boolean;
|
|
1105
|
+
stickToGroup?: boolean;
|
|
1082
1106
|
stickSide?: TStickSide;
|
|
1107
|
+
groupOffsetPx?: number;
|
|
1083
1108
|
reverse?: boolean;
|
|
1084
1109
|
color?: string;
|
|
1085
1110
|
opacity?: number;
|
|
1086
1111
|
lineWidth?: number;
|
|
1087
1112
|
lineDash?: number[];
|
|
1113
|
+
startTick?: TLineMarkerTick;
|
|
1114
|
+
endTick?: TLineMarkerTick;
|
|
1115
|
+
extras?: TMarkerExtraItem[];
|
|
1088
1116
|
display?: boolean;
|
|
1089
1117
|
};
|
|
1090
1118
|
|
|
1091
|
-
export declare type
|
|
1119
|
+
export declare type TLineMarkerLabelPosition = LineMarkerLabelPosition;
|
|
1120
|
+
|
|
1121
|
+
export declare type TLineMarkersOptions = {
|
|
1092
1122
|
enabled?: boolean;
|
|
1093
1123
|
itemGapPx?: number;
|
|
1094
1124
|
edgePaddingPx?: number;
|
|
1125
|
+
horizontalLineLengthPx?: number;
|
|
1126
|
+
lineDirection?: TLineMarkerDirection;
|
|
1127
|
+
labelCollisionPx?: number;
|
|
1128
|
+
labelCollisionClusterXPx?: number;
|
|
1129
|
+
enableLabelCollisionResolver?: boolean;
|
|
1095
1130
|
stickToEdge?: boolean;
|
|
1131
|
+
stickToGroup?: boolean;
|
|
1096
1132
|
stickSide?: TStickSide;
|
|
1097
1133
|
reverse?: boolean;
|
|
1098
1134
|
xValue?: number;
|
|
1135
|
+
yValue?: number;
|
|
1136
|
+
yEndValue?: number;
|
|
1137
|
+
xStartValue?: number;
|
|
1138
|
+
xEndValue?: number;
|
|
1139
|
+
lengthPx?: number;
|
|
1099
1140
|
yStartValue?: number;
|
|
1100
1141
|
color?: string;
|
|
1101
1142
|
opacity?: number;
|
|
1102
1143
|
lineWidth?: number;
|
|
1103
1144
|
lineDash?: number[];
|
|
1104
|
-
|
|
1145
|
+
startTick?: TLineMarkerTick;
|
|
1146
|
+
endTick?: TLineMarkerTick;
|
|
1147
|
+
items?: TLineMarkerItem[];
|
|
1105
1148
|
};
|
|
1106
1149
|
|
|
1107
|
-
export declare type
|
|
1150
|
+
export declare type TLineMarkerTextAlign = LineMarkerTextAlign;
|
|
1151
|
+
|
|
1152
|
+
export declare type TLineMarkerTick = {
|
|
1153
|
+
enabled?: boolean;
|
|
1108
1154
|
label?: string | string[];
|
|
1109
1155
|
color?: string;
|
|
1110
1156
|
font?: string;
|
|
1111
1157
|
labelOffsetPx?: number;
|
|
1158
|
+
labelPosition?: TLineMarkerLabelPosition;
|
|
1159
|
+
side?: TStickSide;
|
|
1160
|
+
reverse?: boolean;
|
|
1161
|
+
sizePx?: number;
|
|
1112
1162
|
};
|
|
1113
1163
|
|
|
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
|
+
|
|
1114
1189
|
export declare type UnusedParameter = unknown;
|
|
1115
1190
|
|
|
1116
1191
|
export { }
|
|
@@ -1118,68 +1193,24 @@ export { }
|
|
|
1118
1193
|
|
|
1119
1194
|
declare module 'chart.js' {
|
|
1120
1195
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1121
|
-
|
|
1196
|
+
calloutConnectorPlugin?: {
|
|
1197
|
+
enableCalloutAnnotation?: boolean;
|
|
1198
|
+
};
|
|
1122
1199
|
}
|
|
1123
1200
|
}
|
|
1124
1201
|
|
|
1125
1202
|
|
|
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
|
-
*/
|
|
1170
1203
|
declare module 'chart.js' {
|
|
1171
1204
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1172
|
-
|
|
1173
|
-
enabled?: boolean;
|
|
1174
|
-
} | TVerticalMarkersOptions;
|
|
1205
|
+
annotationDraggerPlugin?: AnnotationDraggerPluginOptions;
|
|
1175
1206
|
}
|
|
1176
1207
|
}
|
|
1177
1208
|
|
|
1178
1209
|
|
|
1179
1210
|
declare module 'chart.js' {
|
|
1180
1211
|
interface PluginOptionsByType<TType extends ChartType> {
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
};
|
|
1212
|
+
lineMarkersPlugin?: {
|
|
1213
|
+
enabled?: boolean;
|
|
1214
|
+
} | TLineMarkersOptions;
|
|
1184
1215
|
}
|
|
1185
1216
|
}
|