realchart 0.9.8 → 0.9.9
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 +65 -16
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/realchart-style.css +98 -80
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ declare abstract class RcControl extends RcWrappableObject {
|
|
|
114
114
|
isTesting(): boolean;
|
|
115
115
|
doc(): Document;
|
|
116
116
|
dom(): HTMLElement;
|
|
117
|
+
svg(): SVGSVGElement;
|
|
117
118
|
width(): number;
|
|
118
119
|
height(): number;
|
|
119
120
|
setData(data: string, value: any, container?: boolean): void;
|
|
@@ -229,7 +230,9 @@ declare class RcElement extends RcObject {
|
|
|
229
230
|
insertElement(doc: Document, tag: string, before: Node): SVGElement;
|
|
230
231
|
getAttr(attr: string): any;
|
|
231
232
|
setAttr(attr: string, value: any): RcElement;
|
|
233
|
+
setAttrEx(attr: string, value: any): RcElement;
|
|
232
234
|
setAttrs(attrs: any): RcElement;
|
|
235
|
+
setAttrsEx(attrs: any): RcElement;
|
|
233
236
|
unsetAttr(attr: string): RcElement;
|
|
234
237
|
setBounds(x: number, y: number, width: number, height: number): RcElement;
|
|
235
238
|
setRect(rect: IRect): RcElement;
|
|
@@ -277,6 +280,8 @@ declare class RcElement extends RcObject {
|
|
|
277
280
|
setClip(cr?: ClipElement | ClipPathElement | string): void;
|
|
278
281
|
setTemporary(): RcElement;
|
|
279
282
|
setCursor(cursor: string): void;
|
|
283
|
+
ignorePointer(): void;
|
|
284
|
+
contains(dom: Element): boolean;
|
|
280
285
|
protected _testing(): boolean;
|
|
281
286
|
protected _doAttached(parent: RcElement): void;
|
|
282
287
|
protected _doDetached(parent: RcElement): void;
|
|
@@ -352,6 +357,7 @@ declare class TextElement extends RcElement {
|
|
|
352
357
|
setStyle(prop: string, value: string): boolean;
|
|
353
358
|
getBBounds(): IRect;
|
|
354
359
|
getBBoundsTest(): IRect;
|
|
360
|
+
stain(): void;
|
|
355
361
|
}
|
|
356
362
|
|
|
357
363
|
type RichTextParamCallback = (target: any, param: string, format: string) => string;
|
|
@@ -396,7 +402,7 @@ declare class ChartItem extends RcObject {
|
|
|
396
402
|
setProp(prop: string, value: any, redraw: boolean): boolean;
|
|
397
403
|
setProps(props: object, redraw: boolean): boolean;
|
|
398
404
|
prepareRender(): void;
|
|
399
|
-
protected _changed(): void;
|
|
405
|
+
protected _changed(tag?: any): void;
|
|
400
406
|
protected _doLoadSimple(source: any): boolean;
|
|
401
407
|
protected _doLoad(source: any): void;
|
|
402
408
|
protected _doLoadProp(prop: string, value: any): boolean;
|
|
@@ -410,7 +416,7 @@ declare enum ChartTextEffect {
|
|
|
410
416
|
}
|
|
411
417
|
declare abstract class ChartText extends ChartItem {
|
|
412
418
|
effect: ChartTextEffect;
|
|
413
|
-
|
|
419
|
+
lightStyle: SVGStyleOrClass;
|
|
414
420
|
darkStyle: SVGStyleOrClass;
|
|
415
421
|
backgroundStyle: SVGStyleOrClass;
|
|
416
422
|
autoContrast: boolean;
|
|
@@ -509,7 +515,7 @@ declare class DataPointCollection {
|
|
|
509
515
|
getProps(prop: string | number): any[];
|
|
510
516
|
getValues(axis: string): any[];
|
|
511
517
|
forEach(callback: (p: DataPoint, i?: number) => any): void;
|
|
512
|
-
getPoints(): DataPoint[];
|
|
518
|
+
getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
|
|
513
519
|
}
|
|
514
520
|
|
|
515
521
|
declare abstract class Widget extends ChartItem {
|
|
@@ -669,6 +675,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
669
675
|
_maxValue: number;
|
|
670
676
|
_referents: Series[];
|
|
671
677
|
_calcedColor: string;
|
|
678
|
+
_simpleMode: boolean;
|
|
672
679
|
private _legendMarker;
|
|
673
680
|
protected _pointArgs: IDataPointCallbackArgs;
|
|
674
681
|
constructor(chart: IChart, name?: string);
|
|
@@ -691,6 +698,7 @@ declare abstract class Series extends ChartItem implements ISeries, ILegendSourc
|
|
|
691
698
|
pointColors: boolean | string[];
|
|
692
699
|
clipped: boolean;
|
|
693
700
|
displayInLegend: boolean;
|
|
701
|
+
displayInNavigator: boolean;
|
|
694
702
|
pointStyleCallback: PointStyleCallback;
|
|
695
703
|
onPointClick: PointClickCallbck;
|
|
696
704
|
contains(p: DataPoint): boolean;
|
|
@@ -1111,7 +1119,7 @@ interface IChart {
|
|
|
1111
1119
|
_getLegendSources(): ILegendSource[];
|
|
1112
1120
|
_visibleChanged(item: ChartItem): void;
|
|
1113
1121
|
_pointVisibleChanged(series: Series, point: DataPoint): void;
|
|
1114
|
-
_modelChanged(item: ChartItem): void;
|
|
1122
|
+
_modelChanged(item: ChartItem, tag?: any): void;
|
|
1115
1123
|
}
|
|
1116
1124
|
|
|
1117
1125
|
declare enum CrosshairType {
|
|
@@ -1140,15 +1148,17 @@ declare class Crosshair extends ChartItem {
|
|
|
1140
1148
|
interface IAxis {
|
|
1141
1149
|
type(): string;
|
|
1142
1150
|
chart: IChart;
|
|
1143
|
-
|
|
1151
|
+
_vlen: number;
|
|
1144
1152
|
_isX: boolean;
|
|
1145
1153
|
_isHorz: boolean;
|
|
1146
1154
|
_isOpposite: boolean;
|
|
1147
1155
|
reversed: boolean;
|
|
1156
|
+
_zoom: IAxisZoom;
|
|
1148
1157
|
isContinuous(): boolean;
|
|
1149
1158
|
getBaseValue(): number;
|
|
1150
1159
|
axisMax(): number;
|
|
1151
1160
|
axisMin(): number;
|
|
1161
|
+
zoom(start: number, end: number): boolean;
|
|
1152
1162
|
getValue(value: any): number;
|
|
1153
1163
|
parseValue(value: any): number;
|
|
1154
1164
|
contains(value: number): boolean;
|
|
@@ -1164,8 +1174,14 @@ declare abstract class AxisItem extends ChartItem {
|
|
|
1164
1174
|
declare class AxisLine extends AxisItem {
|
|
1165
1175
|
constructor(axis: Axis);
|
|
1166
1176
|
}
|
|
1177
|
+
declare enum AxisTitleAlign {
|
|
1178
|
+
START = "start",
|
|
1179
|
+
MIDDLE = "middle",
|
|
1180
|
+
END = "end"
|
|
1181
|
+
}
|
|
1167
1182
|
declare class AxisTitle extends AxisItem {
|
|
1168
1183
|
text: string;
|
|
1184
|
+
align: AxisTitleAlign;
|
|
1169
1185
|
gap: number;
|
|
1170
1186
|
backgroundStyle: SVGStyleOrClass;
|
|
1171
1187
|
isVisible(): boolean;
|
|
@@ -1185,10 +1201,10 @@ declare class AxisGuideLabel extends FormattableText {
|
|
|
1185
1201
|
verticalAlign: VerticalAlign;
|
|
1186
1202
|
}
|
|
1187
1203
|
declare abstract class AxisGuide extends AxisItem {
|
|
1204
|
+
constructor(axis: Axis);
|
|
1188
1205
|
readonly label: AxisGuideLabel;
|
|
1189
1206
|
front: boolean;
|
|
1190
1207
|
zindex: number;
|
|
1191
|
-
constructor(axis: Axis);
|
|
1192
1208
|
}
|
|
1193
1209
|
declare abstract class AxisTick extends AxisItem {
|
|
1194
1210
|
length: number;
|
|
@@ -1225,7 +1241,20 @@ declare enum AxisPosition {
|
|
|
1225
1241
|
}
|
|
1226
1242
|
declare class AxisScrollBar extends AxisItem {
|
|
1227
1243
|
constructor(axis: Axis);
|
|
1228
|
-
|
|
1244
|
+
thickness: number;
|
|
1245
|
+
}
|
|
1246
|
+
interface IAxisZoom {
|
|
1247
|
+
start: number;
|
|
1248
|
+
end: number;
|
|
1249
|
+
}
|
|
1250
|
+
declare class AxisZoom {
|
|
1251
|
+
axis: Axis;
|
|
1252
|
+
private _axixMin;
|
|
1253
|
+
private _axixMax;
|
|
1254
|
+
start: number;
|
|
1255
|
+
end: number;
|
|
1256
|
+
constructor(axis: Axis, start: number, end: number);
|
|
1257
|
+
resize(start: number, end: number): boolean;
|
|
1229
1258
|
}
|
|
1230
1259
|
declare abstract class Axis extends ChartItem implements IAxis {
|
|
1231
1260
|
readonly name: string;
|
|
@@ -1247,11 +1276,14 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1247
1276
|
};
|
|
1248
1277
|
_ticks: IAxisTick[];
|
|
1249
1278
|
_markPoints: number[];
|
|
1250
|
-
|
|
1279
|
+
_vlen: number;
|
|
1251
1280
|
_minPad: number;
|
|
1252
1281
|
_maxPad: number;
|
|
1253
1282
|
_values: number[];
|
|
1254
|
-
|
|
1283
|
+
protected _min: number;
|
|
1284
|
+
protected _max: number;
|
|
1285
|
+
_zoom: AxisZoom;
|
|
1286
|
+
constructor(chart: IChart, isX: boolean, name?: string);
|
|
1255
1287
|
abstract type(): string;
|
|
1256
1288
|
position: AxisPosition;
|
|
1257
1289
|
reversed: boolean;
|
|
@@ -1261,9 +1293,10 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1261
1293
|
marginFar: number;
|
|
1262
1294
|
isEmpty(): boolean;
|
|
1263
1295
|
getBaseValue(): number;
|
|
1296
|
+
length(): number;
|
|
1297
|
+
axisMin(): number;
|
|
1298
|
+
axisMax(): number;
|
|
1264
1299
|
abstract isContinuous(): boolean;
|
|
1265
|
-
abstract axisMin(): number;
|
|
1266
|
-
abstract axisMax(): number;
|
|
1267
1300
|
abstract getValueAt(length: number, pos: number): number;
|
|
1268
1301
|
protected abstract _createTickModel(): AxisTick;
|
|
1269
1302
|
protected abstract _createLabelModel(): AxisLabel;
|
|
@@ -1283,6 +1316,9 @@ declare abstract class Axis extends ChartItem implements IAxis {
|
|
|
1283
1316
|
incStep(value: number, step: any): number;
|
|
1284
1317
|
parseValue(value: any): number;
|
|
1285
1318
|
contains(value: number): boolean;
|
|
1319
|
+
resetZoom(): void;
|
|
1320
|
+
zoom(start: number, end: number): boolean;
|
|
1321
|
+
isZoomed(): boolean;
|
|
1286
1322
|
protected _doLoadProp(prop: string, value: any): boolean;
|
|
1287
1323
|
protected _createGrid(): AxisGrid;
|
|
1288
1324
|
private $_loadGuides;
|
|
@@ -1311,6 +1347,8 @@ declare class AxisCollection {
|
|
|
1311
1347
|
buildTicks(length: number): void;
|
|
1312
1348
|
connect(series: IPlottingItem): Axis;
|
|
1313
1349
|
forEach(callback: (p: Axis, i?: number) => any): void;
|
|
1350
|
+
isZoomed(): boolean;
|
|
1351
|
+
resetZoom(): void;
|
|
1314
1352
|
private $_loadAxis;
|
|
1315
1353
|
}
|
|
1316
1354
|
|
|
@@ -1419,6 +1457,9 @@ declare abstract class RcChartAxis extends RcChartObject {
|
|
|
1419
1457
|
get label(): RcChartObject;
|
|
1420
1458
|
get crosshair(): RcChartObject;
|
|
1421
1459
|
get scrollBar(): RcChartObject;
|
|
1460
|
+
get isEmpty(): boolean;
|
|
1461
|
+
resetZoom(): void;
|
|
1462
|
+
zoom(start: number, end: number): void;
|
|
1422
1463
|
}
|
|
1423
1464
|
declare class RcCategoryAxis extends RcChartAxis {
|
|
1424
1465
|
}
|
|
@@ -1443,7 +1484,9 @@ declare abstract class RcChartSeries extends RcChartObject {
|
|
|
1443
1484
|
}
|
|
1444
1485
|
declare abstract class RcSeriesGroup extends RcChartObject {
|
|
1445
1486
|
}
|
|
1446
|
-
declare class
|
|
1487
|
+
declare abstract class RcLineSeriesBase extends RcChartSeries {
|
|
1488
|
+
}
|
|
1489
|
+
declare class RcLineSeries extends RcLineSeriesBase {
|
|
1447
1490
|
}
|
|
1448
1491
|
declare class RcAreaSeries extends RcChartSeries {
|
|
1449
1492
|
}
|
|
@@ -1540,18 +1583,18 @@ declare class RcCircleGauge extends RcCircularGauge {
|
|
|
1540
1583
|
get hand(): RcChartObject;
|
|
1541
1584
|
get pin(): RcChartObject;
|
|
1542
1585
|
}
|
|
1543
|
-
declare abstract class
|
|
1586
|
+
declare abstract class RcLinearGaugeBase extends RcValueGauge {
|
|
1544
1587
|
private _label;
|
|
1545
1588
|
private _scale;
|
|
1546
1589
|
protected _doInit(proxy: ChartItem): void;
|
|
1547
1590
|
get label(): RcChartObject;
|
|
1548
1591
|
get scale(): RcChartObject;
|
|
1549
1592
|
}
|
|
1550
|
-
declare class RcLinearGauge extends
|
|
1593
|
+
declare class RcLinearGauge extends RcLinearGaugeBase {
|
|
1551
1594
|
private _marker;
|
|
1552
1595
|
private _band;
|
|
1553
1596
|
}
|
|
1554
|
-
declare class RcBulletGauge extends
|
|
1597
|
+
declare class RcBulletGauge extends RcLinearGaugeBase {
|
|
1555
1598
|
}
|
|
1556
1599
|
declare class RcClockGauge extends RcChartGauge {
|
|
1557
1600
|
}
|
|
@@ -1590,6 +1633,12 @@ declare class RcChartControl {
|
|
|
1590
1633
|
get subtitle(): RcSubtitle;
|
|
1591
1634
|
get legend(): RcLegend;
|
|
1592
1635
|
get body(): RcBody;
|
|
1636
|
+
get type(): string;
|
|
1637
|
+
get gaugeType(): string;
|
|
1638
|
+
get inverted(): boolean;
|
|
1639
|
+
set inverted(value: boolean);
|
|
1640
|
+
get polar(): boolean;
|
|
1641
|
+
scroll(axis: RcChartAxis, pos: number): void;
|
|
1593
1642
|
}
|
|
1594
1643
|
|
|
1595
1644
|
declare class Globals {
|
|
@@ -1604,4 +1653,4 @@ declare const setDebugging: typeof Globals.setDebugging;
|
|
|
1604
1653
|
declare const setAnimatable: typeof Globals.setAnimatable;
|
|
1605
1654
|
declare const createChart: typeof Globals.createChart;
|
|
1606
1655
|
|
|
1607
|
-
export { RcAreaRangeSeries, RcAreaSeries, RcAreaSeriesGroup, RcBarRangeSeries, RcBarSeries, RcBarSeriesGroup, RcBellCurveSeries, RcBody, RcBoxPlotSeries, RcBubbleSeries, RcBulletGauge, RcBulletGaugeGroup, RcBumpSeriesGroup, RcCandlestickSeries, RcCategoryAxis, RcChartAxis, RcChartControl, RcChartGauge, RcChartGaugeBase, RcChartObject, RcChartSeries, RcCircleGauge, RcCircleGaugeGroup, RcCircularGauge, RcClockGauge, RcContinuousAxis, RcDumbbellSeries, RcEqualizerSeries, RcFunnelSeries, RcGaugeGroup, RcGaugeRangeBand, RcGaugeScale, RcHeatmapSeries, RcHistogramSeries, RcLegend, RcLineSeries, RcLineSeriesGroup, RcLinearAxis, RcLinearGauge, RcLinearGaugeGroup, RcLinerGaugeBase, RcLogAxis, RcLollipopSeries, RcParetoSeries, RcPieSeries, RcPieSeriesGroup, RcPointLabel, RcScatterSeries, RcSeriesGroup, RcSubtitle, RcTimeAxis, RcTitle, RcTreemapSeries, RcValueGauge, RcVectorSeries, RcWaterfallSeries, createChart, getVersion, setAnimatable, setDebugging };
|
|
1656
|
+
export { RcAreaRangeSeries, RcAreaSeries, RcAreaSeriesGroup, RcBarRangeSeries, RcBarSeries, RcBarSeriesGroup, RcBellCurveSeries, RcBody, RcBoxPlotSeries, RcBubbleSeries, RcBulletGauge, RcBulletGaugeGroup, RcBumpSeriesGroup, RcCandlestickSeries, RcCategoryAxis, RcChartAxis, RcChartControl, RcChartGauge, RcChartGaugeBase, RcChartObject, RcChartSeries, RcCircleGauge, RcCircleGaugeGroup, RcCircularGauge, RcClockGauge, RcContinuousAxis, RcDumbbellSeries, RcEqualizerSeries, RcFunnelSeries, RcGaugeGroup, RcGaugeRangeBand, RcGaugeScale, RcHeatmapSeries, RcHistogramSeries, RcLegend, RcLineSeries, RcLineSeriesGroup, RcLinearAxis, RcLinearGauge, RcLinearGaugeGroup, RcLinearGaugeBase as RcLinerGaugeBase, RcLogAxis, RcLollipopSeries, RcParetoSeries, RcPieSeries, RcPieSeriesGroup, RcPointLabel, RcScatterSeries, RcSeriesGroup, RcSubtitle, RcTimeAxis, RcTitle, RcTreemapSeries, RcValueGauge, RcVectorSeries, RcWaterfallSeries, createChart, getVersion, setAnimatable, setDebugging };
|