realchart 1.1.8 → 1.1.11

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
@@ -254,6 +254,11 @@ interface SVGStyles {
254
254
  * {@page config.seires.bar 'bar'} 시리즈의 데이터포인트 bar의 모서리를 지정하는 데 사용된다.
255
255
  */
256
256
  rx?: string;
257
+ /**
258
+ * **SVG에 적용되는 정식 css style 속성이 아니다.**<br/>
259
+ * 데이터포인트 라벨등 몇 요소의 배경 간격 설정으로 사용할 수 있다.
260
+ */
261
+ padding?: string;
257
262
  /**
258
263
  * 텍스트 정렬을 지정한다.<br/>
259
264
  * **SVG에 적용되는 정식 css style 속성이 아니다.**
@@ -867,6 +872,57 @@ declare const AnnotationTypes: {
867
872
  type AnnotationType = typeof AnnotationTypes[keyof typeof AnnotationTypes];
868
873
  type AnnotationOptionsType = ImageAnnotationOptions | ShapeAnnotationOptions | TextAnnotationOptions;
869
874
 
875
+ /**
876
+ * 차트 내보내기 설정 모델
877
+ * @config chart.exporting
878
+ */
879
+ interface ExporterOptions extends ChartItemOptions {
880
+ /**
881
+ * 내보내기 버튼 표시 여부 지정
882
+ */
883
+ visible?: boolean;
884
+ /**
885
+ * 내보내기 버튼을 사용해 내보낸 차트에 사용할 확장자 없는 파일 이름.\
886
+ * 'export' 함수를 호출할 때 fileName을 지정하지 않을 경우 이 속성이 적용된다.
887
+ * fileName을 지정하지 않을 경우 realchart.type으로 다운로드 된다.
888
+ *
889
+ */
890
+ fileName?: string;
891
+ /**
892
+ * 내보내기를 라이브러리를 사용하여 진행할지 여부 지정
893
+ */
894
+ useLibrary?: boolean;
895
+ /**
896
+ * 내보내기 메뉴에 포함할 export types
897
+ */
898
+ menus?: ExportType[];
899
+ /**
900
+ * 너비, 지정한 너비에 맞춰 높이가 결정된다.
901
+ */
902
+ width?: number;
903
+ /**
904
+ * 이미지의 scale
905
+ */
906
+ scale?: number;
907
+ /**
908
+ * 내보내기 도중 에러가 발생했을 때 처리할 서버 URL.\
909
+ * 지정하지 않을경우 realchart 서버에서 처리한다.
910
+ */
911
+ url?: string;
912
+ /**
913
+ * true로 지정하면 내보내기 결과에 {@page config.axis.scrollBar AxisScrollBarOptions}가 포함되지 않는다.
914
+ */
915
+ hideScrollbar?: boolean;
916
+ /**
917
+ * true로 지정하면 내보내기 결과에 {@page config.seriesNavigator SeriesNavigator}가 포함되지 않는다.
918
+ */
919
+ hideNavigator?: boolean;
920
+ /**
921
+ * true로 지정하면 내보내기 결과에 {@page config.body.zoomButton ZoomButtonOptions}가 포함되지 않는다.
922
+ */
923
+ hideZoomButton?: boolean;
924
+ }
925
+
870
926
  /**
871
927
  * @enum
872
928
  */
@@ -901,6 +957,15 @@ interface ExportOptions {
901
957
  */
902
958
  fileName?: string;
903
959
  }
960
+ /**
961
+ * 외부 모듈로 구현되는 차트 내보내기 기능 명세.
962
+ */
963
+ interface ChartExporter {
964
+ exportToImage: (dom: HTMLElement, options: ExportOptions, config: ExporterOptions) => void;
965
+ exportToPrint: (dom: HTMLElement, options: ExportOptions) => void;
966
+ isContextMenuVisible: () => boolean;
967
+ toggleContextMenu: () => void;
968
+ }
904
969
 
905
970
  interface IRect {
906
971
  x: number;
@@ -1110,6 +1175,7 @@ declare class RcElement extends RcObject {
1110
1175
  trans(x: number, y: number): RcElement;
1111
1176
  transp(p: Point): RcElement;
1112
1177
  transEx(x: number, y: number, duration?: number, invalidate?: boolean): RcElement;
1178
+ transEx2(x: number, y: number, duration?: number, invalidate?: boolean): RcElement;
1113
1179
  transX(x: number): RcElement;
1114
1180
  transY(y: number): RcElement;
1115
1181
  /**
@@ -1317,6 +1383,10 @@ interface DataPointLabelOptions extends IconedTextOptions {
1317
1383
  *
1318
1384
  */
1319
1385
  textField?: string;
1386
+ /**
1387
+ * polar일때 true로 지정할 경우 각도에 따라 자동으로 회전 시킨다.
1388
+ */
1389
+ autoRotation?: boolean;
1320
1390
  /**
1321
1391
  * 계산되는 기본 text 대신, data point label로 표시될 text 리턴.<br/>
1322
1392
  * undefined나 null을 리턴하면 {@page textField} 등을 사용한 기존에 표시될 텍스트를 사용한다.
@@ -3114,7 +3184,7 @@ interface PieSeriesLabelOptions extends DataPointLabelOptions {
3114
3184
  * @override
3115
3185
  * @default true
3116
3186
  */
3117
- visible: boolean;
3187
+ visible?: boolean;
3118
3188
  }
3119
3189
  declare const PieSeriesType = "pie";
3120
3190
  /**
@@ -5295,6 +5365,21 @@ declare abstract class Series<OP extends SeriesOptions = SeriesOptions> extends
5295
5365
  * 시리즈에 설정된 데이터포인트들 중 표시 중인 것들의 개수.<br/>
5296
5366
  */
5297
5367
  get visiblePointCount(): number;
5368
+ /**
5369
+ * 시리즈에 설정된 데이터포인트들 중 표시 중인 것들의 목록.<br/>
5370
+ */
5371
+ get visiblePoints(): DataPoint[];
5372
+ /**
5373
+ * polar가 적용 가능한 시리즈 인지.
5374
+ */
5375
+ get canPolar(): boolean;
5376
+ /**
5377
+ * 시리즈에 설정된 데이터포인트들 중 표시 중인 index번째 포인트 객체.<br/>
5378
+ *
5379
+ * @param index
5380
+ * @returns
5381
+ */
5382
+ getVisiblePoint(index: number): DataPoint;
5298
5383
  contains(p: DataPoint): boolean;
5299
5384
  getPoints(): DataPointCollection;
5300
5385
  _getLabeledPoints(): DataPoint[];
@@ -6474,7 +6559,7 @@ interface AxisLineOptions extends AxisItemOptions {
6474
6559
  *
6475
6560
  * @default undefined
6476
6561
  */
6477
- visible: boolean;
6562
+ visible?: boolean;
6478
6563
  }
6479
6564
  /**
6480
6565
  * 부채꼴 polar 좌표계의 X 축일 때 원호의 양 끝과 중심에 연결되는 선분들의 설정모델.<br/>
@@ -6680,11 +6765,12 @@ interface AxisLabelOptions extends IconedTextOptions {
6680
6765
  */
6681
6766
  maxRows?: number;
6682
6767
  /**
6683
- * 수평 축일 때, tick label 표시 회전 각도.<br/>
6684
- * -90 ~ 90 사이의 각도로 지정할 수 있다.
6685
- *
6768
+ * {@page chart.polar}가 아닌 수평 축일 때, tick label 표시 회전 각도.<br/>
6769
+ * -90 ~ 90 사이의 각도로 지정할 수 있다.<br/>
6770
+ * **'auto'**이면 polar일때는 label위치에 따라 각도가 자동으로 계산되고,
6771
+ * polar가 아닐때는 {@page AxisLabelArrange}속성에 따라 결정된다.
6686
6772
  */
6687
- rotation?: number;
6773
+ rotation?: number | 'auto';
6688
6774
  /**
6689
6775
  * 기본 설정이나 {@page step}, {@page rows}, {@page rotation} 속성들을 명시적으로 설정한 경우에도
6690
6776
  * label들이 본래 차지하는 공간을 초과할 때,
@@ -6975,7 +7061,7 @@ interface CrosshairOptions extends ChartItemOptions {
6975
7061
  * @override
6976
7062
  * @default false
6977
7063
  */
6978
- visible: boolean;
7064
+ visible?: boolean;
6979
7065
  /**
6980
7066
  * 축 상에 crosshair의 정보를 표시하는 view.
6981
7067
  *
@@ -7605,7 +7691,7 @@ interface TimeAxisTickOptions extends ContinuousAxisTickOptions {
7605
7691
  * @append
7606
7692
  * 단위가 지정된 문자열로 지정하는 경우 값이 -1 이하이거나 1 이상이어야 한다. // #141
7607
7693
  */
7608
- stepInterval: number;
7694
+ stepInterval?: number;
7609
7695
  }
7610
7696
  declare const TimeAxisType = "time";
7611
7697
  /**
@@ -7629,57 +7715,6 @@ interface TimeAxisOptions extends ContinuousAxisOptions {
7629
7715
  }
7630
7716
  type AxisOptionsType = CategoryAxisOptions | LinearAxisOptions | LogAxisOptions | TimeAxisOptions;
7631
7717
 
7632
- /**
7633
- * 차트 내보내기 설정 모델
7634
- * @config chart.exporting
7635
- */
7636
- interface ExporterOptions extends ChartItemOptions {
7637
- /**
7638
- * 내보내기 버튼 표시 여부 지정
7639
- */
7640
- visible?: boolean;
7641
- /**
7642
- * 내보내기 버튼을 사용해 내보낸 차트에 사용할 확장자 없는 파일 이름.\
7643
- * 'export' 함수를 호출할 때 fileName을 지정하지 않을 경우 이 속성이 적용된다.
7644
- * fileName을 지정하지 않을 경우 realchart.type으로 다운로드 된다.
7645
- *
7646
- */
7647
- fileName?: string;
7648
- /**
7649
- * 내보내기를 라이브러리를 사용하여 진행할지 여부 지정
7650
- */
7651
- useLibrary?: boolean;
7652
- /**
7653
- * 내보내기 메뉴에 포함할 export types
7654
- */
7655
- menus?: ExportType[];
7656
- /**
7657
- * 너비, 지정한 너비에 맞춰 높이가 결정된다.
7658
- */
7659
- width?: number;
7660
- /**
7661
- * 이미지의 scale
7662
- */
7663
- scale?: number;
7664
- /**
7665
- * 내보내기 도중 에러가 발생했을 때 처리할 서버 URL.\
7666
- * 지정하지 않을경우 realchart 서버에서 처리한다.
7667
- */
7668
- url?: string;
7669
- /**
7670
- * true로 지정하면 내보내기 결과에 {@page config.axis.scrollBar AxisScrollBarOptions}가 포함되지 않는다.
7671
- */
7672
- hideScrollbar?: boolean;
7673
- /**
7674
- * true로 지정하면 내보내기 결과에 {@page config.seriesNavigator SeriesNavigator}가 포함되지 않는다.
7675
- */
7676
- hideNavigator?: boolean;
7677
- /**
7678
- * true로 지정하면 내보내기 결과에 {@page config.body.zoomButton ZoomButtonOptions}가 포함되지 않는다.
7679
- */
7680
- hideZoomButton?: boolean;
7681
- }
7682
-
7683
7718
  /**
7684
7719
  * 단일 값을 다양한 방식으로 표시한다.<br/>
7685
7720
  * 또, 단일 계이지들을 여러 개 묶어서 관련된 값을 표시할 수도 있다.
@@ -9380,6 +9415,13 @@ declare class Body<OP extends BodyOptions = BodyOptions> extends ChartItem<OP> i
9380
9415
  */
9381
9416
  declare class Exporter extends ChartItem<ExporterOptions> {
9382
9417
  static defaults: ExporterOptions;
9418
+ private _module;
9419
+ private _isCompose;
9420
+ isCompose(): boolean;
9421
+ compose(exporter: ChartExporter): void;
9422
+ isContextMenuVisible(): boolean;
9423
+ toggleContextMenu(): void;
9424
+ exportToImage(dom: any, options: any, exporting: any): void;
9383
9425
  }
9384
9426
 
9385
9427
  declare class NavigiatorHandle extends ChartItem<NavigiatorHandleOptions> {
@@ -10779,6 +10821,7 @@ declare class LineSeries<OP extends LineSeriesOptions = LineSeriesOptions> exten
10779
10821
  get flag(): LineSeriesFlag;
10780
10822
  backDir(): LineStepDirection;
10781
10823
  isMarker(): boolean;
10824
+ get canPolar(): boolean;
10782
10825
  getLineType(): LineType;
10783
10826
  getBaseValue(axis: IAxis): number;
10784
10827
  protected _doPrepareRender(): void;
@@ -10792,6 +10835,7 @@ declare class LineSeries<OP extends LineSeriesOptions = LineSeriesOptions> exten
10792
10835
  */
10793
10836
  declare class SplineSeries extends LineSeries<SplineSeriesOptions> {
10794
10837
  static readonly type = "spline";
10838
+ get canPolar(): boolean;
10795
10839
  _viewType(): string;
10796
10840
  getLineType(): LineType;
10797
10841
  }
@@ -10899,6 +10943,7 @@ declare abstract class BarSeriesBase<OP extends BarSeriesBaseOptions = BarSeries
10899
10943
  declare class BarSeries extends BarSeriesBase<BarSeriesOptions> {
10900
10944
  static readonly type = "bar";
10901
10945
  protected _createLegendMarker(doc: Document, size: number): RcElement;
10946
+ get canPolar(): boolean;
10902
10947
  }
10903
10948
  /**
10904
10949
  * {@page BarSeries}, {@page CircleBarSeires}의 그룹 기반 모델.
@@ -11028,6 +11073,7 @@ declare class BubbleSeries extends MarkerSeries<BubbleSeriesOptions> {
11028
11073
  protected _doApply(options: BubbleSeriesOptions): void;
11029
11074
  protected _createPoint(source: any): DataPoint;
11030
11075
  protected _getNoClip(polar: boolean): boolean;
11076
+ get canPolar(): boolean;
11031
11077
  hasZ(): boolean;
11032
11078
  _colorByPoint(): boolean;
11033
11079
  protected _doPrepareRender(): void;
@@ -11388,6 +11434,7 @@ declare class ScatterSeries extends MarkerSeries<ScatterSeriesOptions> {
11388
11434
  * rendering 시점에 chart가 series별로 기본 shape를 지정한다.
11389
11435
  */
11390
11436
  setShape(shape: Shape): void;
11437
+ get canPolar(): boolean;
11391
11438
  getShape(p: ScatterSeriesPoint): Shape;
11392
11439
  hasShape(): boolean;
11393
11440
  legendMarker(doc: Document, size: number): RcElement;