realchart 0.9.35 → 0.9.37

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
@@ -56,7 +56,6 @@ declare class Sides {
56
56
  applyPadding(cs: CSSStyleDeclaration): Sides;
57
57
  applyMargin(cs: CSSStyleDeclaration): Sides;
58
58
  shrink(r: IRect): IRect;
59
- toString(): string;
60
59
  }
61
60
 
62
61
  declare class TextFormatter {
@@ -362,7 +361,7 @@ declare class RcElement extends RcObject {
362
361
  transEx(x: number, y: number, duration?: number, invalidate?: boolean): RcElement;
363
362
  transX(x: number): RcElement;
364
363
  transY(y: number): RcElement;
365
- resize(width: number, height: number, attr?: boolean): RcElement;
364
+ resize(width: number, height: number, attr?: boolean): boolean;
366
365
  appendDom(dom: Node): Node;
367
366
  insertDom(dom: Node, before: Node): Node;
368
367
  clearDom(): void;
@@ -416,7 +415,7 @@ declare class ClipRectElement extends ClipElement {
416
415
  private _rect;
417
416
  constructor(doc: Document, x?: number, y?: number, width?: number, height?: number, rx?: number, ry?: number);
418
417
  setBounds(x: number, y: number, w: number, h: number): RcElement;
419
- resize(width: number, height: number, attr?: boolean): RcElement;
418
+ resize(width: number, height: number, attr?: boolean): boolean;
420
419
  get x(): number;
421
420
  set x(value: number);
422
421
  get y(): number;
@@ -751,28 +750,6 @@ declare class Body extends ChartItem {
751
750
  private $_loadAnnotations;
752
751
  }
753
752
 
754
- type RcAnimationEndHandler = (ani: RcAnimation) => void;
755
- declare abstract class RcAnimation {
756
- static readonly DURATION = 700;
757
- static readonly SHORT_DURATION = 300;
758
- delay: number;
759
- duration: number;
760
- easing: string;
761
- endHandler: RcAnimationEndHandler;
762
- private _easing;
763
- private _started;
764
- private _timer;
765
- private _handler;
766
- start(endHandler?: RcAnimationEndHandler): RcAnimation;
767
- stop(): void;
768
- protected _start(duration: number, delay?: number, easing?: string): void;
769
- protected _stop(): void;
770
- protected _doStart(): void;
771
- protected _doStop(): void;
772
- protected _canUpdate(): boolean;
773
- protected abstract _doUpdate(rate: number): boolean;
774
- }
775
-
776
753
  declare enum Shape {
777
754
  CIRCLE = "circle",
778
755
  DIAMOND = "diamond",
@@ -917,7 +894,7 @@ interface IPlottingItem {
917
894
  getVisiblePoints(): DataPoint[];
918
895
  getLegendSources(list: ILegendSource[]): void;
919
896
  needAxes(): boolean;
920
- isEmpty(): boolean;
897
+ isEmpty(visibleOnly: any): boolean;
921
898
  canCategorized(): boolean;
922
899
  defaultYAxisType(): string;
923
900
  clusterable(): boolean;
@@ -980,7 +957,7 @@ interface ISeries extends IPlottingItem {
980
957
  _zFielder: (src: any) => any;
981
958
  _colorFielder: (src: any) => any;
982
959
  colorField: string | number;
983
- color: string;
960
+ color: string | number;
984
961
  displayName(): string;
985
962
  initPoints(source: any[]): DataPoint[];
986
963
  getPoints(): DataPointCollection;
@@ -1038,12 +1015,14 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1038
1015
  _minZ: number;
1039
1016
  _maxZ: number;
1040
1017
  _referents: Series[];
1018
+ _runColor: string;
1041
1019
  _calcedColor: string;
1042
1020
  _simpleMode: boolean;
1043
1021
  private _legendMarker;
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;
@@ -1074,7 +1053,7 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1074
1053
  xStart: any;
1075
1054
  xStep: number | string;
1076
1055
  pointStyle: SVGStyleOrClass;
1077
- color: string;
1056
+ color: string | number;
1078
1057
  pointColors: string[] | string;
1079
1058
  viewRanges: IValueRange[] | IValueRanges;
1080
1059
  viewRangeValue: 'x' | 'y' | 'z';
@@ -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;
@@ -1184,7 +1166,7 @@ declare class PlottingItemCollection {
1184
1166
  get firstVisible(): IPlottingItem;
1185
1167
  get firstVisibleSeries(): Series;
1186
1168
  isWidget(): boolean;
1187
- isEmpty(): boolean;
1169
+ isEmpty(visibleOnly: boolean): boolean;
1188
1170
  items(): IPlottingItem[];
1189
1171
  internalItems(): IPlottingItem[];
1190
1172
  visibles(): IPlottingItem[];
@@ -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;
@@ -1447,7 +1432,7 @@ declare class GaugeCollection {
1447
1432
  private _visibles;
1448
1433
  private _gauges;
1449
1434
  constructor(chart: IChart);
1450
- isEmpty(): boolean;
1435
+ isEmpty(visibleOnly: boolean): boolean;
1451
1436
  get firstGauge(): Gauge;
1452
1437
  getVisibles(): GaugeBase[];
1453
1438
  getPaneVisibles(row: number, col: number): GaugeBase[];
@@ -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;
@@ -1557,6 +1542,7 @@ interface IChart {
1557
1542
  timeOffset: number;
1558
1543
  _createChart(config: any): IChart;
1559
1544
  assignTemplates(target: any): any;
1545
+ isEmpty(visibleOnly: boolean): boolean;
1560
1546
  isGauge(): boolean;
1561
1547
  isPolar(): boolean;
1562
1548
  isInverted(): boolean;
@@ -1877,6 +1863,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1877
1863
  _prevSeries: IPlottingItem[];
1878
1864
  _seriesChanged: boolean;
1879
1865
  _prevRate: number;
1866
+ _animating(): boolean;
1880
1867
  constructor(chart: IChart, isX: boolean, name?: string);
1881
1868
  abstract _type(): string;
1882
1869
  readonly name: string;
@@ -1904,6 +1891,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1904
1891
  tooltipRow: string;
1905
1892
  tooltipFooter: string;
1906
1893
  animatable: boolean;
1894
+ fixedSize: boolean;
1907
1895
  isEmpty(): boolean;
1908
1896
  getBaseValue(): number;
1909
1897
  length(): number;
@@ -1947,7 +1935,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1947
1935
  getTickLabelArgs(index: number, value: any): IAxisLabelArgs;
1948
1936
  getXValue(value: number): any;
1949
1937
  setPrevRate(rate: number): void;
1950
- prev(len: number): number;
1938
+ prev(pos: number): number;
1951
1939
  abstract xValueAt(pos: number): number;
1952
1940
  protected _doLoadProp(prop: string, value: any): boolean;
1953
1941
  protected _setMinMax(min: number, max: number): void;
@@ -2066,18 +2054,18 @@ declare class RcChartSeries extends RcNamedObject {
2066
2054
  get visiblePointCount(): number;
2067
2055
  getPointAt(xValue: number | string): IRcDataPoint;
2068
2056
  findPoint(keys: any): IRcDataPoint;
2069
- getValueAt(xValue: number | string | IRcDataPoint): number;
2070
- setValueAt(xValue: number | string | IRcDataPoint, value: number, animate?: boolean): boolean;
2071
- addPoint(source: any, animate?: boolean): IRcDataPoint;
2057
+ getValueAt(xValue: number | string | IRcDataPoint, prop?: string): number;
2058
+ updatePoint(xValue: number | string | IRcDataPoint, values: any): boolean;
2059
+ addPoint(source: any): IRcDataPoint;
2072
2060
  removePoint(xValue: number | string | IRcDataPoint): boolean;
2073
2061
  addPoints(source: any[]): IRcDataPoint[];
2074
- removePoints(point: IRcDataPoint[]): void;
2062
+ removePoints(xValues: (number | string | IRcDataPoint)[]): number;
2075
2063
  updateData(data: any): void;
2076
2064
  }
2077
2065
  declare class RcSeriesGroup extends RcNamedObject {
2078
2066
  }
2079
2067
  declare class RcChartGauge extends RcNamedObject {
2080
- setValue(value: any, animate?: boolean): void;
2068
+ setValue(value: any): void;
2081
2069
  }
2082
2070
  declare abstract class RcGaugeGroup extends RcNamedObject {
2083
2071
  }
@@ -2093,12 +2081,17 @@ declare class RcLegend extends RcChartObject {
2093
2081
  declare class RcBody extends RcChartObject {
2094
2082
  }
2095
2083
 
2084
+ declare enum ImageType {
2085
+ PNG = "png",
2086
+ JPEG = "jpeg"
2087
+ }
2096
2088
  declare class RcChartControl {
2097
2089
  private $_p;
2098
2090
  private _objects;
2099
2091
  private _proxy;
2100
2092
  private _exporter;
2101
2093
  private constructor();
2094
+ destroy(): void;
2102
2095
  load(config: any, animate?: boolean, callback?: () => void): void;
2103
2096
  render(now?: boolean): void;
2104
2097
  get xAxis(): RcChartAxis;
@@ -2122,6 +2115,7 @@ declare class RcChartControl {
2122
2115
  setParam(param: string, value: any, redraw?: boolean): void;
2123
2116
  addSeries(source: any, animate?: boolean): RcChartSeries | undefined;
2124
2117
  removeSeries(series: string | RcChartSeries, animate?: boolean): RcChartSeries | undefined;
2118
+ exportImage(type?: ImageType): void;
2125
2119
  }
2126
2120
 
2127
2121
  declare class RcChartData {