realchart 0.9.21 → 0.9.23

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
@@ -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;
@@ -416,10 +417,9 @@ declare class SvgLine {
416
417
  private _words;
417
418
  get words(): Word[];
418
419
  parse(s: string): SvgLine;
419
- getText(target: any, domain: RichTextParamCallback): string;
420
420
  }
421
421
  declare class SvgRichText {
422
- private _format;
422
+ _format: string;
423
423
  lineHeight: number;
424
424
  private _lines;
425
425
  constructor(format?: string);
@@ -516,6 +516,64 @@ declare abstract class Annotation extends ChartItem {
516
516
  getPostion(inverted: boolean, left: number, top: number, wDomain: number, hDomain: number, width: number, height: number): IPoint;
517
517
  }
518
518
 
519
+ declare enum ZoomType {
520
+ NONE = "none",
521
+ X = "x",
522
+ Y = "y",
523
+ BOTH = "both"
524
+ }
525
+ declare class ZoomButton extends ChartItem {
526
+ body: Body;
527
+ constructor(body: Body);
528
+ isVisible(): boolean;
529
+ }
530
+ declare class BodySplit extends ChartItem {
531
+ body: Body;
532
+ constructor(body: Body);
533
+ size: number;
534
+ }
535
+ declare class Body extends ChartItem {
536
+ private _radius;
537
+ private _centerX;
538
+ private _centerY;
539
+ private _annotations;
540
+ private _radiusDim;
541
+ private _cxDim;
542
+ private _cyDim;
543
+ private _rd;
544
+ private _cx;
545
+ private _cy;
546
+ constructor(chart: IChart);
547
+ split: BodySplit;
548
+ get radius(): RtPercentSize;
549
+ set radius(value: RtPercentSize);
550
+ get centerX(): RtPercentSize;
551
+ set centerX(value: RtPercentSize);
552
+ get centerY(): RtPercentSize;
553
+ set centerY(value: RtPercentSize);
554
+ startAngle: number;
555
+ circular: boolean;
556
+ image: BackgroundImage;
557
+ zoomType: ZoomType;
558
+ zoomButton: ZoomButton;
559
+ canZoom(): boolean;
560
+ calcRadius(width: number, height: number): number;
561
+ setPolar(width: number, height: number): Body;
562
+ getStartAngle(): number;
563
+ getPolar(axis: Axis): {
564
+ start: number;
565
+ cx: number;
566
+ cy: number;
567
+ rd: number;
568
+ };
569
+ isZoomed(): boolean;
570
+ '@config annotation': Annotation[];
571
+ getAnnotations(): Annotation[];
572
+ protected _doLoadProp(prop: string, value: any): boolean;
573
+ protected _doPrepareRender(chart: IChart): void;
574
+ private $_loadAnnotations;
575
+ }
576
+
519
577
  declare enum Shape {
520
578
  CIRCLE = "circle",
521
579
  DIAMOND = "diamond",
@@ -532,66 +590,6 @@ declare enum LineType {
532
590
  STEP = "step"
533
591
  }
534
592
 
535
- interface IPointPos {
536
- xPos: number;
537
- yPos: number;
538
- isNull: boolean;
539
- }
540
- declare class DataPoint {
541
- static swap(pts: IPointPos[]): IPointPos[];
542
- index: number;
543
- vindex: number;
544
- x: any;
545
- y: any;
546
- series: string | number;
547
- readonly pid: number;
548
- source: any;
549
- isNull: boolean;
550
- xValue: number;
551
- yValue: number;
552
- yRate: number;
553
- visible: boolean;
554
- color: string;
555
- xPos: number;
556
- yPos: number;
557
- yGroup: number;
558
- drillDown: any[] | object;
559
- range: IValueRange;
560
- zValue: number;
561
- label: any;
562
- constructor(source: any);
563
- get yAbs(): number;
564
- get xAbs(): number;
565
- ariaHint(): string;
566
- labelCount(): number;
567
- assignTo(proxy?: any): any;
568
- getProp(fld: string | number): any;
569
- parse(series: ISeries): void;
570
- getLabel(index: number): any;
571
- getValueOf: (traget: any, param: string) => any;
572
- swap(): void;
573
- protected _assignTo(proxy: any): any;
574
- protected _readArray(series: ISeries, v: any[]): void;
575
- protected _readObject(series: ISeries, v: any): void;
576
- protected _readSingle(v: any): void;
577
- }
578
- declare class DataPointCollection {
579
- protected _owner: ISeries;
580
- private _points;
581
- constructor(owner: ISeries);
582
- get count(): number;
583
- isEmpty(): boolean;
584
- get(index: number): DataPoint;
585
- pointAt(xValue: number): DataPoint;
586
- contains(p: DataPoint): boolean;
587
- load(source: any): void;
588
- getProps(prop: string | number): any[];
589
- getCategories(axis: string): any[];
590
- getProxies(): any[];
591
- forEach(callback: (p: DataPoint, i?: number) => any): void;
592
- getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
593
- }
594
-
595
593
  declare abstract class Widget extends ChartItem {
596
594
  protected _doLoad(source: any): void;
597
595
  protected _doPrepareRender(chart: IChart): void;
@@ -615,8 +613,10 @@ declare class Tooltip extends ChartItem {
615
613
  minWidth: number;
616
614
  minHeight: number;
617
615
  followPointer: boolean;
618
- numberFormat: '#.##';
616
+ numberFormat: string;
617
+ timeFormat: string;
619
618
  getValue(series: Series, point: DataPoint, param: string, format: string): string;
619
+ protected _doLoadSimple(source: any): boolean;
620
620
  }
621
621
 
622
622
  declare enum PointItemPosition {
@@ -969,62 +969,64 @@ declare abstract class SeriesGroup<T extends Series> extends ChartItem implement
969
969
  private $_collectFill;
970
970
  }
971
971
 
972
- declare enum ZoomType {
973
- NONE = "none",
974
- X = "x",
975
- Y = "y",
976
- BOTH = "both"
977
- }
978
- declare class ZoomButton extends ChartItem {
979
- body: Body;
980
- constructor(body: Body);
981
- isVisible(): boolean;
972
+ interface IPointPos {
973
+ xPos: number;
974
+ yPos: number;
975
+ isNull: boolean;
982
976
  }
983
- declare class BodySplit extends ChartItem {
984
- body: Body;
985
- constructor(body: Body);
986
- size: number;
977
+ declare class DataPoint {
978
+ static swap(pts: IPointPos[]): IPointPos[];
979
+ index: number;
980
+ vindex: number;
981
+ x: any;
982
+ y: any;
983
+ series: string | number;
984
+ readonly pid: number;
985
+ source: any;
986
+ isNull: boolean;
987
+ xValue: number;
988
+ yValue: number;
989
+ yRate: number;
990
+ visible: boolean;
991
+ color: string;
992
+ xPos: number;
993
+ yPos: number;
994
+ yGroup: number;
995
+ drillDown: any[] | object;
996
+ range: IValueRange;
997
+ zValue: number;
998
+ label: any;
999
+ constructor(source: any);
1000
+ get yAbs(): number;
1001
+ get xAbs(): number;
1002
+ ariaHint(): string;
1003
+ labelCount(): number;
1004
+ assignTo(proxy?: any): any;
1005
+ getProp(fld: string | number): any;
1006
+ parse(series: ISeries): void;
1007
+ getLabel(index: number): any;
1008
+ getValueOf: (traget: any, param: string) => any;
1009
+ swap(): void;
1010
+ protected _assignTo(proxy: any): any;
1011
+ protected _readArray(series: ISeries, v: any[]): void;
1012
+ protected _readObject(series: ISeries, v: any): void;
1013
+ protected _readSingle(v: any): void;
987
1014
  }
988
- declare class Body extends ChartItem {
989
- private _radius;
990
- private _centerX;
991
- private _centerY;
992
- private _annotations;
993
- private _radiusDim;
994
- private _cxDim;
995
- private _cyDim;
996
- private _rd;
997
- private _cx;
998
- private _cy;
999
- constructor(chart: IChart);
1000
- split: BodySplit;
1001
- get radius(): RtPercentSize;
1002
- set radius(value: RtPercentSize);
1003
- get centerX(): RtPercentSize;
1004
- set centerX(value: RtPercentSize);
1005
- get centerY(): RtPercentSize;
1006
- set centerY(value: RtPercentSize);
1007
- startAngle: number;
1008
- circular: boolean;
1009
- image: BackgroundImage;
1010
- zoomType: ZoomType;
1011
- zoomButton: ZoomButton;
1012
- canZoom(): boolean;
1013
- calcRadius(width: number, height: number): number;
1014
- setPolar(width: number, height: number): Body;
1015
- getStartAngle(): number;
1016
- getPolar(series: Series): {
1017
- start: number;
1018
- cx: number;
1019
- cy: number;
1020
- rd: number;
1021
- };
1022
- isZoomed(): boolean;
1023
- '@config annotation': Annotation[];
1024
- getAnnotations(): Annotation[];
1025
- protected _doLoadProp(prop: string, value: any): boolean;
1026
- protected _doPrepareRender(chart: IChart): void;
1027
- private $_loadAnnotations;
1015
+ declare class DataPointCollection {
1016
+ protected _owner: ISeries;
1017
+ private _points;
1018
+ constructor(owner: ISeries);
1019
+ get count(): number;
1020
+ isEmpty(): boolean;
1021
+ get(index: number): DataPoint;
1022
+ pointAt(xValue: number): DataPoint;
1023
+ contains(p: DataPoint): boolean;
1024
+ load(source: any): void;
1025
+ getProps(prop: string | number): any[];
1026
+ getCategories(axis: string): any[];
1027
+ getProxies(): any[];
1028
+ forEach(callback: (p: DataPoint, i?: number) => any): void;
1029
+ getPoints(xAxis: IAxis, yAxis: IAxis): DataPoint[];
1028
1030
  }
1029
1031
 
1030
1032
  declare enum PaletteMode {
@@ -1220,7 +1222,6 @@ declare class GaugeRangeBand extends ChartItem {
1220
1222
  itemGap: number;
1221
1223
  get ranges(): IValueRange[];
1222
1224
  set ranges(value: IValueRange[]);
1223
- rangeInclusive: boolean;
1224
1225
  rangeLabel: RangeLabel;
1225
1226
  tickLabel: ChartItem;
1226
1227
  getThickness(domain: number): number;
@@ -1383,6 +1384,8 @@ interface IChart {
1383
1384
  body: Body;
1384
1385
  split: Split;
1385
1386
  colors: string[];
1387
+ startOfWeek: number;
1388
+ timeOffset: number;
1386
1389
  _createChart(config: any): IChart;
1387
1390
  assignTemplates(target: any): any;
1388
1391
  isGauge(): boolean;
@@ -1482,6 +1485,7 @@ interface IAxis {
1482
1485
  getValueAt(length: number, pos: number): number;
1483
1486
  getAxisValueAt(length: number, pos: number): any;
1484
1487
  getUnitLength(length: number, value: number): number;
1488
+ value2Tooltip(value: number): any;
1485
1489
  hasBreak(): boolean;
1486
1490
  isBreak(pos: number): boolean;
1487
1491
  }
@@ -1633,6 +1637,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1633
1637
  _vlen: number;
1634
1638
  _minPad: number;
1635
1639
  _maxPad: number;
1640
+ _startAngle: number;
1636
1641
  _values: number[];
1637
1642
  protected _min: number;
1638
1643
  protected _max: number;
@@ -1666,10 +1671,12 @@ declare abstract class Axis extends ChartItem implements IAxis {
1666
1671
  abstract isContinuous(): boolean;
1667
1672
  abstract getValueAt(length: number, pos: number): number;
1668
1673
  getAxisValueAt(length: number, pos: number): any;
1674
+ startAngle(): number;
1669
1675
  protected abstract _createTickModel(): AxisTick;
1670
1676
  protected abstract _createLabelModel(): AxisLabel;
1671
1677
  protected abstract _doPrepareRender(): void;
1672
1678
  protected abstract _doBuildTicks(min: number, max: number, length: number): IAxisTick[];
1679
+ value2Tooltip(value: number): any;
1673
1680
  isBased(): boolean;
1674
1681
  disconnect(): void;
1675
1682
  collectValues(): void;
@@ -1690,6 +1697,7 @@ declare abstract class Axis extends ChartItem implements IAxis {
1690
1697
  isBreak(pos: number): boolean;
1691
1698
  getTickLabelArgs(index: number, value: any): IAxisLabelArgs;
1692
1699
  protected _doLoadProp(prop: string, value: any): boolean;
1700
+ protected _getStartAngle(start: number): number;
1693
1701
  protected _createGrid(): AxisGrid;
1694
1702
  private $_loadGuides;
1695
1703
  _connect(series: IPlottingItem): void;