stz-chart-maker 1.6.4 → 1.6.6
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 +65 -6
- package/dist/index.js +3386 -3307
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -639,13 +639,13 @@ declare abstract class ChartWrapper<TType extends ChartType, TOptions extends Cu
|
|
|
639
639
|
protected abstract configAop(config: any): any;
|
|
640
640
|
abstract build(id?: string): ChartConfig;
|
|
641
641
|
/**
|
|
642
|
-
* @description 플러그인을 추가합니다.
|
|
643
|
-
* @param plugin
|
|
642
|
+
* @description 플러그인을 추가합니다. 단일 플러그인 또는 플러그인 배열을 받을 수 있습니다.
|
|
643
|
+
* @param plugin - 단일 플러그인 또는 플러그인 배열
|
|
644
644
|
* @param replaceIfExists
|
|
645
645
|
* @Since 1.0.0
|
|
646
646
|
* @category plugin
|
|
647
647
|
*/
|
|
648
|
-
setPlugin(plugin: any, replaceIfExists?: boolean): this;
|
|
648
|
+
setPlugin(plugin: any | any[], replaceIfExists?: boolean): this;
|
|
649
649
|
/**
|
|
650
650
|
* @Description 레거시 지원용 차트 설정 객체를 생성합니다.
|
|
651
651
|
* @param {string} id
|
|
@@ -1079,6 +1079,37 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
|
|
|
1079
1079
|
* @category Dataset
|
|
1080
1080
|
*/
|
|
1081
1081
|
setDataset(uid: string, dataset: CustomCartesianDataset<TType>): this;
|
|
1082
|
+
/**
|
|
1083
|
+
* @description 데이터셋을 UID 또는 인덱스로 조회합니다.
|
|
1084
|
+
* @param uidOrIndex - 데이터셋 UID(문자열) 또는 인덱스(숫자)
|
|
1085
|
+
* @returns {CustomCartesianDataset<TType> | undefined}
|
|
1086
|
+
* @throws {CustomError} 데이터셋이 없거나 찾을 수 없을 때 에러를 발생시킵니다.
|
|
1087
|
+
* @since 1.6.6
|
|
1088
|
+
* @category Dataset
|
|
1089
|
+
* @example
|
|
1090
|
+
* // UID로 조회
|
|
1091
|
+
* const dataset = chart.getData('dataset-uid');
|
|
1092
|
+
*
|
|
1093
|
+
* // 인덱스로 조회
|
|
1094
|
+
* const dataset = chart.getData(0);
|
|
1095
|
+
*/
|
|
1096
|
+
getData(uidOrIndex: string | number): CustomCartesianDataset<TType> | undefined;
|
|
1097
|
+
/**
|
|
1098
|
+
* @description 데이터셋을 UID 또는 인덱스로 교체합니다.
|
|
1099
|
+
* @param uidOrIndex - 데이터셋 UID(문자열) 또는 인덱스(숫자)
|
|
1100
|
+
* @param dataset - 새로운 데이터셋
|
|
1101
|
+
* @returns {this}
|
|
1102
|
+
* @throws {CustomError} 데이터셋이 없거나 찾을 수 없을 때 에러를 발생시킵니다.
|
|
1103
|
+
* @since 1.6.6
|
|
1104
|
+
* @category Dataset
|
|
1105
|
+
* @example
|
|
1106
|
+
* // UID로 교체
|
|
1107
|
+
* chart.setData('dataset-uid', { label: 'New Dataset', data: [...] });
|
|
1108
|
+
*
|
|
1109
|
+
* // 인덱스로 교체
|
|
1110
|
+
* chart.setData(0, { label: 'New Dataset', data: [...] });
|
|
1111
|
+
*/
|
|
1112
|
+
setData(uidOrIndex: string | number, dataset: CustomCartesianDataset<TType>): this;
|
|
1082
1113
|
/**
|
|
1083
1114
|
* @Beta
|
|
1084
1115
|
* @description 새로운 데이터셋을 추가하고 고유 식별자(UID)를 반환합니다. 데이터셋 배열이 비어있으면 새로 생성합니다.
|
|
@@ -1111,6 +1142,34 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
|
|
|
1111
1142
|
* chart.setBackgroundColor('#f0f0f0');
|
|
1112
1143
|
*/
|
|
1113
1144
|
setBackgroundColor(color: string): this;
|
|
1145
|
+
/**
|
|
1146
|
+
* @description 데이터셋에 데이터 포인트를 추가합니다. time series인 경우 자동으로 시간 순서대로 정렬됩니다.
|
|
1147
|
+
* @param datasetIndexOrData - 데이터셋 인덱스(숫자) 또는 추가할 데이터. 숫자가 아니면 데이터로 간주하고 마지막 데이터셋에 추가됩니다.
|
|
1148
|
+
* @param data - 추가할 데이터 (단일 객체 또는 배열). 첫 번째 인자가 데이터인 경우 생략.
|
|
1149
|
+
* @returns {this}
|
|
1150
|
+
* @throws {CustomError} 데이터셋이 없거나 인덱스가 유효하지 않을 경우 에러를 발생시킵니다.
|
|
1151
|
+
* @since 1.6.6
|
|
1152
|
+
* @category Dataset
|
|
1153
|
+
* @example
|
|
1154
|
+
* // 마지막 데이터셋에 단일 데이터 추가
|
|
1155
|
+
* chart.addData({ x: 10, y: 20 });
|
|
1156
|
+
*
|
|
1157
|
+
* // 마지막 데이터셋에 여러 데이터 추가
|
|
1158
|
+
* chart.addData([{ x: 10, y: 20 }, { x: 30, y: 40 }]);
|
|
1159
|
+
*
|
|
1160
|
+
* // 특정 데이터셋(0번)에 데이터 추가
|
|
1161
|
+
* chart.addData(0, { x: 10, y: 20 });
|
|
1162
|
+
*
|
|
1163
|
+
* // 특정 데이터셋(1번)에 여러 데이터 추가
|
|
1164
|
+
* chart.addData(1, [{ x: 10, y: 20 }, { x: 30, y: 40 }]);
|
|
1165
|
+
*/
|
|
1166
|
+
addData(datasetIndexOrData?: number | any | any[], data?: any | any[]): this;
|
|
1167
|
+
/**
|
|
1168
|
+
* @private
|
|
1169
|
+
* @description x축이 time series인지 확인합니다.
|
|
1170
|
+
* @returns {boolean}
|
|
1171
|
+
*/
|
|
1172
|
+
private isTimeSeries;
|
|
1114
1173
|
}
|
|
1115
1174
|
|
|
1116
1175
|
declare class BarChartWrapper extends CartesianChartWrapper<'bar'> implements BarChartBuilder {
|
|
@@ -2093,9 +2152,9 @@ declare class PieChartWrapper extends ArcChartWrapper<'pie'> implements PieChart
|
|
|
2093
2152
|
* ═════════════════════════════════════════════════════════════
|
|
2094
2153
|
*/
|
|
2095
2154
|
|
|
2096
|
-
declare class TreemapChartWrapper
|
|
2155
|
+
declare class TreemapChartWrapper extends ChartWrapper<'treemap', CustomTreemapChartOptions> implements TreemapChartBuilder {
|
|
2097
2156
|
private _chartId?;
|
|
2098
|
-
constructor(type: 'treemap', labels:
|
|
2157
|
+
constructor(type: 'treemap', labels: undefined, datasets: CustomTreemapDataset[], options?: CustomTreemapChartOptions, plugins?: Plugin$1);
|
|
2099
2158
|
get chartId(): string;
|
|
2100
2159
|
set chartId(value: string);
|
|
2101
2160
|
protected normalize(): void;
|
|
@@ -2120,7 +2179,7 @@ declare class TreemapChartWrapper<DType = Record<string, unknown>> extends Chart
|
|
|
2120
2179
|
* @since 1.0.0
|
|
2121
2180
|
* @category Data
|
|
2122
2181
|
*/
|
|
2123
|
-
setTreeData(data:
|
|
2182
|
+
setTreeData(data: Record<string, unknown>[] | number[] | Record<string, unknown>): this;
|
|
2124
2183
|
/**
|
|
2125
2184
|
* @description 색상을 결정하는 키를 설정합니다.
|
|
2126
2185
|
* @param key - 색상 키
|