realchart 0.9.36 → 0.9.38

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 CHANGED
@@ -361,7 +361,7 @@ declare class RcElement extends RcObject {
361
361
  transEx(x: number, y: number, duration?: number, invalidate?: boolean): RcElement;
362
362
  transX(x: number): RcElement;
363
363
  transY(y: number): RcElement;
364
- resize(width: number, height: number, attr?: boolean): RcElement;
364
+ resize(width: number, height: number, attr?: boolean): boolean;
365
365
  appendDom(dom: Node): Node;
366
366
  insertDom(dom: Node, before: Node): Node;
367
367
  clearDom(): void;
@@ -415,7 +415,7 @@ declare class ClipRectElement extends ClipElement {
415
415
  private _rect;
416
416
  constructor(doc: Document, x?: number, y?: number, width?: number, height?: number, rx?: number, ry?: number);
417
417
  setBounds(x: number, y: number, w: number, h: number): RcElement;
418
- resize(width: number, height: number, attr?: boolean): RcElement;
418
+ resize(width: number, height: number, attr?: boolean): boolean;
419
419
  get x(): number;
420
420
  set x(value: number);
421
421
  get y(): number;
@@ -750,28 +750,6 @@ declare class Body extends ChartItem {
750
750
  private $_loadAnnotations;
751
751
  }
752
752
 
753
- type RcAnimationEndHandler = (ani: RcAnimation) => void;
754
- declare abstract class RcAnimation {
755
- static readonly DURATION = 700;
756
- static readonly SHORT_DURATION = 300;
757
- delay: number;
758
- duration: number;
759
- easing: string;
760
- endHandler: RcAnimationEndHandler;
761
- private _easing;
762
- private _started;
763
- private _timer;
764
- private _handler;
765
- start(endHandler?: RcAnimationEndHandler): RcAnimation;
766
- stop(): void;
767
- protected _start(duration: number, delay?: number, easing?: string): void;
768
- protected _stop(): void;
769
- protected _doStart(): void;
770
- protected _doStop(): void;
771
- protected _canUpdate(): boolean;
772
- protected abstract _doUpdate(rate: number): boolean;
773
- }
774
-
775
753
  declare enum Shape {
776
754
  CIRCLE = "circle",
777
755
  DIAMOND = "diamond",
@@ -1044,6 +1022,7 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1044
1022
  private _pointLabelCallback;
1045
1023
  protected _pointArgs: IDataPointCallbackArgs;
1046
1024
  private _argsPoint;
1025
+ _pointsChanged: boolean;
1047
1026
  constructor(chart: IChart, name?: string);
1048
1027
  protected _initProps(): void;
1049
1028
  protected _createLabel(chart: IChart): DataPointLabel;
@@ -1146,15 +1125,18 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1146
1125
  isPointLabelsVisible(): boolean;
1147
1126
  isPointLabelVisible(p: DataPoint): boolean;
1148
1127
  getPointAt(xValue: number | string | object): DataPoint;
1149
- setValueAt(p: DataPoint, yValue: number, animate: boolean): boolean;
1128
+ updatePoint(p: DataPoint, props: any): boolean;
1150
1129
  findPoint(keys: any): DataPoint;
1151
1130
  updateData(data: any): void;
1152
- addPoint(source: any, animate: boolean): DataPoint;
1131
+ addPoint(source: any): DataPoint;
1132
+ addPoints(source: any[]): DataPoint[];
1153
1133
  removePoint(p: DataPoint): boolean;
1134
+ removePoints(pts: DataPoint[]): number;
1154
1135
  protected _createPoint(source: any): DataPoint;
1155
1136
  private $_addPoint;
1156
1137
  protected _doAddPoint(source: any): DataPoint;
1157
1138
  protected _doPointRemoved(point: DataPoint): void;
1139
+ protected _doPointsRemoved(points: DataPoint[]): void;
1158
1140
  protected _createLegendMarker(doc: Document, size: number): RcElement;
1159
1141
  _referOtherSeries(series: Series): boolean;
1160
1142
  _colorByPoint(): boolean;
@@ -1304,13 +1286,13 @@ declare class DataPoint {
1304
1286
  range: IValueRange;
1305
1287
  zValue: number;
1306
1288
  yLabel: any;
1307
- ani: RcAnimation;
1308
- yPrev: number;
1309
- yNew: number;
1289
+ _prev: any;
1290
+ _vr: number;
1310
1291
  constructor(source: any);
1311
1292
  ariaHint(): string;
1312
1293
  labelCount(): number;
1313
1294
  getValue(): number;
1295
+ copy(): any;
1314
1296
  proxy(): any;
1315
1297
  assignTo(proxy?: any): any;
1316
1298
  getProp(fld: string | number): any;
@@ -1318,13 +1300,16 @@ declare class DataPoint {
1318
1300
  getLabelValue(index: number): any;
1319
1301
  swap(): void;
1320
1302
  getTooltipPos(): IPoint;
1321
- updateValue(value: number, animation: RcAnimation): void;
1322
- cleanValue(): void;
1303
+ updateValues(series: ISeries, values: any): any;
1323
1304
  getTooltip(param: string): any;
1305
+ initValues(): void;
1306
+ initPrev(axis: IAxis, prev: any): void;
1307
+ applyValueRate(prev: any, vr: number): void;
1324
1308
  protected _assignTo(proxy: any): any;
1325
1309
  protected _readArray(series: ISeries, v: any[]): void;
1326
1310
  protected _readObject(series: ISeries, v: any): void;
1327
1311
  protected _readSingle(v: any): void;
1312
+ protected _valuesChangd(): boolean;
1328
1313
  }
1329
1314
  declare class DataPointCollection {
1330
1315
  protected _owner: ISeries;
@@ -1463,7 +1448,7 @@ declare abstract class ValueGauge extends Gauge {
1463
1448
  maxValue: number;
1464
1449
  value: number;
1465
1450
  animatable: boolean;
1466
- updateValue(value: any, animate: boolean): void;
1451
+ updateValue(value: any): void;
1467
1452
  getLabel(label: GaugeLabel, value: number): string;
1468
1453
  getParam(param: string): any;
1469
1454
  calcedMinMax(): IMinMax;
@@ -1762,6 +1747,7 @@ declare abstract class AxisTick extends AxisItem {
1762
1747
  length: number;
1763
1748
  gap: number;
1764
1749
  constructor(axis: Axis);
1750
+ canUseNumSymbols(): boolean;
1765
1751
  protected _doLoadSimple(source: any): boolean;
1766
1752
  }
1767
1753
  declare enum AxisLabelArrange {
@@ -1878,6 +1864,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1878
1864
  _prevSeries: IPlottingItem[];
1879
1865
  _seriesChanged: boolean;
1880
1866
  _prevRate: number;
1867
+ _animating(): boolean;
1881
1868
  constructor(chart: IChart, isX: boolean, name?: string);
1882
1869
  abstract _type(): string;
1883
1870
  readonly name: string;
@@ -1949,7 +1936,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1949
1936
  getTickLabelArgs(index: number, value: any): IAxisLabelArgs;
1950
1937
  getXValue(value: number): any;
1951
1938
  setPrevRate(rate: number): void;
1952
- prev(len: number): number;
1939
+ prev(pos: number): number;
1953
1940
  abstract xValueAt(pos: number): number;
1954
1941
  protected _doLoadProp(prop: string, value: any): boolean;
1955
1942
  protected _setMinMax(min: number, max: number): void;
@@ -2068,18 +2055,18 @@ declare class RcChartSeries extends RcNamedObject {
2068
2055
  get visiblePointCount(): number;
2069
2056
  getPointAt(xValue: number | string): IRcDataPoint;
2070
2057
  findPoint(keys: any): IRcDataPoint;
2071
- getValueAt(xValue: number | string | IRcDataPoint): number;
2072
- setValueAt(xValue: number | string | IRcDataPoint, value: number, animate?: boolean): boolean;
2073
- addPoint(source: any, animate?: boolean): IRcDataPoint;
2058
+ getValueAt(xValue: number | string | IRcDataPoint, prop?: string): number;
2059
+ updatePoint(xValue: number | string | IRcDataPoint, values: any): boolean;
2060
+ addPoint(source: any): IRcDataPoint;
2074
2061
  removePoint(xValue: number | string | IRcDataPoint): boolean;
2075
2062
  addPoints(source: any[]): IRcDataPoint[];
2076
- removePoints(point: IRcDataPoint[]): void;
2063
+ removePoints(xValues: (number | string | IRcDataPoint)[]): number;
2077
2064
  updateData(data: any): void;
2078
2065
  }
2079
2066
  declare class RcSeriesGroup extends RcNamedObject {
2080
2067
  }
2081
2068
  declare class RcChartGauge extends RcNamedObject {
2082
- setValue(value: any, animate?: boolean): void;
2069
+ setValue(value: any): void;
2083
2070
  }
2084
2071
  declare abstract class RcGaugeGroup extends RcNamedObject {
2085
2072
  }
@@ -2095,12 +2082,17 @@ declare class RcLegend extends RcChartObject {
2095
2082
  declare class RcBody extends RcChartObject {
2096
2083
  }
2097
2084
 
2085
+ declare enum ImageType {
2086
+ PNG = "png",
2087
+ JPEG = "jpeg"
2088
+ }
2098
2089
  declare class RcChartControl {
2099
2090
  private $_p;
2100
2091
  private _objects;
2101
2092
  private _proxy;
2102
2093
  private _exporter;
2103
2094
  private constructor();
2095
+ destroy(): void;
2104
2096
  load(config: any, animate?: boolean, callback?: () => void): void;
2105
2097
  render(now?: boolean): void;
2106
2098
  get xAxis(): RcChartAxis;
@@ -2124,6 +2116,7 @@ declare class RcChartControl {
2124
2116
  setParam(param: string, value: any, redraw?: boolean): void;
2125
2117
  addSeries(source: any, animate?: boolean): RcChartSeries | undefined;
2126
2118
  removeSeries(series: string | RcChartSeries, animate?: boolean): RcChartSeries | undefined;
2119
+ exportImage(type?: ImageType): void;
2127
2120
  }
2128
2121
 
2129
2122
  declare class RcChartData {