realchart 0.9.9 → 0.9.11
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 +89 -23
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/realchart-style.css +56 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,13 @@ declare enum SectionDir {
|
|
|
28
28
|
LEFT = "left",
|
|
29
29
|
TOP = "top",
|
|
30
30
|
BOTTOM = "bottom",
|
|
31
|
-
RIGHT = "right"
|
|
31
|
+
RIGHT = "right",
|
|
32
|
+
CENTER = "center",
|
|
33
|
+
MIDDLE = "middle"
|
|
34
|
+
}
|
|
35
|
+
declare enum AlignBase {
|
|
36
|
+
CHART = "chart",
|
|
37
|
+
PLOT = "plot"
|
|
32
38
|
}
|
|
33
39
|
interface IValueRange {
|
|
34
40
|
fromValue?: number;
|
|
@@ -140,6 +146,8 @@ declare abstract class RcControl extends RcWrappableObject {
|
|
|
140
146
|
addDef(element: Element): void;
|
|
141
147
|
removeDef(element: Element | string): void;
|
|
142
148
|
containerToElement(element: RcElement, x: number, y: number): IPoint;
|
|
149
|
+
svgToElement(element: RcElement, x: number, y: number): IPoint;
|
|
150
|
+
elementToSvg(element: RcElement, x: number, y: number): IPoint;
|
|
143
151
|
abstract useImage(src: string): void;
|
|
144
152
|
protected _setTesting(): void;
|
|
145
153
|
protected _setSize(w: number, h: number): void;
|
|
@@ -240,6 +248,8 @@ declare class RcElement extends RcObject {
|
|
|
240
248
|
getSize(): ISize;
|
|
241
249
|
getBBounds(): IRect;
|
|
242
250
|
controlToElement(x: number, y: number): IPoint;
|
|
251
|
+
svgToElement(x: number, y: number): IPoint;
|
|
252
|
+
elementToSvg(x: number, y: number): IPoint;
|
|
243
253
|
move(x: number, y: number): RcElement;
|
|
244
254
|
movep(p: IPoint): RcElement;
|
|
245
255
|
isDomAnimating(): boolean;
|
|
@@ -408,6 +418,7 @@ declare class ChartItem extends RcObject {
|
|
|
408
418
|
protected _doLoadProp(prop: string, value: any): boolean;
|
|
409
419
|
protected _doSave(target: object): void;
|
|
410
420
|
protected _doPrepareRender(chart: IChart): void;
|
|
421
|
+
protected _loadStroke(source: any): boolean;
|
|
411
422
|
}
|
|
412
423
|
declare enum ChartTextEffect {
|
|
413
424
|
NONE = "none",
|
|
@@ -491,7 +502,7 @@ declare class DataPoint {
|
|
|
491
502
|
get xAbs(): number;
|
|
492
503
|
ariaHint(): string;
|
|
493
504
|
labelCount(): number;
|
|
494
|
-
assignTo(proxy
|
|
505
|
+
assignTo(proxy?: any): any;
|
|
495
506
|
getProp(fld: string | number): any;
|
|
496
507
|
parse(series: ISeries): void;
|
|
497
508
|
getLabel(index: number): any;
|
|
@@ -514,6 +525,7 @@ declare class DataPointCollection {
|
|
|
514
525
|
load(source: any): void;
|
|
515
526
|
getProps(prop: string | number): any[];
|
|
516
527
|
getValues(axis: string): any[];
|
|
528
|
+
getProxies(): any[];
|
|
517
529
|
forEach(callback: (p: DataPoint, i?: number) => any): void;
|
|
518
530
|
getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
|
|
519
531
|
}
|
|
@@ -567,6 +579,7 @@ interface IPlottingItem {
|
|
|
567
579
|
xAxis: string | number;
|
|
568
580
|
yAxis: string | number;
|
|
569
581
|
visible: boolean;
|
|
582
|
+
isSide(): boolean;
|
|
570
583
|
getVisiblePoints(): DataPoint[];
|
|
571
584
|
getLegendSources(list: ILegendSource[]): void;
|
|
572
585
|
needAxes(): boolean;
|
|
@@ -665,12 +678,14 @@ type PointClickCallbck = (args: IDataPointCallbackArgs) => boolean;
|
|
|
665
678
|
declare abstract class Series extends ChartItem implements ISeries, ILegendSource {
|
|
666
679
|
static readonly LEGEND_MARKER = "rct-legend-item-marker";
|
|
667
680
|
static _loadSeries(chart: IChart, src: any, defType?: string): Series;
|
|
681
|
+
private _ranges;
|
|
668
682
|
index: number;
|
|
669
683
|
group: SeriesGroup<Series>;
|
|
670
684
|
_xAxisObj: IAxis;
|
|
671
685
|
_yAxisObj: IAxis;
|
|
672
686
|
protected _points: DataPointCollection;
|
|
673
687
|
_runPoints: DataPoint[];
|
|
688
|
+
_runRanges: IValueRange[];
|
|
674
689
|
_minValue: number;
|
|
675
690
|
_maxValue: number;
|
|
676
691
|
_referents: Series[];
|
|
@@ -685,6 +700,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
685
700
|
readonly pointLabel: DataPointLabel;
|
|
686
701
|
readonly trendline: Trendline;
|
|
687
702
|
readonly tooltip: Tooltip;
|
|
703
|
+
visibleThreshold: number;
|
|
688
704
|
zOrder: number;
|
|
689
705
|
xAxis: string | number;
|
|
690
706
|
yAxis: string | number;
|
|
@@ -696,9 +712,11 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
696
712
|
xStep: number | string;
|
|
697
713
|
color: string;
|
|
698
714
|
pointColors: boolean | string[];
|
|
715
|
+
ranges: IValueRange[];
|
|
716
|
+
rangeAxis: 'x' | 'y' | 'z';
|
|
699
717
|
clipped: boolean;
|
|
700
|
-
|
|
701
|
-
|
|
718
|
+
visibleInLegend: boolean;
|
|
719
|
+
visibleInNavigator: boolean;
|
|
702
720
|
pointStyleCallback: PointStyleCallback;
|
|
703
721
|
onPointClick: PointClickCallbck;
|
|
704
722
|
contains(p: DataPoint): boolean;
|
|
@@ -708,6 +726,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
708
726
|
pointLabelCount(): number;
|
|
709
727
|
isEmpty(): boolean;
|
|
710
728
|
needAxes(): boolean;
|
|
729
|
+
isSide(): boolean;
|
|
711
730
|
canCategorized(): boolean;
|
|
712
731
|
defaultYAxisType(): string;
|
|
713
732
|
clusterable(): boolean;
|
|
@@ -753,6 +772,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
753
772
|
protected _doLoad(src: any): void;
|
|
754
773
|
protected _loadData(src: any): any;
|
|
755
774
|
protected _doLoadPoints(src: any[]): void;
|
|
775
|
+
loadPoints(src: any[]): void;
|
|
756
776
|
protected _doPrepareRender(): void;
|
|
757
777
|
prepareAfter(): void;
|
|
758
778
|
}
|
|
@@ -775,9 +795,9 @@ declare class PlottingItemCollection {
|
|
|
775
795
|
items(): IPlottingItem[];
|
|
776
796
|
visibles(): IPlottingItem[];
|
|
777
797
|
series(): Series[];
|
|
778
|
-
visibleSeries(): Series[];
|
|
779
798
|
needAxes(): boolean;
|
|
780
799
|
getSeries(name: string): Series;
|
|
800
|
+
getVisibleSeries(side: boolean): Series[];
|
|
781
801
|
seriesByPoint(point: DataPoint): Series;
|
|
782
802
|
getLegendSources(): ILegendSource[];
|
|
783
803
|
load(src: any): void;
|
|
@@ -803,8 +823,9 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
|
|
|
803
823
|
layout: SeriesGroupLayout;
|
|
804
824
|
xAxis: string | number;
|
|
805
825
|
yAxis: string | number;
|
|
806
|
-
|
|
826
|
+
visibleInLegend: boolean;
|
|
807
827
|
get series(): T[];
|
|
828
|
+
isSide(): boolean;
|
|
808
829
|
needAxes(): boolean;
|
|
809
830
|
isEmpty(): boolean;
|
|
810
831
|
canCategorized(): boolean;
|
|
@@ -835,6 +856,15 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
|
|
|
835
856
|
private $_collectFill;
|
|
836
857
|
}
|
|
837
858
|
|
|
859
|
+
declare class Title extends ChartItem {
|
|
860
|
+
text: string;
|
|
861
|
+
alignBase: AlignBase;
|
|
862
|
+
align: Align;
|
|
863
|
+
backgroundStyle: SVGStyleOrClass;
|
|
864
|
+
isVisible(): boolean;
|
|
865
|
+
protected _doLoadSimple(source: any): boolean;
|
|
866
|
+
}
|
|
867
|
+
|
|
838
868
|
declare abstract class GaugeBase extends Widget {
|
|
839
869
|
private _size;
|
|
840
870
|
private _width;
|
|
@@ -853,6 +883,7 @@ declare abstract class GaugeBase extends Widget {
|
|
|
853
883
|
private _bottomDim;
|
|
854
884
|
constructor(chart: IChart);
|
|
855
885
|
abstract _type(): string;
|
|
886
|
+
side: boolean;
|
|
856
887
|
name: string;
|
|
857
888
|
get left(): RtPercentSize;
|
|
858
889
|
set left(value: RtPercentSize);
|
|
@@ -910,7 +941,7 @@ declare class GaugeCollection {
|
|
|
910
941
|
constructor(chart: IChart);
|
|
911
942
|
get count(): number;
|
|
912
943
|
get firstGauge(): Gauge;
|
|
913
|
-
|
|
944
|
+
getVisibles(side: boolean): GaugeBase[];
|
|
914
945
|
getGauge(name: string): Gauge;
|
|
915
946
|
get(name: string | number): GaugeBase;
|
|
916
947
|
load(src: any): void;
|
|
@@ -1091,11 +1122,15 @@ interface IChart {
|
|
|
1091
1122
|
gaugeType: string;
|
|
1092
1123
|
xStart: number;
|
|
1093
1124
|
xStep: number;
|
|
1125
|
+
_splitted: boolean;
|
|
1126
|
+
_splits: number[];
|
|
1094
1127
|
first: IPlottingItem;
|
|
1095
1128
|
firstSeries: Series;
|
|
1096
1129
|
xAxis: IAxis;
|
|
1097
1130
|
yAxis: IAxis;
|
|
1131
|
+
subtitle: Title;
|
|
1098
1132
|
colors: string[];
|
|
1133
|
+
_createChart(config: any): IChart;
|
|
1099
1134
|
assignTemplates(target: any): any;
|
|
1100
1135
|
isGauge(): boolean;
|
|
1101
1136
|
isPolar(): boolean;
|
|
@@ -1120,6 +1155,8 @@ interface IChart {
|
|
|
1120
1155
|
_visibleChanged(item: ChartItem): void;
|
|
1121
1156
|
_pointVisibleChanged(series: Series, point: DataPoint): void;
|
|
1122
1157
|
_modelChanged(item: ChartItem, tag?: any): void;
|
|
1158
|
+
prepareRender(): void;
|
|
1159
|
+
layoutAxes(width: number, height: number, inverted: boolean, phase: number): void;
|
|
1123
1160
|
}
|
|
1124
1161
|
|
|
1125
1162
|
declare enum CrosshairType {
|
|
@@ -1148,16 +1185,19 @@ declare class Crosshair extends ChartItem {
|
|
|
1148
1185
|
interface IAxis {
|
|
1149
1186
|
type(): string;
|
|
1150
1187
|
chart: IChart;
|
|
1188
|
+
side: boolean;
|
|
1151
1189
|
_vlen: number;
|
|
1152
1190
|
_isX: boolean;
|
|
1153
1191
|
_isHorz: boolean;
|
|
1154
1192
|
_isOpposite: boolean;
|
|
1193
|
+
_isBetween: boolean;
|
|
1155
1194
|
reversed: boolean;
|
|
1156
1195
|
_zoom: IAxisZoom;
|
|
1157
1196
|
isContinuous(): boolean;
|
|
1158
1197
|
getBaseValue(): number;
|
|
1159
1198
|
axisMax(): number;
|
|
1160
1199
|
axisMin(): number;
|
|
1200
|
+
length(): number;
|
|
1161
1201
|
zoom(start: number, end: number): boolean;
|
|
1162
1202
|
getValue(value: any): number;
|
|
1163
1203
|
parseValue(value: any): number;
|
|
@@ -1173,6 +1213,7 @@ declare abstract class AxisItem extends ChartItem {
|
|
|
1173
1213
|
}
|
|
1174
1214
|
declare class AxisLine extends AxisItem {
|
|
1175
1215
|
constructor(axis: Axis);
|
|
1216
|
+
protected _doLoadSimple(source: any): boolean;
|
|
1176
1217
|
}
|
|
1177
1218
|
declare enum AxisTitleAlign {
|
|
1178
1219
|
START = "start",
|
|
@@ -1180,15 +1221,19 @@ declare enum AxisTitleAlign {
|
|
|
1180
1221
|
END = "end"
|
|
1181
1222
|
}
|
|
1182
1223
|
declare class AxisTitle extends AxisItem {
|
|
1224
|
+
private _rotation;
|
|
1183
1225
|
text: string;
|
|
1226
|
+
get rotatin(): 0 | 90 | 270 | -90 | -270;
|
|
1227
|
+
set rotation(value: 0 | 90 | 270 | -90 | -270);
|
|
1184
1228
|
align: AxisTitleAlign;
|
|
1229
|
+
offset: number;
|
|
1185
1230
|
gap: number;
|
|
1186
1231
|
backgroundStyle: SVGStyleOrClass;
|
|
1187
1232
|
isVisible(): boolean;
|
|
1233
|
+
getRotation(axis: Axis): number;
|
|
1188
1234
|
protected _doLoadSimple(source: any): boolean;
|
|
1189
1235
|
}
|
|
1190
1236
|
declare class AxisGrid extends AxisItem {
|
|
1191
|
-
circular: boolean;
|
|
1192
1237
|
startVisible: boolean;
|
|
1193
1238
|
endVisible: boolean;
|
|
1194
1239
|
constructor(axis: Axis);
|
|
@@ -1209,6 +1254,9 @@ declare abstract class AxisGuide extends AxisItem {
|
|
|
1209
1254
|
declare abstract class AxisTick extends AxisItem {
|
|
1210
1255
|
length: number;
|
|
1211
1256
|
margin: number;
|
|
1257
|
+
integral: boolean;
|
|
1258
|
+
showFirst: boolean;
|
|
1259
|
+
showLast: boolean;
|
|
1212
1260
|
constructor(axis: Axis);
|
|
1213
1261
|
}
|
|
1214
1262
|
declare enum AxisLabelArrange {
|
|
@@ -1235,13 +1283,26 @@ interface IAxisTick {
|
|
|
1235
1283
|
label: string;
|
|
1236
1284
|
}
|
|
1237
1285
|
declare enum AxisPosition {
|
|
1286
|
+
AUTO = "auto",
|
|
1238
1287
|
NORMAL = "normal",
|
|
1239
1288
|
OPPOSITE = "opposite",
|
|
1240
|
-
BASE = "base"
|
|
1289
|
+
BASE = "base",
|
|
1290
|
+
BETWEEN = "between"
|
|
1241
1291
|
}
|
|
1242
1292
|
declare class AxisScrollBar extends AxisItem {
|
|
1293
|
+
private _thickness;
|
|
1294
|
+
private _minThumbSize;
|
|
1295
|
+
private _gap;
|
|
1296
|
+
private _gapFar;
|
|
1243
1297
|
constructor(axis: Axis);
|
|
1244
|
-
thickness: number;
|
|
1298
|
+
get thickness(): number;
|
|
1299
|
+
set thickness(value: number);
|
|
1300
|
+
get minThumbSize(): number;
|
|
1301
|
+
set minThumbSize(value: number);
|
|
1302
|
+
get gap(): number;
|
|
1303
|
+
set gap(value: number);
|
|
1304
|
+
get gapFar(): number;
|
|
1305
|
+
set gapFar(value: number);
|
|
1245
1306
|
}
|
|
1246
1307
|
interface IAxisZoom {
|
|
1247
1308
|
start: number;
|
|
@@ -1249,26 +1310,20 @@ interface IAxisZoom {
|
|
|
1249
1310
|
}
|
|
1250
1311
|
declare class AxisZoom {
|
|
1251
1312
|
axis: Axis;
|
|
1252
|
-
|
|
1253
|
-
|
|
1313
|
+
min: number;
|
|
1314
|
+
max: number;
|
|
1254
1315
|
start: number;
|
|
1255
1316
|
end: number;
|
|
1256
1317
|
constructor(axis: Axis, start: number, end: number);
|
|
1318
|
+
get length(): number;
|
|
1257
1319
|
resize(start: number, end: number): boolean;
|
|
1258
1320
|
}
|
|
1259
1321
|
declare abstract class Axis extends ChartItem implements IAxis {
|
|
1260
|
-
|
|
1261
|
-
readonly title: AxisTitle;
|
|
1262
|
-
readonly line: AxisLine;
|
|
1263
|
-
readonly tick: AxisTick;
|
|
1264
|
-
readonly label: AxisLabel;
|
|
1265
|
-
readonly grid: AxisGrid;
|
|
1266
|
-
readonly guides: AxisGuide[];
|
|
1267
|
-
readonly crosshair: Crosshair;
|
|
1268
|
-
readonly scrollBar: AxisScrollBar;
|
|
1322
|
+
_isPolar: boolean;
|
|
1269
1323
|
_isX: boolean;
|
|
1270
1324
|
_isHorz: boolean;
|
|
1271
1325
|
_isOpposite: boolean;
|
|
1326
|
+
_isBetween: boolean;
|
|
1272
1327
|
protected _series: IPlottingItem[];
|
|
1273
1328
|
_range: {
|
|
1274
1329
|
min: number;
|
|
@@ -1285,6 +1340,16 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1285
1340
|
_zoom: AxisZoom;
|
|
1286
1341
|
constructor(chart: IChart, isX: boolean, name?: string);
|
|
1287
1342
|
abstract type(): string;
|
|
1343
|
+
readonly name: string;
|
|
1344
|
+
readonly title: AxisTitle;
|
|
1345
|
+
readonly line: AxisLine;
|
|
1346
|
+
readonly tick: AxisTick;
|
|
1347
|
+
readonly label: AxisLabel;
|
|
1348
|
+
readonly grid: AxisGrid;
|
|
1349
|
+
readonly guides: AxisGuide[];
|
|
1350
|
+
readonly crosshair: Crosshair;
|
|
1351
|
+
readonly scrollBar: AxisScrollBar;
|
|
1352
|
+
side: boolean;
|
|
1288
1353
|
position: AxisPosition;
|
|
1289
1354
|
reversed: boolean;
|
|
1290
1355
|
minValue: number;
|
|
@@ -1331,7 +1396,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1331
1396
|
declare class AxisCollection {
|
|
1332
1397
|
readonly chart: IChart;
|
|
1333
1398
|
readonly isX: boolean;
|
|
1334
|
-
|
|
1399
|
+
protected _items: Axis[];
|
|
1335
1400
|
private _map;
|
|
1336
1401
|
constructor(chart: IChart, isX: boolean);
|
|
1337
1402
|
get count(): number;
|
|
@@ -1344,7 +1409,8 @@ declare class AxisCollection {
|
|
|
1344
1409
|
collectValues(): void;
|
|
1345
1410
|
collectReferentsValues(): void;
|
|
1346
1411
|
prepareRender(): void;
|
|
1347
|
-
|
|
1412
|
+
$_buildTicks(length: number): void;
|
|
1413
|
+
protected _getLength(axis: Axis, length: number): number;
|
|
1348
1414
|
connect(series: IPlottingItem): Axis;
|
|
1349
1415
|
forEach(callback: (p: Axis, i?: number) => any): void;
|
|
1350
1416
|
isZoomed(): boolean;
|