realchart 0.9.30 → 0.9.32

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
@@ -127,7 +127,7 @@ interface ISides {
127
127
  }
128
128
  declare enum AlignBase {
129
129
  CHART = "chart",
130
- PLOT = "plot",
130
+ BODY = "body",
131
131
  PARENT = "parent"
132
132
  }
133
133
  interface IValueRange {
@@ -384,7 +384,7 @@ declare class RcElement extends RcObject {
384
384
  setColor(color: string): void;
385
385
  setFill(color: string): void;
386
386
  setStroke(color: string): void;
387
- setTransparent(): void;
387
+ setTransparent(important: boolean): void;
388
388
  textAlign(): Align;
389
389
  setData(data: string, value?: string): void;
390
390
  unsetData(data: string): void;
@@ -747,6 +747,7 @@ declare class DataPoint {
747
747
  getTooltipPos(): IPoint;
748
748
  updateValue(value: number, animation: RcAnimation): void;
749
749
  cleanValue(): void;
750
+ getTooltip(param: string): any;
750
751
  protected _assignTo(proxy: any): any;
751
752
  protected _readArray(series: ISeries, v: any[]): void;
752
753
  protected _readObject(series: ISeries, v: any): void;
@@ -929,6 +930,7 @@ interface ISeries extends IPlottingItem {
929
930
  yField: string | number | Function;
930
931
  _xFielder: (src: any) => any;
931
932
  _yFielder: (src: any) => any;
933
+ _zFielder: (src: any) => any;
932
934
  _colorFielder: (src: any) => any;
933
935
  colorField: string | number;
934
936
  color: string;
@@ -972,6 +974,7 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
972
974
  _yAxisObj: IAxis;
973
975
  _xFielder: (src: any) => any;
974
976
  _yFielder: (src: any) => any;
977
+ _zFielder: (src: any) => any;
975
978
  _colorFielder: (src: any) => any;
976
979
  _dataDirty: boolean;
977
980
  _cdata: ChartData;
@@ -1017,6 +1020,7 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1017
1020
  yAxis: string | number;
1018
1021
  xField: string | number;
1019
1022
  yField: string | number | Function;
1023
+ zField: string | number | Function;
1020
1024
  colorField: string;
1021
1025
  get data(): any;
1022
1026
  set data(value: any);
@@ -1104,7 +1108,7 @@ declare abstract class Series extends ChartItem implements ISeries, IChartDataLi
1104
1108
  protected _createLegendMarker(doc: Document, size: number): RcElement;
1105
1109
  _referOtherSeries(series: Series): boolean;
1106
1110
  _colorByPoint(): boolean;
1107
- protected _createFilder(f: any): (v: any) => any;
1111
+ protected _createFielder(f: any): (v: any) => any;
1108
1112
  protected _createFielders(): void;
1109
1113
  protected _doLoad(src: any): void;
1110
1114
  protected _doLoadData(src: any): any[];
@@ -1142,6 +1146,9 @@ declare class PlottingItemCollection {
1142
1146
  seriesByPoint(point: DataPoint): Series;
1143
1147
  getLegendSources(): ILegendSource[];
1144
1148
  load(src: any): void;
1149
+ private $_add;
1150
+ add(source: any): Series;
1151
+ remove(series: string | Series): Series;
1145
1152
  updateData(values: any[]): void;
1146
1153
  prepareRender(): void;
1147
1154
  prepareAfter(): void;
@@ -1209,6 +1216,7 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
1209
1216
  canMaxPadding(axis: IAxis, max: number): boolean;
1210
1217
  getVisPoints(p: DataPoint): DataPoint[];
1211
1218
  seriesChanged(): boolean;
1219
+ remove(series: T): boolean;
1212
1220
  getVisiblePoints(): DataPoint[];
1213
1221
  protected _doLoadProp(prop: string, value: any): boolean;
1214
1222
  prepareRender(): void;
@@ -1242,6 +1250,7 @@ declare abstract class Annotation extends ChartItem {
1242
1250
  scope: AnnotationScope;
1243
1251
  series: string;
1244
1252
  loadAnimation: IAnnotationAnimation;
1253
+ backgroundStyle: SVGStyleOrClass;
1245
1254
  getPosition(inverted: boolean, left: number, top: number, wDomain: number, hDomain: number, width: number, height: number): IPoint;
1246
1255
  update(): void;
1247
1256
  protected _doPrepareRender(chart: IChart): void;
@@ -1309,10 +1318,10 @@ declare class Body extends ChartItem {
1309
1318
 
1310
1319
  declare class Title extends ChartItem {
1311
1320
  constructor(chart: IChart);
1312
- verticalAlign: VerticalAlign;
1313
1321
  text: string;
1314
1322
  alignBase: AlignBase;
1315
1323
  align: Align;
1324
+ verticalAlign: VerticalAlign;
1316
1325
  backgroundStyle: SVGStyleOrClass;
1317
1326
  gap: number;
1318
1327
  isVisible(): boolean;
@@ -1325,8 +1334,8 @@ declare enum SubtitlePosition {
1325
1334
  TOP = "top"
1326
1335
  }
1327
1336
  declare class Subtitle extends Title {
1328
- position: SubtitlePosition;
1329
1337
  verticalAlign: VerticalAlign;
1338
+ position: SubtitlePosition;
1330
1339
  text: string;
1331
1340
  titleGap: number;
1332
1341
  }
@@ -1504,7 +1513,7 @@ interface IChart {
1504
1513
  _xPaneAxes: PaneXAxisMatrix;
1505
1514
  _yPaneAxes: PaneYAxisMatrix;
1506
1515
  options: ChartOptions;
1507
- export: ExportOptions;
1516
+ exportOptions: IExportOptions;
1508
1517
  first: IPlottingItem;
1509
1518
  firstSeries: Series;
1510
1519
  xAxis: IAxis;
@@ -1574,17 +1583,21 @@ declare class ChartOptions extends ChartItem {
1574
1583
  }
1575
1584
  declare enum ExportType {
1576
1585
  PNG = "png",
1577
- JPEG = "jpeg"
1578
- }
1579
- declare class ExportOptions extends ChartItem {
1580
- menus: ExportType[];
1581
- fileName: string;
1582
- width: number;
1583
- scale: number;
1584
- url: string;
1585
- hideScrollbar: boolean;
1586
- hideNavigator: boolean;
1587
- hideZoomButton: boolean;
1586
+ JPEG = "jpeg",
1587
+ SVG = "svg",
1588
+ PDF = "pdf",
1589
+ PRINT = "print"
1590
+ }
1591
+ interface IExportOptions {
1592
+ visible?: boolean;
1593
+ menus?: ExportType[];
1594
+ fileName?: string;
1595
+ width?: number;
1596
+ scale?: number;
1597
+ url?: string;
1598
+ hideScrollbar?: boolean;
1599
+ hideNavigator?: boolean;
1600
+ hideZoomButton?: boolean;
1588
1601
  }
1589
1602
 
1590
1603
  declare enum CrosshairType {
@@ -1645,6 +1658,7 @@ interface IAxis {
1645
1658
  getPos(length: number, value: number): number;
1646
1659
  valueAt(length: number, pos: number): number;
1647
1660
  axisValueAt(length: number, pos: number): any;
1661
+ xValueAt(pos: number): number;
1648
1662
  getUnitLen(length: number, value: number): number;
1649
1663
  value2Tooltip(value: number): any;
1650
1664
  hasBreak(): boolean;
@@ -1802,6 +1816,8 @@ declare class AxisZoom {
1802
1816
  isFull(): boolean;
1803
1817
  resize(start: number, end: number, minSize: number): boolean;
1804
1818
  }
1819
+ declare class AxisSectorLine extends AxisLine {
1820
+ }
1805
1821
  declare abstract class Axis extends ChartItem implements IAxis {
1806
1822
  _index: number;
1807
1823
  _row: number;
@@ -1836,8 +1852,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1836
1852
  readonly name: string;
1837
1853
  readonly title: AxisTitle;
1838
1854
  readonly line: AxisLine;
1839
- readonly sectorLine: AxisLine;
1840
- readonly baseLine: AxisLine;
1855
+ readonly sectorLine: AxisSectorLine;
1841
1856
  readonly tick: AxisTick;
1842
1857
  readonly label: AxisLabel;
1843
1858
  readonly grid: AxisGrid;
@@ -1903,6 +1918,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1903
1918
  getXValue(value: number): any;
1904
1919
  setPrevRate(rate: number): void;
1905
1920
  prev(len: number): number;
1921
+ abstract xValueAt(pos: number): number;
1906
1922
  protected _doLoadProp(prop: string, value: any): boolean;
1907
1923
  protected _setMinMax(min: number, max: number): void;
1908
1924
  protected abstract _createGrid(): AxisGrid;
@@ -2051,6 +2067,7 @@ declare class RcChartControl {
2051
2067
  private $_p;
2052
2068
  private _objects;
2053
2069
  private _proxy;
2070
+ private _exporter;
2054
2071
  private constructor();
2055
2072
  load(config: any, animate?: boolean): void;
2056
2073
  render(now?: boolean): void;
@@ -2073,6 +2090,8 @@ declare class RcChartControl {
2073
2090
  get polar(): boolean;
2074
2091
  scroll(axis: RcChartAxis, pos: number): void;
2075
2092
  setParam(param: string, value: any, redraw?: boolean): void;
2093
+ addSeries(source: any, animate?: boolean): RcChartSeries | undefined;
2094
+ removeSeries(series: string | RcChartSeries, animate?: boolean): RcChartSeries | undefined;
2076
2095
  }
2077
2096
 
2078
2097
  declare class RcChartData {
@@ -2124,4 +2143,4 @@ declare const setAnimatable: typeof Globals.setAnimatable;
2124
2143
  declare const createChart: typeof Globals.createChart;
2125
2144
  declare const createData: typeof Globals.createData;
2126
2145
 
2127
- export { RcAnnotation, RcBody, RcChartAxis, RcChartControl, RcChartData, RcChartGauge, RcChartObject, RcChartSeries, RcGaugeGroup, RcLegend, RcSeriesGroup, RcSubtitle, RcTitle, createChart, createData, getVersion, setAnimatable, setDebugging, setLogging };
2146
+ export { RcAnnotation, RcBody, RcChartAxis, RcChartControl, RcChartData, RcChartGauge, RcChartObject, RcChartSeries, RcGaugeGroup, RcLegend, RcNamedObject, RcSeriesGroup, RcSubtitle, RcTitle, createChart, createData, getVersion, setAnimatable, setDebugging, setLogging };