realchart 0.9.9 → 0.9.10
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 +86 -22
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/realchart-style.css +53 -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;
|
|
@@ -491,7 +501,7 @@ declare class DataPoint {
|
|
|
491
501
|
get xAbs(): number;
|
|
492
502
|
ariaHint(): string;
|
|
493
503
|
labelCount(): number;
|
|
494
|
-
assignTo(proxy
|
|
504
|
+
assignTo(proxy?: any): any;
|
|
495
505
|
getProp(fld: string | number): any;
|
|
496
506
|
parse(series: ISeries): void;
|
|
497
507
|
getLabel(index: number): any;
|
|
@@ -514,6 +524,7 @@ declare class DataPointCollection {
|
|
|
514
524
|
load(source: any): void;
|
|
515
525
|
getProps(prop: string | number): any[];
|
|
516
526
|
getValues(axis: string): any[];
|
|
527
|
+
getProxies(): any[];
|
|
517
528
|
forEach(callback: (p: DataPoint, i?: number) => any): void;
|
|
518
529
|
getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
|
|
519
530
|
}
|
|
@@ -567,6 +578,7 @@ interface IPlottingItem {
|
|
|
567
578
|
xAxis: string | number;
|
|
568
579
|
yAxis: string | number;
|
|
569
580
|
visible: boolean;
|
|
581
|
+
isSide(): boolean;
|
|
570
582
|
getVisiblePoints(): DataPoint[];
|
|
571
583
|
getLegendSources(list: ILegendSource[]): void;
|
|
572
584
|
needAxes(): boolean;
|
|
@@ -665,12 +677,14 @@ type PointClickCallbck = (args: IDataPointCallbackArgs) => boolean;
|
|
|
665
677
|
declare abstract class Series extends ChartItem implements ISeries, ILegendSource {
|
|
666
678
|
static readonly LEGEND_MARKER = "rct-legend-item-marker";
|
|
667
679
|
static _loadSeries(chart: IChart, src: any, defType?: string): Series;
|
|
680
|
+
private _ranges;
|
|
668
681
|
index: number;
|
|
669
682
|
group: SeriesGroup<Series>;
|
|
670
683
|
_xAxisObj: IAxis;
|
|
671
684
|
_yAxisObj: IAxis;
|
|
672
685
|
protected _points: DataPointCollection;
|
|
673
686
|
_runPoints: DataPoint[];
|
|
687
|
+
_runRanges: IValueRange[];
|
|
674
688
|
_minValue: number;
|
|
675
689
|
_maxValue: number;
|
|
676
690
|
_referents: Series[];
|
|
@@ -685,6 +699,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
685
699
|
readonly pointLabel: DataPointLabel;
|
|
686
700
|
readonly trendline: Trendline;
|
|
687
701
|
readonly tooltip: Tooltip;
|
|
702
|
+
visibleThreshold: number;
|
|
688
703
|
zOrder: number;
|
|
689
704
|
xAxis: string | number;
|
|
690
705
|
yAxis: string | number;
|
|
@@ -696,9 +711,11 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
696
711
|
xStep: number | string;
|
|
697
712
|
color: string;
|
|
698
713
|
pointColors: boolean | string[];
|
|
714
|
+
ranges: IValueRange[];
|
|
715
|
+
rangeAxis: 'x' | 'y' | 'z';
|
|
699
716
|
clipped: boolean;
|
|
700
|
-
|
|
701
|
-
|
|
717
|
+
visibleInLegend: boolean;
|
|
718
|
+
visibleInNavigator: boolean;
|
|
702
719
|
pointStyleCallback: PointStyleCallback;
|
|
703
720
|
onPointClick: PointClickCallbck;
|
|
704
721
|
contains(p: DataPoint): boolean;
|
|
@@ -708,6 +725,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
708
725
|
pointLabelCount(): number;
|
|
709
726
|
isEmpty(): boolean;
|
|
710
727
|
needAxes(): boolean;
|
|
728
|
+
isSide(): boolean;
|
|
711
729
|
canCategorized(): boolean;
|
|
712
730
|
defaultYAxisType(): string;
|
|
713
731
|
clusterable(): boolean;
|
|
@@ -753,6 +771,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
753
771
|
protected _doLoad(src: any): void;
|
|
754
772
|
protected _loadData(src: any): any;
|
|
755
773
|
protected _doLoadPoints(src: any[]): void;
|
|
774
|
+
loadPoints(src: any[]): void;
|
|
756
775
|
protected _doPrepareRender(): void;
|
|
757
776
|
prepareAfter(): void;
|
|
758
777
|
}
|
|
@@ -775,9 +794,9 @@ declare class PlottingItemCollection {
|
|
|
775
794
|
items(): IPlottingItem[];
|
|
776
795
|
visibles(): IPlottingItem[];
|
|
777
796
|
series(): Series[];
|
|
778
|
-
visibleSeries(): Series[];
|
|
779
797
|
needAxes(): boolean;
|
|
780
798
|
getSeries(name: string): Series;
|
|
799
|
+
getVisibleSeries(side: boolean): Series[];
|
|
781
800
|
seriesByPoint(point: DataPoint): Series;
|
|
782
801
|
getLegendSources(): ILegendSource[];
|
|
783
802
|
load(src: any): void;
|
|
@@ -803,8 +822,9 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
|
|
|
803
822
|
layout: SeriesGroupLayout;
|
|
804
823
|
xAxis: string | number;
|
|
805
824
|
yAxis: string | number;
|
|
806
|
-
|
|
825
|
+
visibleInLegend: boolean;
|
|
807
826
|
get series(): T[];
|
|
827
|
+
isSide(): boolean;
|
|
808
828
|
needAxes(): boolean;
|
|
809
829
|
isEmpty(): boolean;
|
|
810
830
|
canCategorized(): boolean;
|
|
@@ -835,6 +855,15 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
|
|
|
835
855
|
private $_collectFill;
|
|
836
856
|
}
|
|
837
857
|
|
|
858
|
+
declare class Title extends ChartItem {
|
|
859
|
+
text: string;
|
|
860
|
+
alignBase: AlignBase;
|
|
861
|
+
align: Align;
|
|
862
|
+
backgroundStyle: SVGStyleOrClass;
|
|
863
|
+
isVisible(): boolean;
|
|
864
|
+
protected _doLoadSimple(source: any): boolean;
|
|
865
|
+
}
|
|
866
|
+
|
|
838
867
|
declare abstract class GaugeBase extends Widget {
|
|
839
868
|
private _size;
|
|
840
869
|
private _width;
|
|
@@ -853,6 +882,7 @@ declare abstract class GaugeBase extends Widget {
|
|
|
853
882
|
private _bottomDim;
|
|
854
883
|
constructor(chart: IChart);
|
|
855
884
|
abstract _type(): string;
|
|
885
|
+
side: boolean;
|
|
856
886
|
name: string;
|
|
857
887
|
get left(): RtPercentSize;
|
|
858
888
|
set left(value: RtPercentSize);
|
|
@@ -910,7 +940,7 @@ declare class GaugeCollection {
|
|
|
910
940
|
constructor(chart: IChart);
|
|
911
941
|
get count(): number;
|
|
912
942
|
get firstGauge(): Gauge;
|
|
913
|
-
|
|
943
|
+
getVisibles(side: boolean): GaugeBase[];
|
|
914
944
|
getGauge(name: string): Gauge;
|
|
915
945
|
get(name: string | number): GaugeBase;
|
|
916
946
|
load(src: any): void;
|
|
@@ -1091,11 +1121,15 @@ interface IChart {
|
|
|
1091
1121
|
gaugeType: string;
|
|
1092
1122
|
xStart: number;
|
|
1093
1123
|
xStep: number;
|
|
1124
|
+
_splitted: boolean;
|
|
1125
|
+
_splits: number[];
|
|
1094
1126
|
first: IPlottingItem;
|
|
1095
1127
|
firstSeries: Series;
|
|
1096
1128
|
xAxis: IAxis;
|
|
1097
1129
|
yAxis: IAxis;
|
|
1130
|
+
subtitle: Title;
|
|
1098
1131
|
colors: string[];
|
|
1132
|
+
_createChart(config: any): IChart;
|
|
1099
1133
|
assignTemplates(target: any): any;
|
|
1100
1134
|
isGauge(): boolean;
|
|
1101
1135
|
isPolar(): boolean;
|
|
@@ -1120,6 +1154,8 @@ interface IChart {
|
|
|
1120
1154
|
_visibleChanged(item: ChartItem): void;
|
|
1121
1155
|
_pointVisibleChanged(series: Series, point: DataPoint): void;
|
|
1122
1156
|
_modelChanged(item: ChartItem, tag?: any): void;
|
|
1157
|
+
prepareRender(): void;
|
|
1158
|
+
layoutAxes(width: number, height: number, inverted: boolean, phase: number): void;
|
|
1123
1159
|
}
|
|
1124
1160
|
|
|
1125
1161
|
declare enum CrosshairType {
|
|
@@ -1148,16 +1184,19 @@ declare class Crosshair extends ChartItem {
|
|
|
1148
1184
|
interface IAxis {
|
|
1149
1185
|
type(): string;
|
|
1150
1186
|
chart: IChart;
|
|
1187
|
+
side: boolean;
|
|
1151
1188
|
_vlen: number;
|
|
1152
1189
|
_isX: boolean;
|
|
1153
1190
|
_isHorz: boolean;
|
|
1154
1191
|
_isOpposite: boolean;
|
|
1192
|
+
_isBetween: boolean;
|
|
1155
1193
|
reversed: boolean;
|
|
1156
1194
|
_zoom: IAxisZoom;
|
|
1157
1195
|
isContinuous(): boolean;
|
|
1158
1196
|
getBaseValue(): number;
|
|
1159
1197
|
axisMax(): number;
|
|
1160
1198
|
axisMin(): number;
|
|
1199
|
+
length(): number;
|
|
1161
1200
|
zoom(start: number, end: number): boolean;
|
|
1162
1201
|
getValue(value: any): number;
|
|
1163
1202
|
parseValue(value: any): number;
|
|
@@ -1180,11 +1219,16 @@ declare enum AxisTitleAlign {
|
|
|
1180
1219
|
END = "end"
|
|
1181
1220
|
}
|
|
1182
1221
|
declare class AxisTitle extends AxisItem {
|
|
1222
|
+
private _rotation;
|
|
1183
1223
|
text: string;
|
|
1224
|
+
get rotatin(): 0 | 90 | 270 | -90 | -270;
|
|
1225
|
+
set rotation(value: 0 | 90 | 270 | -90 | -270);
|
|
1184
1226
|
align: AxisTitleAlign;
|
|
1227
|
+
offset: number;
|
|
1185
1228
|
gap: number;
|
|
1186
1229
|
backgroundStyle: SVGStyleOrClass;
|
|
1187
1230
|
isVisible(): boolean;
|
|
1231
|
+
getRotation(axis: Axis): number;
|
|
1188
1232
|
protected _doLoadSimple(source: any): boolean;
|
|
1189
1233
|
}
|
|
1190
1234
|
declare class AxisGrid extends AxisItem {
|
|
@@ -1209,6 +1253,9 @@ declare abstract class AxisGuide extends AxisItem {
|
|
|
1209
1253
|
declare abstract class AxisTick extends AxisItem {
|
|
1210
1254
|
length: number;
|
|
1211
1255
|
margin: number;
|
|
1256
|
+
integral: boolean;
|
|
1257
|
+
showFirst: boolean;
|
|
1258
|
+
showLast: boolean;
|
|
1212
1259
|
constructor(axis: Axis);
|
|
1213
1260
|
}
|
|
1214
1261
|
declare enum AxisLabelArrange {
|
|
@@ -1235,13 +1282,26 @@ interface IAxisTick {
|
|
|
1235
1282
|
label: string;
|
|
1236
1283
|
}
|
|
1237
1284
|
declare enum AxisPosition {
|
|
1285
|
+
AUTO = "auto",
|
|
1238
1286
|
NORMAL = "normal",
|
|
1239
1287
|
OPPOSITE = "opposite",
|
|
1240
|
-
BASE = "base"
|
|
1288
|
+
BASE = "base",
|
|
1289
|
+
BETWEEN = "between"
|
|
1241
1290
|
}
|
|
1242
1291
|
declare class AxisScrollBar extends AxisItem {
|
|
1292
|
+
private _thickness;
|
|
1293
|
+
private _minThumbSize;
|
|
1294
|
+
private _gap;
|
|
1295
|
+
private _gapFar;
|
|
1243
1296
|
constructor(axis: Axis);
|
|
1244
|
-
thickness: number;
|
|
1297
|
+
get thickness(): number;
|
|
1298
|
+
set thickness(value: number);
|
|
1299
|
+
get minThumbSize(): number;
|
|
1300
|
+
set minThumbSize(value: number);
|
|
1301
|
+
get gap(): number;
|
|
1302
|
+
set gap(value: number);
|
|
1303
|
+
get gapFar(): number;
|
|
1304
|
+
set gapFar(value: number);
|
|
1245
1305
|
}
|
|
1246
1306
|
interface IAxisZoom {
|
|
1247
1307
|
start: number;
|
|
@@ -1249,26 +1309,19 @@ interface IAxisZoom {
|
|
|
1249
1309
|
}
|
|
1250
1310
|
declare class AxisZoom {
|
|
1251
1311
|
axis: Axis;
|
|
1252
|
-
|
|
1253
|
-
|
|
1312
|
+
min: number;
|
|
1313
|
+
max: number;
|
|
1254
1314
|
start: number;
|
|
1255
1315
|
end: number;
|
|
1256
1316
|
constructor(axis: Axis, start: number, end: number);
|
|
1317
|
+
get length(): number;
|
|
1257
1318
|
resize(start: number, end: number): boolean;
|
|
1258
1319
|
}
|
|
1259
1320
|
declare abstract class Axis extends ChartItem implements IAxis {
|
|
1260
|
-
readonly name: string;
|
|
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;
|
|
1269
1321
|
_isX: boolean;
|
|
1270
1322
|
_isHorz: boolean;
|
|
1271
1323
|
_isOpposite: boolean;
|
|
1324
|
+
_isBetween: boolean;
|
|
1272
1325
|
protected _series: IPlottingItem[];
|
|
1273
1326
|
_range: {
|
|
1274
1327
|
min: number;
|
|
@@ -1285,6 +1338,16 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1285
1338
|
_zoom: AxisZoom;
|
|
1286
1339
|
constructor(chart: IChart, isX: boolean, name?: string);
|
|
1287
1340
|
abstract type(): string;
|
|
1341
|
+
readonly name: string;
|
|
1342
|
+
readonly title: AxisTitle;
|
|
1343
|
+
readonly line: AxisLine;
|
|
1344
|
+
readonly tick: AxisTick;
|
|
1345
|
+
readonly label: AxisLabel;
|
|
1346
|
+
readonly grid: AxisGrid;
|
|
1347
|
+
readonly guides: AxisGuide[];
|
|
1348
|
+
readonly crosshair: Crosshair;
|
|
1349
|
+
readonly scrollBar: AxisScrollBar;
|
|
1350
|
+
side: boolean;
|
|
1288
1351
|
position: AxisPosition;
|
|
1289
1352
|
reversed: boolean;
|
|
1290
1353
|
minValue: number;
|
|
@@ -1331,7 +1394,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1331
1394
|
declare class AxisCollection {
|
|
1332
1395
|
readonly chart: IChart;
|
|
1333
1396
|
readonly isX: boolean;
|
|
1334
|
-
|
|
1397
|
+
protected _items: Axis[];
|
|
1335
1398
|
private _map;
|
|
1336
1399
|
constructor(chart: IChart, isX: boolean);
|
|
1337
1400
|
get count(): number;
|
|
@@ -1344,7 +1407,8 @@ declare class AxisCollection {
|
|
|
1344
1407
|
collectValues(): void;
|
|
1345
1408
|
collectReferentsValues(): void;
|
|
1346
1409
|
prepareRender(): void;
|
|
1347
|
-
|
|
1410
|
+
$_buildTicks(length: number): void;
|
|
1411
|
+
protected _getLength(axis: Axis, length: number): number;
|
|
1348
1412
|
connect(series: IPlottingItem): Axis;
|
|
1349
1413
|
forEach(callback: (p: Axis, i?: number) => any): void;
|
|
1350
1414
|
isZoomed(): boolean;
|