realchart 0.9.22 → 0.9.24
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 +153 -123
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ interface SVGStyles {
|
|
|
5
5
|
fillOpacity?: string;
|
|
6
6
|
stroke?: string;
|
|
7
7
|
strokeWidth?: string;
|
|
8
|
+
strokeDasharray?: string;
|
|
8
9
|
fontFamily?: string;
|
|
9
10
|
fontSize?: string;
|
|
10
11
|
fontWeight?: string;
|
|
@@ -113,6 +114,23 @@ interface IRect {
|
|
|
113
114
|
height: number;
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
declare class Sides {
|
|
118
|
+
top: number;
|
|
119
|
+
bottom: number;
|
|
120
|
+
left: number;
|
|
121
|
+
right: number;
|
|
122
|
+
static readonly Empty: Readonly<Sides>;
|
|
123
|
+
static Temp: Sides;
|
|
124
|
+
static create(top: number, bottom?: number, left?: number, right?: number): Sides;
|
|
125
|
+
static createFrom(value: string): Sides;
|
|
126
|
+
constructor(top?: number, bottom?: number, left?: number, right?: number);
|
|
127
|
+
clone(): Sides;
|
|
128
|
+
applyPadding(cs: CSSStyleDeclaration): Sides;
|
|
129
|
+
applyMargin(cs: CSSStyleDeclaration): Sides;
|
|
130
|
+
shrink(r: IRect): IRect;
|
|
131
|
+
toString(): string;
|
|
132
|
+
}
|
|
133
|
+
|
|
116
134
|
interface IPointerHandler {
|
|
117
135
|
handleDown(ev: PointerEvent): void;
|
|
118
136
|
handleUp(ev: PointerEvent): void;
|
|
@@ -338,6 +356,7 @@ declare class ClipElement extends RcElement {
|
|
|
338
356
|
constructor(doc: Document, x?: number, y?: number, width?: number, height?: number, rx?: number, ry?: number);
|
|
339
357
|
get id(): string;
|
|
340
358
|
setBounds(x: number, y: number, w: number, h: number): RcElement;
|
|
359
|
+
resize(width: number, height: number, attr?: boolean): RcElement;
|
|
341
360
|
get x(): number;
|
|
342
361
|
set x(value: number);
|
|
343
362
|
get y(): number;
|
|
@@ -425,6 +444,7 @@ declare class SvgRichText {
|
|
|
425
444
|
setFormat(value: string): void;
|
|
426
445
|
lines(): SvgLine[];
|
|
427
446
|
build(view: TextElement, maxWidth: number, maxHeight: number, target: any, domain: RichTextParamCallback): void;
|
|
447
|
+
layout(view: TextElement, align: Align, width: number, height: number, padding: Sides): void;
|
|
428
448
|
$_parse(fmt: string): void;
|
|
429
449
|
}
|
|
430
450
|
|
|
@@ -515,14 +535,72 @@ declare abstract class Annotation extends ChartItem {
|
|
|
515
535
|
getPostion(inverted: boolean, left: number, top: number, wDomain: number, hDomain: number, width: number, height: number): IPoint;
|
|
516
536
|
}
|
|
517
537
|
|
|
538
|
+
declare enum ZoomType {
|
|
539
|
+
NONE = "none",
|
|
540
|
+
X = "x",
|
|
541
|
+
Y = "y",
|
|
542
|
+
BOTH = "both"
|
|
543
|
+
}
|
|
544
|
+
declare class ZoomButton extends ChartItem {
|
|
545
|
+
body: Body;
|
|
546
|
+
constructor(body: Body);
|
|
547
|
+
isVisible(): boolean;
|
|
548
|
+
}
|
|
549
|
+
declare class BodySplit extends ChartItem {
|
|
550
|
+
body: Body;
|
|
551
|
+
constructor(body: Body);
|
|
552
|
+
size: number;
|
|
553
|
+
}
|
|
554
|
+
declare class Body extends ChartItem {
|
|
555
|
+
private _radius;
|
|
556
|
+
private _centerX;
|
|
557
|
+
private _centerY;
|
|
558
|
+
private _annotations;
|
|
559
|
+
private _radiusDim;
|
|
560
|
+
private _cxDim;
|
|
561
|
+
private _cyDim;
|
|
562
|
+
private _rd;
|
|
563
|
+
private _cx;
|
|
564
|
+
private _cy;
|
|
565
|
+
constructor(chart: IChart);
|
|
566
|
+
split: BodySplit;
|
|
567
|
+
get radius(): RtPercentSize;
|
|
568
|
+
set radius(value: RtPercentSize);
|
|
569
|
+
get centerX(): RtPercentSize;
|
|
570
|
+
set centerX(value: RtPercentSize);
|
|
571
|
+
get centerY(): RtPercentSize;
|
|
572
|
+
set centerY(value: RtPercentSize);
|
|
573
|
+
startAngle: number;
|
|
574
|
+
circular: boolean;
|
|
575
|
+
image: BackgroundImage;
|
|
576
|
+
zoomType: ZoomType;
|
|
577
|
+
zoomButton: ZoomButton;
|
|
578
|
+
canZoom(): boolean;
|
|
579
|
+
calcRadius(width: number, height: number): number;
|
|
580
|
+
setPolar(width: number, height: number): Body;
|
|
581
|
+
getStartAngle(): number;
|
|
582
|
+
getPolar(axis: Axis): {
|
|
583
|
+
start: number;
|
|
584
|
+
cx: number;
|
|
585
|
+
cy: number;
|
|
586
|
+
rd: number;
|
|
587
|
+
};
|
|
588
|
+
isZoomed(): boolean;
|
|
589
|
+
'@config annotation': Annotation[];
|
|
590
|
+
getAnnotations(): Annotation[];
|
|
591
|
+
protected _doLoadProp(prop: string, value: any): boolean;
|
|
592
|
+
protected _doPrepareRender(chart: IChart): void;
|
|
593
|
+
private $_loadAnnotations;
|
|
594
|
+
}
|
|
595
|
+
|
|
518
596
|
declare enum Shape {
|
|
519
597
|
CIRCLE = "circle",
|
|
520
598
|
DIAMOND = "diamond",
|
|
521
|
-
RECTANGLE = "rectangle",
|
|
522
599
|
SQUARE = "square",
|
|
523
600
|
TRIANGLE = "triangle",
|
|
601
|
+
STAR = "star",
|
|
524
602
|
ITRIANGLE = "itriangle",
|
|
525
|
-
|
|
603
|
+
RECTANGLE = "rectangle"
|
|
526
604
|
}
|
|
527
605
|
|
|
528
606
|
declare enum LineType {
|
|
@@ -531,66 +609,6 @@ declare enum LineType {
|
|
|
531
609
|
STEP = "step"
|
|
532
610
|
}
|
|
533
611
|
|
|
534
|
-
interface IPointPos {
|
|
535
|
-
xPos: number;
|
|
536
|
-
yPos: number;
|
|
537
|
-
isNull: boolean;
|
|
538
|
-
}
|
|
539
|
-
declare class DataPoint {
|
|
540
|
-
static swap(pts: IPointPos[]): IPointPos[];
|
|
541
|
-
index: number;
|
|
542
|
-
vindex: number;
|
|
543
|
-
x: any;
|
|
544
|
-
y: any;
|
|
545
|
-
series: string | number;
|
|
546
|
-
readonly pid: number;
|
|
547
|
-
source: any;
|
|
548
|
-
isNull: boolean;
|
|
549
|
-
xValue: number;
|
|
550
|
-
yValue: number;
|
|
551
|
-
yRate: number;
|
|
552
|
-
visible: boolean;
|
|
553
|
-
color: string;
|
|
554
|
-
xPos: number;
|
|
555
|
-
yPos: number;
|
|
556
|
-
yGroup: number;
|
|
557
|
-
drillDown: any[] | object;
|
|
558
|
-
range: IValueRange;
|
|
559
|
-
zValue: number;
|
|
560
|
-
label: any;
|
|
561
|
-
constructor(source: any);
|
|
562
|
-
get yAbs(): number;
|
|
563
|
-
get xAbs(): number;
|
|
564
|
-
ariaHint(): string;
|
|
565
|
-
labelCount(): number;
|
|
566
|
-
assignTo(proxy?: any): any;
|
|
567
|
-
getProp(fld: string | number): any;
|
|
568
|
-
parse(series: ISeries): void;
|
|
569
|
-
getLabel(index: number): any;
|
|
570
|
-
getValueOf: (traget: any, param: string) => any;
|
|
571
|
-
swap(): void;
|
|
572
|
-
protected _assignTo(proxy: any): any;
|
|
573
|
-
protected _readArray(series: ISeries, v: any[]): void;
|
|
574
|
-
protected _readObject(series: ISeries, v: any): void;
|
|
575
|
-
protected _readSingle(v: any): void;
|
|
576
|
-
}
|
|
577
|
-
declare class DataPointCollection {
|
|
578
|
-
protected _owner: ISeries;
|
|
579
|
-
private _points;
|
|
580
|
-
constructor(owner: ISeries);
|
|
581
|
-
get count(): number;
|
|
582
|
-
isEmpty(): boolean;
|
|
583
|
-
get(index: number): DataPoint;
|
|
584
|
-
pointAt(xValue: number): DataPoint;
|
|
585
|
-
contains(p: DataPoint): boolean;
|
|
586
|
-
load(source: any): void;
|
|
587
|
-
getProps(prop: string | number): any[];
|
|
588
|
-
getCategories(axis: string): any[];
|
|
589
|
-
getProxies(): any[];
|
|
590
|
-
forEach(callback: (p: DataPoint, i?: number) => any): void;
|
|
591
|
-
getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
|
|
592
|
-
}
|
|
593
|
-
|
|
594
612
|
declare abstract class Widget extends ChartItem {
|
|
595
613
|
protected _doLoad(source: any): void;
|
|
596
614
|
protected _doPrepareRender(chart: IChart): void;
|
|
@@ -614,8 +632,10 @@ declare class Tooltip extends ChartItem {
|
|
|
614
632
|
minWidth: number;
|
|
615
633
|
minHeight: number;
|
|
616
634
|
followPointer: boolean;
|
|
617
|
-
numberFormat:
|
|
635
|
+
numberFormat: string;
|
|
636
|
+
timeFormat: string;
|
|
618
637
|
getValue(series: Series, point: DataPoint, param: string, format: string): string;
|
|
638
|
+
protected _doLoadSimple(source: any): boolean;
|
|
619
639
|
}
|
|
620
640
|
|
|
621
641
|
declare enum PointItemPosition {
|
|
@@ -803,7 +823,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
803
823
|
pointColors: boolean | string[];
|
|
804
824
|
viewRanges: IValueRange[] | IValueRanges;
|
|
805
825
|
viewRangeValue: 'x' | 'y' | 'z';
|
|
806
|
-
|
|
826
|
+
noClip: boolean;
|
|
807
827
|
visibleInLegend: boolean;
|
|
808
828
|
visibleInNavigator: boolean;
|
|
809
829
|
pointStyleCallback: PointStyleCallback;
|
|
@@ -968,62 +988,64 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
|
|
|
968
988
|
private $_collectFill;
|
|
969
989
|
}
|
|
970
990
|
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
BOTH = "both"
|
|
976
|
-
}
|
|
977
|
-
declare class ZoomButton extends ChartItem {
|
|
978
|
-
body: Body;
|
|
979
|
-
constructor(body: Body);
|
|
980
|
-
isVisible(): boolean;
|
|
991
|
+
interface IPointPos {
|
|
992
|
+
xPos: number;
|
|
993
|
+
yPos: number;
|
|
994
|
+
isNull: boolean;
|
|
981
995
|
}
|
|
982
|
-
declare class
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
996
|
+
declare class DataPoint {
|
|
997
|
+
static swap(pts: IPointPos[]): IPointPos[];
|
|
998
|
+
index: number;
|
|
999
|
+
vindex: number;
|
|
1000
|
+
x: any;
|
|
1001
|
+
y: any;
|
|
1002
|
+
series: string | number;
|
|
1003
|
+
readonly pid: number;
|
|
1004
|
+
source: any;
|
|
1005
|
+
isNull: boolean;
|
|
1006
|
+
xValue: number;
|
|
1007
|
+
yValue: number;
|
|
1008
|
+
yRate: number;
|
|
1009
|
+
visible: boolean;
|
|
1010
|
+
color: string;
|
|
1011
|
+
xPos: number;
|
|
1012
|
+
yPos: number;
|
|
1013
|
+
yGroup: number;
|
|
1014
|
+
drillDown: any[] | object;
|
|
1015
|
+
range: IValueRange;
|
|
1016
|
+
zValue: number;
|
|
1017
|
+
label: any;
|
|
1018
|
+
constructor(source: any);
|
|
1019
|
+
get yAbs(): number;
|
|
1020
|
+
get xAbs(): number;
|
|
1021
|
+
ariaHint(): string;
|
|
1022
|
+
labelCount(): number;
|
|
1023
|
+
assignTo(proxy?: any): any;
|
|
1024
|
+
getProp(fld: string | number): any;
|
|
1025
|
+
parse(series: ISeries): void;
|
|
1026
|
+
getLabel(index: number): any;
|
|
1027
|
+
getValueOf: (traget: any, param: string) => any;
|
|
1028
|
+
swap(): void;
|
|
1029
|
+
protected _assignTo(proxy: any): any;
|
|
1030
|
+
protected _readArray(series: ISeries, v: any[]): void;
|
|
1031
|
+
protected _readObject(series: ISeries, v: any): void;
|
|
1032
|
+
protected _readSingle(v: any): void;
|
|
986
1033
|
}
|
|
987
|
-
declare class
|
|
988
|
-
|
|
989
|
-
private
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
get centerX(): RtPercentSize;
|
|
1003
|
-
set centerX(value: RtPercentSize);
|
|
1004
|
-
get centerY(): RtPercentSize;
|
|
1005
|
-
set centerY(value: RtPercentSize);
|
|
1006
|
-
startAngle: number;
|
|
1007
|
-
circular: boolean;
|
|
1008
|
-
image: BackgroundImage;
|
|
1009
|
-
zoomType: ZoomType;
|
|
1010
|
-
zoomButton: ZoomButton;
|
|
1011
|
-
canZoom(): boolean;
|
|
1012
|
-
calcRadius(width: number, height: number): number;
|
|
1013
|
-
setPolar(width: number, height: number): Body;
|
|
1014
|
-
getStartAngle(): number;
|
|
1015
|
-
getPolar(series: Series): {
|
|
1016
|
-
start: number;
|
|
1017
|
-
cx: number;
|
|
1018
|
-
cy: number;
|
|
1019
|
-
rd: number;
|
|
1020
|
-
};
|
|
1021
|
-
isZoomed(): boolean;
|
|
1022
|
-
'@config annotation': Annotation[];
|
|
1023
|
-
getAnnotations(): Annotation[];
|
|
1024
|
-
protected _doLoadProp(prop: string, value: any): boolean;
|
|
1025
|
-
protected _doPrepareRender(chart: IChart): void;
|
|
1026
|
-
private $_loadAnnotations;
|
|
1034
|
+
declare class DataPointCollection {
|
|
1035
|
+
protected _owner: ISeries;
|
|
1036
|
+
private _points;
|
|
1037
|
+
constructor(owner: ISeries);
|
|
1038
|
+
get count(): number;
|
|
1039
|
+
isEmpty(): boolean;
|
|
1040
|
+
get(index: number): DataPoint;
|
|
1041
|
+
pointAt(xValue: number): DataPoint;
|
|
1042
|
+
contains(p: DataPoint): boolean;
|
|
1043
|
+
load(source: any): void;
|
|
1044
|
+
getProps(prop: string | number): any[];
|
|
1045
|
+
getCategories(axis: string): any[];
|
|
1046
|
+
getProxies(): any[];
|
|
1047
|
+
forEach(callback: (p: DataPoint, i?: number) => any): void;
|
|
1048
|
+
getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
|
|
1027
1049
|
}
|
|
1028
1050
|
|
|
1029
1051
|
declare enum PaletteMode {
|
|
@@ -1039,7 +1061,8 @@ declare class Title extends ChartItem {
|
|
|
1039
1061
|
alignBase: AlignBase;
|
|
1040
1062
|
align: Align;
|
|
1041
1063
|
backgroundStyle: SVGStyleOrClass;
|
|
1042
|
-
|
|
1064
|
+
gap: number;
|
|
1065
|
+
textAlign: Align;
|
|
1043
1066
|
isVisible(): boolean;
|
|
1044
1067
|
protected _doLoadSimple(source: any): boolean;
|
|
1045
1068
|
}
|
|
@@ -1053,7 +1076,7 @@ declare class Subtitle extends Title {
|
|
|
1053
1076
|
position: SubtitlePosition;
|
|
1054
1077
|
verticalAlign: VerticalAlign;
|
|
1055
1078
|
text: string;
|
|
1056
|
-
|
|
1079
|
+
titleGap: number;
|
|
1057
1080
|
}
|
|
1058
1081
|
|
|
1059
1082
|
declare abstract class GaugeBase extends Widget {
|
|
@@ -1219,7 +1242,6 @@ declare class GaugeRangeBand extends ChartItem {
|
|
|
1219
1242
|
itemGap: number;
|
|
1220
1243
|
get ranges(): IValueRange[];
|
|
1221
1244
|
set ranges(value: IValueRange[]);
|
|
1222
|
-
rangeInclusive: boolean;
|
|
1223
1245
|
rangeLabel: RangeLabel;
|
|
1224
1246
|
tickLabel: ChartItem;
|
|
1225
1247
|
getThickness(domain: number): number;
|
|
@@ -1382,6 +1404,8 @@ interface IChart {
|
|
|
1382
1404
|
body: Body;
|
|
1383
1405
|
split: Split;
|
|
1384
1406
|
colors: string[];
|
|
1407
|
+
startOfWeek: number;
|
|
1408
|
+
timeOffset: number;
|
|
1385
1409
|
_createChart(config: any): IChart;
|
|
1386
1410
|
assignTemplates(target: any): any;
|
|
1387
1411
|
isGauge(): boolean;
|
|
@@ -1481,6 +1505,7 @@ interface IAxis {
|
|
|
1481
1505
|
getValueAt(length: number, pos: number): number;
|
|
1482
1506
|
getAxisValueAt(length: number, pos: number): any;
|
|
1483
1507
|
getUnitLength(length: number, value: number): number;
|
|
1508
|
+
value2Tooltip(value: number): any;
|
|
1484
1509
|
hasBreak(): boolean;
|
|
1485
1510
|
isBreak(pos: number): boolean;
|
|
1486
1511
|
}
|
|
@@ -1521,6 +1546,8 @@ declare class AxisGuideLabel extends FormattableText {
|
|
|
1521
1546
|
constructor(chart: IChart);
|
|
1522
1547
|
align: Align;
|
|
1523
1548
|
verticalAlign: VerticalAlign;
|
|
1549
|
+
offsetX: number;
|
|
1550
|
+
offsetY: number;
|
|
1524
1551
|
}
|
|
1525
1552
|
declare abstract class AxisGuide extends AxisItem {
|
|
1526
1553
|
constructor(axis: Axis);
|
|
@@ -1533,7 +1560,7 @@ declare abstract class AxisGuide extends AxisItem {
|
|
|
1533
1560
|
}
|
|
1534
1561
|
declare abstract class AxisTick extends AxisItem {
|
|
1535
1562
|
length: number;
|
|
1536
|
-
|
|
1563
|
+
gap: number;
|
|
1537
1564
|
integral: boolean;
|
|
1538
1565
|
showFirst: boolean;
|
|
1539
1566
|
showLast: boolean;
|
|
@@ -1569,7 +1596,6 @@ declare abstract class AxisLabel extends FormattableText {
|
|
|
1569
1596
|
protected _getParamValue(tick: IAxisTick, param: string): any;
|
|
1570
1597
|
getLabelText(tick: IAxisTick): string;
|
|
1571
1598
|
getLabelStyle(tick: IAxisTick): any;
|
|
1572
|
-
getRotation(): number;
|
|
1573
1599
|
}
|
|
1574
1600
|
interface IAxisTick {
|
|
1575
1601
|
index: number;
|
|
@@ -1632,6 +1658,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1632
1658
|
_vlen: number;
|
|
1633
1659
|
_minPad: number;
|
|
1634
1660
|
_maxPad: number;
|
|
1661
|
+
_startAngle: number;
|
|
1635
1662
|
_values: number[];
|
|
1636
1663
|
protected _min: number;
|
|
1637
1664
|
protected _max: number;
|
|
@@ -1665,10 +1692,12 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1665
1692
|
abstract isContinuous(): boolean;
|
|
1666
1693
|
abstract getValueAt(length: number, pos: number): number;
|
|
1667
1694
|
getAxisValueAt(length: number, pos: number): any;
|
|
1695
|
+
startAngle(): number;
|
|
1668
1696
|
protected abstract _createTickModel(): AxisTick;
|
|
1669
1697
|
protected abstract _createLabelModel(): AxisLabel;
|
|
1670
1698
|
protected abstract _doPrepareRender(): void;
|
|
1671
1699
|
protected abstract _doBuildTicks(min: number, max: number, length: number): IAxisTick[];
|
|
1700
|
+
value2Tooltip(value: number): any;
|
|
1672
1701
|
isBased(): boolean;
|
|
1673
1702
|
disconnect(): void;
|
|
1674
1703
|
collectValues(): void;
|
|
@@ -1689,6 +1718,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1689
1718
|
isBreak(pos: number): boolean;
|
|
1690
1719
|
getTickLabelArgs(index: number, value: any): IAxisLabelArgs;
|
|
1691
1720
|
protected _doLoadProp(prop: string, value: any): boolean;
|
|
1721
|
+
protected _getStartAngle(start: number): number;
|
|
1692
1722
|
protected _createGrid(): AxisGrid;
|
|
1693
1723
|
private $_loadGuides;
|
|
1694
1724
|
_connect(series: IPlottingItem): void;
|