stz-chart-maker 1.1.1 → 1.2.1
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/README.md +38 -6
- package/dist/index.d.ts +229 -6
- package/dist/index.js +1823 -1571
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,10 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# stz-chart-maker
|
|
1
|
+
|
|
2
|
+
# stz-chart-maker
|
|
5
3
|
|
|
6
4
|
Chart.js 기반의 차트 생성 도구
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
## using npm :
|
|
7
|
+
```bash
|
|
8
|
+
npm install stz-chart-maker
|
|
9
|
+
npm install -D stz-chart-maker
|
|
10
|
+
```
|
|
11
|
+
## api Docs
|
|
9
12
|
[📚 API 문서](https://stz-chart-maker.vercel.app)
|
|
10
|
-
|
|
13
|
+
|
|
14
|
+
# example
|
|
15
|
+
```JSX
|
|
16
|
+
const chartConfig = ChartWrapper
|
|
17
|
+
.create('bar', data.labels , data.datasets, {})
|
|
18
|
+
.addDataLabels(true)
|
|
19
|
+
.addZoom(true)
|
|
20
|
+
.build('mixed-chart');
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<Chart type={chartConfig.type} data={chartConfig.data} options={chartConfig.options} />
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```JSX
|
|
32
|
+
import { ChartWrapper } from 'stz-chart-maker';
|
|
33
|
+
import { Chart } from 'react-chartjs-2';
|
|
34
|
+
|
|
35
|
+
const chart = ChartWrapper
|
|
36
|
+
.create('bar', ['A', 'B', 'C'], [{ data: [10, 20, 30] }])
|
|
37
|
+
.addZoom(true)
|
|
38
|
+
.addDataLabels(true)
|
|
39
|
+
.build('basic-bar');
|
|
40
|
+
|
|
41
|
+
<Chart {...chart} />;
|
|
42
|
+
```
|
package/dist/index.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ type DeepPartialPluginOptions<T extends ChartType> = DeepPartial<PluginOptionsBy
|
|
|
187
187
|
interface CommonAxesSacels {
|
|
188
188
|
[key: string]: DeepPartialCartesianAxes;
|
|
189
189
|
}
|
|
190
|
-
type CustomOptionPlugins<TType extends ChartType = ChartType> =
|
|
190
|
+
type CustomOptionPlugins<TType extends ChartType = ChartType> = DeepPartial<PluginOptionsByType<TType>> & {
|
|
191
191
|
zoom?: DeepPartialZoomType;
|
|
192
192
|
datalabels?: PartialDataLabels;
|
|
193
193
|
settingsIcon?: {
|
|
@@ -205,7 +205,7 @@ type CustomOptionPlugins<TType extends ChartType = ChartType> = Partial<PluginOp
|
|
|
205
205
|
cursor?: string;
|
|
206
206
|
onClick?: (chart: Chart<TType>, event: MouseEvent) => void;
|
|
207
207
|
};
|
|
208
|
-
htmlLegend
|
|
208
|
+
htmlLegend?: HtmlLegendOptions;
|
|
209
209
|
};
|
|
210
210
|
type CustomChartOptions<TType extends ChartType = ChartType> = Override<ChartOptions<TType>, {
|
|
211
211
|
scales?: CommonAxesSacels;
|
|
@@ -237,6 +237,7 @@ type CustomArcChartOptions<TType extends ArcChartType = ArcChartType> = CustomCh
|
|
|
237
237
|
};
|
|
238
238
|
type CustomBarChartOptions = CustomChartOptions<'bar'>;
|
|
239
239
|
type CustomLineChartOptions = CustomChartOptions<'line'>;
|
|
240
|
+
type CustomBubbleChartOptions = CustomChartOptions<'bubble'>;
|
|
240
241
|
type CustomPieChartOptions = CustomArcChartOptions<'pie'>;
|
|
241
242
|
type CustomDoughnutChartOptions = CustomArcChartOptions<'doughnut'>;
|
|
242
243
|
type CartesianDataset<TType extends CartesianChartType = CartesianChartType> = ChartDataset<TType, (number | null)[]> & {
|
|
@@ -308,6 +309,7 @@ interface BarChartBuilder extends CartesianChartBuilder<'bar'> {
|
|
|
308
309
|
setAllBorderRadius(borderRadius: number): this;
|
|
309
310
|
setStacked(isStacked: boolean): this;
|
|
310
311
|
setBarImg(axis: string): this;
|
|
312
|
+
sparkBarChart(): this;
|
|
311
313
|
}
|
|
312
314
|
interface LineChartBuilder extends CartesianChartBuilder<'line'> {
|
|
313
315
|
setFill(datasetIndex: number, enable: boolean, backgroundColor?: string): this;
|
|
@@ -320,6 +322,7 @@ interface LineChartBuilder extends CartesianChartBuilder<'line'> {
|
|
|
320
322
|
setAllPointRadius(radius: number): this;
|
|
321
323
|
setPointHoverRadius(datasetIndex: number, hoverRadius: number): this;
|
|
322
324
|
setAllPointHoverRadius(hoverRadius: number): this;
|
|
325
|
+
sparkLineChart(): this;
|
|
323
326
|
}
|
|
324
327
|
interface RadarChartBuilder extends ChartBuilder<'radar'> {
|
|
325
328
|
}
|
|
@@ -333,6 +336,22 @@ interface ArcChartBuilder<TType extends ArcChartType> extends ChartBuilder<TType
|
|
|
333
336
|
setBorderColor(datasetIndex: number, borderColor: string | string[]): this;
|
|
334
337
|
setAllBorderColor(borderColor: string | string[]): this;
|
|
335
338
|
}
|
|
339
|
+
interface BubbleChartBuilder extends CartesianChartBuilder<'bubble'> {
|
|
340
|
+
setBubbleRadius(datasetIndex: number, radius: number): this;
|
|
341
|
+
setBubbleDataRadius(datasetIndex: number, dataIndex: number, radius: number): this;
|
|
342
|
+
setAllBubbleDataRadius(datasetIndex: number, radius: number): this;
|
|
343
|
+
setBubbleDataRadiusByName(datasetIndex: number, dataName: string | number, radius: number): this;
|
|
344
|
+
updateBubbleDataRadius(datasetIndex: number, updateFn: (dataPoint: any, index: number) => number): this;
|
|
345
|
+
setBubbleDataRadiusWhere(datasetIndex: number, filterFn: (dataPoint: any) => boolean, radius: number): this;
|
|
346
|
+
setAllBubbleRadius(radius: number): this;
|
|
347
|
+
setHoverRadius(datasetIndex: number, hoverRadius: number): this;
|
|
348
|
+
setAllHoverRadius(hoverRadius: number): this;
|
|
349
|
+
setBorderWidth(datasetIndex: number, borderWidth: number): this;
|
|
350
|
+
setAllBorderWidth(borderWidth: number): this;
|
|
351
|
+
setRotation(datasetIndex: number, rotation: number): this;
|
|
352
|
+
setAllRotation(rotation: number): this;
|
|
353
|
+
sparkBubbleChart(): this;
|
|
354
|
+
}
|
|
336
355
|
interface PieChartBuilder extends ArcChartBuilder<'pie'> {
|
|
337
356
|
}
|
|
338
357
|
interface DoughnutChartBuilder extends ArcChartBuilder<'doughnut'> {
|
|
@@ -341,6 +360,7 @@ interface DoughnutChartBuilder extends ArcChartBuilder<'doughnut'> {
|
|
|
341
360
|
type Types_ArcChartBuilder<TType extends ArcChartType> = ArcChartBuilder<TType>;
|
|
342
361
|
type Types_ArcChartType = ArcChartType;
|
|
343
362
|
type Types_BarChartBuilder = BarChartBuilder;
|
|
363
|
+
type Types_BubbleChartBuilder = BubbleChartBuilder;
|
|
344
364
|
type Types_CartesianChartBuilder<TType extends CartesianChartType> = CartesianChartBuilder<TType>;
|
|
345
365
|
type Types_CartesianChartType = CartesianChartType;
|
|
346
366
|
type Types_CartesianDataset<TType extends CartesianChartType = CartesianChartType> = CartesianDataset<TType>;
|
|
@@ -356,6 +376,7 @@ type Types_CommonTicks = CommonTicks;
|
|
|
356
376
|
type Types_Constructor<TType extends ChartType, TInstance> = Constructor<TType, TInstance>;
|
|
357
377
|
type Types_CustomArcChartOptions<TType extends ArcChartType = ArcChartType> = CustomArcChartOptions<TType>;
|
|
358
378
|
type Types_CustomBarChartOptions = CustomBarChartOptions;
|
|
379
|
+
type Types_CustomBubbleChartOptions = CustomBubbleChartOptions;
|
|
359
380
|
type Types_CustomCartesianDataset<TType extends CartesianChartType = CartesianChartType> = CustomCartesianDataset<TType>;
|
|
360
381
|
type Types_CustomChartOptions<TType extends ChartType = ChartType> = CustomChartOptions<TType>;
|
|
361
382
|
type Types_CustomDoughnutChartOptions = CustomDoughnutChartOptions;
|
|
@@ -375,7 +396,7 @@ type Types_RadarChartBuilder = RadarChartBuilder;
|
|
|
375
396
|
type Types_RadialChartType = RadialChartType;
|
|
376
397
|
type Types_SettingOptions = SettingOptions;
|
|
377
398
|
declare namespace Types {
|
|
378
|
-
export type { Types_ArcChartBuilder as ArcChartBuilder, Types_ArcChartType as ArcChartType, Types_BarChartBuilder as BarChartBuilder, Types_CartesianChartBuilder as CartesianChartBuilder, Types_CartesianChartType as CartesianChartType, Types_CartesianDataset as CartesianDataset, Types_ChartBuilder as ChartBuilder, Types_Color as Color, Types_CommonAxes as CommonAxes, Types_CommonAxesSacels as CommonAxesSacels, Types_CommonCartesian as CommonCartesian, Types_CommonCartesianAxes as CommonCartesianAxes, Types_CommonCartesianTicks as CommonCartesianTicks, Types_CommonCartesianTitleConfig as CommonCartesianTitleConfig, Types_CommonTicks as CommonTicks, Types_Constructor as Constructor, Types_CustomArcChartOptions as CustomArcChartOptions, Types_CustomBarChartOptions as CustomBarChartOptions, Types_CustomCartesianDataset as CustomCartesianDataset, Types_CustomChartOptions as CustomChartOptions, Types_CustomDoughnutChartOptions as CustomDoughnutChartOptions, Types_CustomLineChartOptions as CustomLineChartOptions, Types_CustomOptionPlugins as CustomOptionPlugins, Types_CustomPieChartOptions as CustomPieChartOptions, Types_DeepPartial as DeepPartial, Types_DeepPartialCartesianAxes as DeepPartialCartesianAxes, Types_DeepPartialPluginOptions as DeepPartialPluginOptions, Types_DoughnutChartBuilder as DoughnutChartBuilder, Types_HtmlLegendOptions as HtmlLegendOptions, Types_LineChartBuilder as LineChartBuilder, Types_Mode as Mode, Types_PieChartBuilder as PieChartBuilder, Types_Position as Position, Types_RadarChartBuilder as RadarChartBuilder, Types_RadialChartType as RadialChartType, Types_SettingOptions as SettingOptions };
|
|
399
|
+
export type { Types_ArcChartBuilder as ArcChartBuilder, Types_ArcChartType as ArcChartType, Types_BarChartBuilder as BarChartBuilder, Types_BubbleChartBuilder as BubbleChartBuilder, Types_CartesianChartBuilder as CartesianChartBuilder, Types_CartesianChartType as CartesianChartType, Types_CartesianDataset as CartesianDataset, Types_ChartBuilder as ChartBuilder, Types_Color as Color, Types_CommonAxes as CommonAxes, Types_CommonAxesSacels as CommonAxesSacels, Types_CommonCartesian as CommonCartesian, Types_CommonCartesianAxes as CommonCartesianAxes, Types_CommonCartesianTicks as CommonCartesianTicks, Types_CommonCartesianTitleConfig as CommonCartesianTitleConfig, Types_CommonTicks as CommonTicks, Types_Constructor as Constructor, Types_CustomArcChartOptions as CustomArcChartOptions, Types_CustomBarChartOptions as CustomBarChartOptions, Types_CustomBubbleChartOptions as CustomBubbleChartOptions, Types_CustomCartesianDataset as CustomCartesianDataset, Types_CustomChartOptions as CustomChartOptions, Types_CustomDoughnutChartOptions as CustomDoughnutChartOptions, Types_CustomLineChartOptions as CustomLineChartOptions, Types_CustomOptionPlugins as CustomOptionPlugins, Types_CustomPieChartOptions as CustomPieChartOptions, Types_DeepPartial as DeepPartial, Types_DeepPartialCartesianAxes as DeepPartialCartesianAxes, Types_DeepPartialPluginOptions as DeepPartialPluginOptions, Types_DoughnutChartBuilder as DoughnutChartBuilder, Types_HtmlLegendOptions as HtmlLegendOptions, Types_LineChartBuilder as LineChartBuilder, Types_Mode as Mode, Types_PieChartBuilder as PieChartBuilder, Types_Position as Position, Types_RadarChartBuilder as RadarChartBuilder, Types_RadialChartType as RadialChartType, Types_SettingOptions as SettingOptions };
|
|
379
400
|
}
|
|
380
401
|
|
|
381
402
|
interface ChartConfig {
|
|
@@ -386,6 +407,16 @@ interface ChartConfig {
|
|
|
386
407
|
options: any;
|
|
387
408
|
plugins?: any;
|
|
388
409
|
}
|
|
410
|
+
type ChartBuilderMap = {
|
|
411
|
+
line: LineChartBuilder;
|
|
412
|
+
bar: BarChartBuilder;
|
|
413
|
+
scatter: CartesianChartBuilder<'scatter'>;
|
|
414
|
+
bubble: CartesianChartBuilder<'bubble'>;
|
|
415
|
+
doughnut: DoughnutChartBuilder;
|
|
416
|
+
pie: PieChartBuilder;
|
|
417
|
+
radar: ChartBuilder<'radar'>;
|
|
418
|
+
polarArea: ChartBuilder<'polarArea'>;
|
|
419
|
+
};
|
|
389
420
|
declare abstract class ChartWrapper<TType extends ChartType, TOptions extends CustomChartOptions<TType> = CustomChartOptions<TType>> implements ChartBuilder<TType> {
|
|
390
421
|
protected type: TType;
|
|
391
422
|
protected labels: (string | number)[];
|
|
@@ -394,7 +425,7 @@ declare abstract class ChartWrapper<TType extends ChartType, TOptions extends Cu
|
|
|
394
425
|
protected plugins?: any | undefined;
|
|
395
426
|
static registry: Map<string, Constructor<any, any>>;
|
|
396
427
|
constructor(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options: TOptions, plugins?: any | undefined);
|
|
397
|
-
static create<TType extends ChartType>(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options?: CustomChartOptions<TType>, plugins?: Plugin$1): TType extends
|
|
428
|
+
static create<TType extends ChartType>(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options?: CustomChartOptions<TType>, plugins?: Plugin$1): TType extends keyof ChartBuilderMap ? ChartBuilderMap[TType] : ChartBuilder<TType>;
|
|
398
429
|
static register<TType extends ChartType, TInstance>(type: TType, wrapperClass: Constructor<TType, TInstance>): void;
|
|
399
430
|
static has(type: ChartType): boolean;
|
|
400
431
|
protected abstract normalize(): void;
|
|
@@ -905,6 +936,14 @@ declare class BarChartWrapper extends CartesianChartWrapper<'bar'> implements Ba
|
|
|
905
936
|
* @Returns {this}
|
|
906
937
|
*/
|
|
907
938
|
setBarImg(axis: string): this;
|
|
939
|
+
/**
|
|
940
|
+
* @description 스파크바 차트 옵션을 적용합니다. mixed 차트에서는 동작하지 않습니다.
|
|
941
|
+
* @returns {this}
|
|
942
|
+
* @since 1.0.0
|
|
943
|
+
* @category options
|
|
944
|
+
* @beta (기능 테스트 중)
|
|
945
|
+
*/
|
|
946
|
+
sparkBarChart(): this;
|
|
908
947
|
}
|
|
909
948
|
|
|
910
949
|
declare class LineChartWrapper extends CartesianChartWrapper<'line'> implements LineChartBuilder {
|
|
@@ -1069,6 +1108,170 @@ declare class LineChartWrapper extends CartesianChartWrapper<'line'> implements
|
|
|
1069
1108
|
* @beta (기능 테스트 중)
|
|
1070
1109
|
*/
|
|
1071
1110
|
private calculateGradientPositions;
|
|
1111
|
+
/**
|
|
1112
|
+
* @description 스파크라인 차트 옵션을 적용합니다. mixed 차트에서는 동작하지 않습니다.
|
|
1113
|
+
* @returns {this}
|
|
1114
|
+
* @since 1.0.1
|
|
1115
|
+
* @category options
|
|
1116
|
+
* @beta (기능 테스트 중)
|
|
1117
|
+
*/
|
|
1118
|
+
sparkLineChart(): this;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare class BubbleChartWrapper extends CartesianChartWrapper<'bubble'> implements BubbleChartBuilder {
|
|
1122
|
+
constructor(type: 'bubble', labels: (string | number)[], datasets: CartesianDataset<'bubble'>[], options?: CustomBubbleChartOptions, plugins?: any);
|
|
1123
|
+
protected requireLabels(): boolean;
|
|
1124
|
+
makeConfig(id?: string): {
|
|
1125
|
+
_chartId: any;
|
|
1126
|
+
type: any;
|
|
1127
|
+
data: any;
|
|
1128
|
+
options: any;
|
|
1129
|
+
plugins: any;
|
|
1130
|
+
};
|
|
1131
|
+
/**
|
|
1132
|
+
* @description 데이터셋의 버블 반지름을 설정합니다.
|
|
1133
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1134
|
+
* @param {number} radius - 반지름 값
|
|
1135
|
+
* @returns {this}
|
|
1136
|
+
* @since 1.0.0
|
|
1137
|
+
* @category dataset
|
|
1138
|
+
*/
|
|
1139
|
+
setBubbleRadius(datasetIndex: number, radius: number): this;
|
|
1140
|
+
/**
|
|
1141
|
+
* @description 모든 데이터셋의 버블 반지름을 설정합니다.
|
|
1142
|
+
* @param {number} radius - 반지름 값
|
|
1143
|
+
* @returns {this}
|
|
1144
|
+
* @since 1.0.0
|
|
1145
|
+
* @category dataset
|
|
1146
|
+
*/
|
|
1147
|
+
setAllBubbleRadius(radius: number): this;
|
|
1148
|
+
/**
|
|
1149
|
+
* @description 특정 데이터셋의 특정 버블 데이터의 r값을 설정합니다.
|
|
1150
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1151
|
+
* @param {number} dataIndex - 데이터 인덱스
|
|
1152
|
+
* @param {number} radius - 반지름 값
|
|
1153
|
+
* @returns {this}
|
|
1154
|
+
* @since 1.0.0
|
|
1155
|
+
* @category data
|
|
1156
|
+
* @example
|
|
1157
|
+
* bubbleChart.setBubbleDataRadius(0, 2, 25); // 첫 번째 데이터셋의 세 번째 버블 크기를 25로 설정
|
|
1158
|
+
*/
|
|
1159
|
+
setBubbleDataRadius(datasetIndex: number, dataIndex: number, radius: number): this;
|
|
1160
|
+
/**
|
|
1161
|
+
* @description 특정 데이터셋의 모든 버블 데이터의 r값을 일괄 설정합니다.
|
|
1162
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1163
|
+
* @param {number} radius - 반지름 값
|
|
1164
|
+
* @returns {this}
|
|
1165
|
+
* @since 1.0.0
|
|
1166
|
+
* @category data
|
|
1167
|
+
* @example
|
|
1168
|
+
* bubbleChart.setAllBubbleDataRadius(0, 15); // 첫 번째 데이터셋의 모든 버블 크기를 15로 설정
|
|
1169
|
+
*/
|
|
1170
|
+
setAllBubbleDataRadius(datasetIndex: number, radius: number): this;
|
|
1171
|
+
/**
|
|
1172
|
+
* @description 특정 데이터셋에서 name으로 찾아서 버블 데이터의 r값을 설정합니다.
|
|
1173
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1174
|
+
* @param {string} name - 찾을 이름 (data 객체의 name 속성)
|
|
1175
|
+
* @param {number} radius - 반지름 값
|
|
1176
|
+
* @returns {this}
|
|
1177
|
+
* @since 1.0.0
|
|
1178
|
+
* @category data
|
|
1179
|
+
* @example
|
|
1180
|
+
* bubbleChart.setBubbleDataRadiusByName(0, '서울', 50); // '서울' 버블의 크기를 50으로 설정
|
|
1181
|
+
*/
|
|
1182
|
+
setBubbleDataRadiusByName(datasetIndex: number, name: string, radius: number): this;
|
|
1183
|
+
/**
|
|
1184
|
+
* @description 특정 데이터셋의 버블 데이터 r값을 함수를 통해 업데이트합니다.
|
|
1185
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1186
|
+
* @param {Function} updateFn - 업데이트 함수 (dataPoint, index) => newRadius
|
|
1187
|
+
* @returns {this}
|
|
1188
|
+
* @since 1.0.0
|
|
1189
|
+
* @category data
|
|
1190
|
+
* @example
|
|
1191
|
+
* // 모든 버블의 크기를 2배로
|
|
1192
|
+
* bubbleChart.updateBubbleDataRadius(0, (data) => data.r * 2);
|
|
1193
|
+
*
|
|
1194
|
+
* // 인구에 비례하여 크기 설정
|
|
1195
|
+
* bubbleChart.updateBubbleDataRadius(0, (data) => Math.sqrt(data.population) * 3);
|
|
1196
|
+
*
|
|
1197
|
+
* // 조건부 업데이트
|
|
1198
|
+
* bubbleChart.updateBubbleDataRadius(0, (data) =>
|
|
1199
|
+
* data.name === '서울' ? 50 : data.r
|
|
1200
|
+
* );
|
|
1201
|
+
*/
|
|
1202
|
+
updateBubbleDataRadius(datasetIndex: number, updateFn: (dataPoint: any, index: number) => number): this;
|
|
1203
|
+
/**
|
|
1204
|
+
* @description 특정 데이터셋에서 조건에 맞는 버블들의 r값을 설정합니다.
|
|
1205
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1206
|
+
* @param {Function} filterFn - 필터 함수 (dataPoint) => boolean
|
|
1207
|
+
* @param {number} radius - 반지름 값
|
|
1208
|
+
* @returns {this}
|
|
1209
|
+
* @since 1.0.0
|
|
1210
|
+
* @category data
|
|
1211
|
+
* @example
|
|
1212
|
+
* // 인구가 50 이상인 도시만 크기 50으로
|
|
1213
|
+
* bubbleChart.setBubbleDataRadiusWhere(0, (data) => data.population >= 50, 50);
|
|
1214
|
+
*/
|
|
1215
|
+
setBubbleDataRadiusWhere(datasetIndex: number, filterFn: (dataPoint: any) => boolean, radius: number): this;
|
|
1216
|
+
/**
|
|
1217
|
+
* @description 데이터셋의 호버 시 버블 반지름을 설정합니다.
|
|
1218
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1219
|
+
* @param {number} hoverRadius - 호버 시 반지름 값
|
|
1220
|
+
* @returns {this}
|
|
1221
|
+
* @since 1.0.0
|
|
1222
|
+
* @category dataset
|
|
1223
|
+
*/
|
|
1224
|
+
setHoverRadius(datasetIndex: number, hoverRadius: number): this;
|
|
1225
|
+
/**
|
|
1226
|
+
* @description 모든 데이터셋의 호버 시 버블 반지름을 설정합니다.
|
|
1227
|
+
* @param {number} hoverRadius - 호버 시 반지름 값
|
|
1228
|
+
* @returns {this}
|
|
1229
|
+
* @since 1.0.0
|
|
1230
|
+
* @category dataset
|
|
1231
|
+
*/
|
|
1232
|
+
setAllHoverRadius(hoverRadius: number): this;
|
|
1233
|
+
/**
|
|
1234
|
+
* @description 데이터셋의 Border Width를 설정합니다.
|
|
1235
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1236
|
+
* @param {number} borderWidth - 테두리 두께
|
|
1237
|
+
* @returns {this}
|
|
1238
|
+
* @since 1.0.0
|
|
1239
|
+
* @category dataset
|
|
1240
|
+
*/
|
|
1241
|
+
setBorderWidth(datasetIndex: number, borderWidth: number): this;
|
|
1242
|
+
/**
|
|
1243
|
+
* @description 모든 데이터셋의 Border Width를 설정합니다.
|
|
1244
|
+
* @param {number} borderWidth - 테두리 두께
|
|
1245
|
+
* @returns {this}
|
|
1246
|
+
* @since 1.0.0
|
|
1247
|
+
* @category dataset
|
|
1248
|
+
*/
|
|
1249
|
+
setAllBorderWidth(borderWidth: number): this;
|
|
1250
|
+
/**
|
|
1251
|
+
* @description 스파크 버블 차트 옵션을 적용합니다.
|
|
1252
|
+
* @returns {this}
|
|
1253
|
+
* @since 1.0.0
|
|
1254
|
+
* @category options
|
|
1255
|
+
* @beta (기능 테스트 중)
|
|
1256
|
+
*/
|
|
1257
|
+
sparkBubbleChart(): this;
|
|
1258
|
+
/**
|
|
1259
|
+
* @description 데이터셋의 회전 각도를 설정합니다.
|
|
1260
|
+
* @param {number} datasetIndex - 데이터셋 인덱스
|
|
1261
|
+
* @param {number} rotation - 회전 각도 (도 단위)
|
|
1262
|
+
* @returns {this}
|
|
1263
|
+
* @since 1.0.0
|
|
1264
|
+
* @category dataset
|
|
1265
|
+
*/
|
|
1266
|
+
setRotation(datasetIndex: number, rotation: number): this;
|
|
1267
|
+
/**
|
|
1268
|
+
* @description 모든 데이터셋의 회전 각도를 설정합니다.
|
|
1269
|
+
* @param {number} rotation - 회전 각도 (도 단위)
|
|
1270
|
+
* @returns {this}
|
|
1271
|
+
* @since 1.0.0
|
|
1272
|
+
* @category dataset
|
|
1273
|
+
*/
|
|
1274
|
+
setAllRotation(rotation: number): this;
|
|
1072
1275
|
}
|
|
1073
1276
|
|
|
1074
1277
|
/**
|
|
@@ -1384,10 +1587,17 @@ declare const CreateZoomRangeSlider: (colors?: ZoomRangeSliderColors) => ZoomRan
|
|
|
1384
1587
|
declare const defaultBarTooltipCallback: (context: TooltipItem<"bar">) => string;
|
|
1385
1588
|
declare const defaultBarScales: CommonAxesSacels;
|
|
1386
1589
|
declare const createDefaultBarOptions: (userOptions?: CustomBarChartOptions, defaultScales?: CommonAxesSacels) => CustomBarChartOptions;
|
|
1590
|
+
declare const sparkBarOptions: CustomBarChartOptions;
|
|
1387
1591
|
|
|
1388
1592
|
declare const defaultLineTooltipCallback: (context: TooltipItem<"line">) => string;
|
|
1389
1593
|
declare const defaultLineScales: CommonAxesSacels;
|
|
1390
1594
|
declare const createDefaultLineOptions: (userOptions?: CustomLineChartOptions, defaultScales?: CommonAxesSacels) => CustomLineChartOptions;
|
|
1595
|
+
declare const sparkLineOptions: CustomLineChartOptions;
|
|
1596
|
+
|
|
1597
|
+
declare const defaultBubbleTooltipCallback: (context: TooltipItem<"bubble">) => string;
|
|
1598
|
+
declare const defaultBubbleScales: CommonAxesSacels;
|
|
1599
|
+
declare const createDefaultBubbleOptions: (userOptions?: CustomBubbleChartOptions, defaultScales?: CommonAxesSacels) => CustomBubbleChartOptions;
|
|
1600
|
+
declare const sparkBubbleOptions: CustomBubbleChartOptions;
|
|
1391
1601
|
|
|
1392
1602
|
declare const LocalDefaults_CreateZoomRangeSlider: typeof CreateZoomRangeSlider;
|
|
1393
1603
|
declare const LocalDefaults_barScaleImgPlugin: typeof barScaleImgPlugin;
|
|
@@ -1395,16 +1605,22 @@ declare const LocalDefaults_blinkPlugin: typeof blinkPlugin;
|
|
|
1395
1605
|
declare const LocalDefaults_changeSetting: typeof changeSetting;
|
|
1396
1606
|
declare const LocalDefaults_chartMountPlugin: typeof chartMountPlugin;
|
|
1397
1607
|
declare const LocalDefaults_createDefaultBarOptions: typeof createDefaultBarOptions;
|
|
1608
|
+
declare const LocalDefaults_createDefaultBubbleOptions: typeof createDefaultBubbleOptions;
|
|
1398
1609
|
declare const LocalDefaults_createDefaultLineOptions: typeof createDefaultLineOptions;
|
|
1399
1610
|
declare const LocalDefaults_customLegend: typeof customLegend;
|
|
1400
1611
|
declare const LocalDefaults_defaultBarScales: typeof defaultBarScales;
|
|
1401
1612
|
declare const LocalDefaults_defaultBarTooltipCallback: typeof defaultBarTooltipCallback;
|
|
1613
|
+
declare const LocalDefaults_defaultBubbleScales: typeof defaultBubbleScales;
|
|
1614
|
+
declare const LocalDefaults_defaultBubbleTooltipCallback: typeof defaultBubbleTooltipCallback;
|
|
1402
1615
|
declare const LocalDefaults_defaultLineScales: typeof defaultLineScales;
|
|
1403
1616
|
declare const LocalDefaults_defaultLineTooltipCallback: typeof defaultLineTooltipCallback;
|
|
1404
1617
|
declare const LocalDefaults_doughnutCenterTextPlugin: typeof doughnutCenterTextPlugin;
|
|
1405
1618
|
declare const LocalDefaults_loadingPlugin: typeof loadingPlugin;
|
|
1406
1619
|
declare const LocalDefaults_makeCenterHtml: typeof makeCenterHtml;
|
|
1407
1620
|
declare const LocalDefaults_noDataPlugin: typeof noDataPlugin;
|
|
1621
|
+
declare const LocalDefaults_sparkBarOptions: typeof sparkBarOptions;
|
|
1622
|
+
declare const LocalDefaults_sparkBubbleOptions: typeof sparkBubbleOptions;
|
|
1623
|
+
declare const LocalDefaults_sparkLineOptions: typeof sparkLineOptions;
|
|
1408
1624
|
declare const LocalDefaults_zoomRangeSlider: typeof zoomRangeSlider;
|
|
1409
1625
|
declare const LocalDefaults_zoomResetPlugin: typeof zoomResetPlugin;
|
|
1410
1626
|
declare namespace LocalDefaults {
|
|
@@ -1415,16 +1631,22 @@ declare namespace LocalDefaults {
|
|
|
1415
1631
|
LocalDefaults_changeSetting as changeSetting,
|
|
1416
1632
|
LocalDefaults_chartMountPlugin as chartMountPlugin,
|
|
1417
1633
|
LocalDefaults_createDefaultBarOptions as createDefaultBarOptions,
|
|
1634
|
+
LocalDefaults_createDefaultBubbleOptions as createDefaultBubbleOptions,
|
|
1418
1635
|
LocalDefaults_createDefaultLineOptions as createDefaultLineOptions,
|
|
1419
1636
|
LocalDefaults_customLegend as customLegend,
|
|
1420
1637
|
LocalDefaults_defaultBarScales as defaultBarScales,
|
|
1421
1638
|
LocalDefaults_defaultBarTooltipCallback as defaultBarTooltipCallback,
|
|
1639
|
+
LocalDefaults_defaultBubbleScales as defaultBubbleScales,
|
|
1640
|
+
LocalDefaults_defaultBubbleTooltipCallback as defaultBubbleTooltipCallback,
|
|
1422
1641
|
LocalDefaults_defaultLineScales as defaultLineScales,
|
|
1423
1642
|
LocalDefaults_defaultLineTooltipCallback as defaultLineTooltipCallback,
|
|
1424
1643
|
LocalDefaults_doughnutCenterTextPlugin as doughnutCenterTextPlugin,
|
|
1425
1644
|
LocalDefaults_loadingPlugin as loadingPlugin,
|
|
1426
1645
|
LocalDefaults_makeCenterHtml as makeCenterHtml,
|
|
1427
1646
|
LocalDefaults_noDataPlugin as noDataPlugin,
|
|
1647
|
+
LocalDefaults_sparkBarOptions as sparkBarOptions,
|
|
1648
|
+
LocalDefaults_sparkBubbleOptions as sparkBubbleOptions,
|
|
1649
|
+
LocalDefaults_sparkLineOptions as sparkLineOptions,
|
|
1428
1650
|
LocalDefaults_zoomRangeSlider as zoomRangeSlider,
|
|
1429
1651
|
LocalDefaults_zoomResetPlugin as zoomResetPlugin,
|
|
1430
1652
|
};
|
|
@@ -1472,6 +1694,7 @@ declare const T$: {
|
|
|
1472
1694
|
readonly CartesianChartWrapper: typeof CartesianChartWrapper;
|
|
1473
1695
|
readonly BarChartWrapper: typeof BarChartWrapper;
|
|
1474
1696
|
readonly LineChartWrapper: typeof LineChartWrapper;
|
|
1697
|
+
readonly BubbleChartWrapper: typeof BubbleChartWrapper;
|
|
1475
1698
|
readonly ArcChartWrapper: typeof ArcChartWrapper;
|
|
1476
1699
|
readonly DoughnutChartWrapper: typeof DoughnutChartWrapper;
|
|
1477
1700
|
readonly defaultTypes: typeof Types;
|
|
@@ -1481,5 +1704,5 @@ declare const T$: {
|
|
|
1481
1704
|
};
|
|
1482
1705
|
};
|
|
1483
1706
|
|
|
1484
|
-
export { ArcChartWrapper, BarChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, DoughnutChartWrapper, LineChartWrapper, T$, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createDefaultBarOptions, createDefaultLineOptions, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultLineScales, defaultLineTooltipCallback, doughnutCenterTextPlugin, loadingPlugin, makeCenterHtml, noDataPlugin, zoomRangeSlider, zoomResetPlugin };
|
|
1485
|
-
export type { AllChartTypes, ArcChartBuilder, ArcChartType, AxisColors, BarChartBuilder, CartesianChartBuilder, CartesianChartType, CartesianDataset, ChartBuilder, ChartWithFocus, Color, CommonAxes, CommonAxesSacels, CommonCartesian, CommonCartesianAxes, CommonCartesianTicks, CommonCartesianTitleConfig, CommonTicks, Constructor, CustomArcChartOptions, CustomBarChartOptions, CustomCartesianDataset, CustomChartOptions, CustomDoughnutChartOptions, CustomLineChartOptions, CustomOptionPlugins, CustomPieChartOptions, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, DoughnutChartBuilder, FocusCallback, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, PartialDataLabels, PieChartBuilder, Position, RadarChartBuilder, RadialChartType, ScaleWithOriginalColors, SettingOptions, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
|
|
1707
|
+
export { ArcChartWrapper, BarChartWrapper, BubbleChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, DoughnutChartWrapper, LineChartWrapper, T$, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createDefaultBarOptions, createDefaultBubbleOptions, createDefaultLineOptions, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultBubbleScales, defaultBubbleTooltipCallback, defaultLineScales, defaultLineTooltipCallback, doughnutCenterTextPlugin, loadingPlugin, makeCenterHtml, noDataPlugin, sparkBarOptions, sparkBubbleOptions, sparkLineOptions, zoomRangeSlider, zoomResetPlugin };
|
|
1708
|
+
export type { AllChartTypes, ArcChartBuilder, ArcChartType, AxisColors, BarChartBuilder, BubbleChartBuilder, CartesianChartBuilder, CartesianChartType, CartesianDataset, ChartBuilder, ChartWithFocus, Color, CommonAxes, CommonAxesSacels, CommonCartesian, CommonCartesianAxes, CommonCartesianTicks, CommonCartesianTitleConfig, CommonTicks, Constructor, CustomArcChartOptions, CustomBarChartOptions, CustomBubbleChartOptions, CustomCartesianDataset, CustomChartOptions, CustomDoughnutChartOptions, CustomLineChartOptions, CustomOptionPlugins, CustomPieChartOptions, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, DoughnutChartBuilder, FocusCallback, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, PartialDataLabels, PieChartBuilder, Position, RadarChartBuilder, RadialChartType, ScaleWithOriginalColors, SettingOptions, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
|