stz-chart-maker 2.0.4 → 2.1.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 +29 -66
- package/dist/index.d.ts +64 -55
- package/dist/index.js +3124 -3252
- package/package.json +3 -2
- package/CHANGELOG.md +0 -64
package/README.md
CHANGED
|
@@ -42,86 +42,49 @@ const chart = ChartWrapper
|
|
|
42
42
|
<Chart {...chart} />;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
## Configuration
|
|
45
|
+
## Configuration (Browser)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
`stz-chart-maker`는 런타임에 설정 파일을 직접 읽지 않습니다.
|
|
48
|
+
브라우저 환경에서는 `setChartConfig()`로 전역 설정을 전달하세요.
|
|
48
49
|
|
|
49
|
-
### 설정
|
|
50
|
-
다음 중 하나의 위치에 설정 파일을 생성하세요:
|
|
51
|
-
- `stz.config.js` (권장)
|
|
52
|
-
- `.stzrc.js`
|
|
53
|
-
- `src/stz.config.js`
|
|
54
|
-
- `src/config/stz.config.js`
|
|
55
|
-
- `config/stz.config.js`
|
|
50
|
+
### 1) 앱 코드에서 직접 전역 설정 (권장)
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
```tsx
|
|
53
|
+
import { setChartConfig } from 'stz-chart-maker';
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
// stz.config.js
|
|
61
|
-
module.exports = {
|
|
62
|
-
// 에러 로깅 활성화/비활성화
|
|
55
|
+
setChartConfig({
|
|
63
56
|
errorLogging: true,
|
|
64
|
-
|
|
65
|
-
// 에러 발생 시 무시 (silent mode)
|
|
66
57
|
silentMode: false,
|
|
67
|
-
|
|
68
|
-
// 차트 기본 색상 커스터마이징
|
|
69
|
-
defaultColor: [
|
|
70
|
-
'#FF6B6B',
|
|
71
|
-
'#4ECDC4',
|
|
72
|
-
'#45B7D1',
|
|
73
|
-
'#FFA07A',
|
|
74
|
-
'#98D8C8',
|
|
75
|
-
'#F7DC6F'
|
|
76
|
-
],
|
|
77
|
-
|
|
78
|
-
// 모든 차트 타입 자동 등록
|
|
58
|
+
defaultColor: ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FFA07A', '#98D8C8', '#F7DC6F'],
|
|
79
59
|
autoRegister: true,
|
|
60
|
+
// registerTypes: ['bar', 'line']
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2) 번들러 플러그인으로 설정 주입
|
|
80
65
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
66
|
+
`.stzrc.js`를 사용할 경우, 번들러 플러그인이 빌드 시점에 설정을 읽어 `setChartConfig(...)`를 주입합니다.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
// .stzrc.js
|
|
70
|
+
module.exports = {
|
|
71
|
+
defaultColor: ['#111111', '#22c55e', '#3b82f6'],
|
|
72
|
+
autoRegister: true
|
|
73
|
+
};
|
|
84
74
|
```
|
|
85
75
|
|
|
86
76
|
### 설정 옵션
|
|
87
77
|
|
|
88
78
|
| 옵션 | 타입 | 기본값 | 설명 |
|
|
89
79
|
|------|------|--------|------|
|
|
90
|
-
| `errorLogging` | `boolean` | `
|
|
91
|
-
| `silentMode` | `boolean` | `
|
|
92
|
-
| `defaultColor` | `string[]` | 기본
|
|
93
|
-
| `autoRegister` | `boolean` | `false` | 모든 차트 타입 자동 등록
|
|
94
|
-
| `registerTypes` | `ChartType[]` | `[]` | 특정 차트 타입만
|
|
95
|
-
|
|
96
|
-
### 설정 없이 사용하기
|
|
97
|
-
|
|
98
|
-
설정 파일이 없어도 라이브러리는 정상 작동합니다. 단, 차트를 사용하기 전에 수동으로 등록해야 합니다:
|
|
80
|
+
| `errorLogging` | `boolean` | `true` | 에러 로그 출력 여부 |
|
|
81
|
+
| `silentMode` | `boolean` | `true` | 에러 발생 시 예외를 던지지 않고 처리 |
|
|
82
|
+
| `defaultColor` | `string[]` | 내부 기본 팔레트 | 차트 전역 기본 색상 배열 |
|
|
83
|
+
| `autoRegister` | `boolean` | `false` | 모든 차트 타입 자동 등록 |
|
|
84
|
+
| `registerTypes` | `ChartType[]` | `[]` | 특정 차트 타입만 선택 등록 |
|
|
99
85
|
|
|
100
|
-
|
|
101
|
-
import { ChartWrapper, BarChartWrapper, LineChartWrapper } from 'stz-chart-maker';
|
|
86
|
+
### 주의사항
|
|
102
87
|
|
|
103
|
-
|
|
104
|
-
ChartWrapper.register('bar', BarChartWrapper);
|
|
105
|
-
ChartWrapper.register('line', LineChartWrapper);
|
|
106
|
-
|
|
107
|
-
// 이제 사용 가능
|
|
108
|
-
const chart = ChartWrapper.create('bar', labels, datasets);
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### autoRegister vs registerTypes
|
|
112
|
-
|
|
113
|
-
**모든 타입 자동 등록:**
|
|
114
|
-
```javascript
|
|
115
|
-
module.exports = {
|
|
116
|
-
autoRegister: true // bar, line, bubble, doughnut 모두 등록
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**특정 타입만 등록:**
|
|
121
|
-
```javascript
|
|
122
|
-
module.exports = {
|
|
123
|
-
registerTypes: ['bar', 'line'] // bar와 line만 등록
|
|
124
|
-
}
|
|
125
|
-
```
|
|
88
|
+
`setChartConfig()`는 첫 번째 `ChartWrapper.create(...)` 호출 전에 실행해야 합니다.
|
|
126
89
|
|
|
127
|
-
</div>
|
|
90
|
+
</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartTypeRegistry, ChartType, ChartDataset, GridLineOptions, FontSpec, Tick, PluginOptionsByType, Chart, ChartOptions, ChartEvent, ActiveElement, LegendOptions, Plugin as Plugin$1, TooltipItem } from 'chart.js';
|
|
1
|
+
import { ChartTypeRegistry, ChartType, ChartDataset, GridLineOptions, FontSpec, Tick, PluginOptionsByType, Chart as Chart$1, ChartOptions, ChartEvent, ActiveElement, LegendOptions, Plugin as Plugin$1, TooltipItem } from 'chart.js';
|
|
2
2
|
import { TreemapControllerDatasetOptions } from 'chartjs-chart-treemap';
|
|
3
3
|
import { ZoomPluginOptions } from 'chartjs-plugin-zoom/types/options';
|
|
4
4
|
|
|
@@ -302,7 +302,7 @@ interface StreamingOptions {
|
|
|
302
302
|
* });
|
|
303
303
|
* }
|
|
304
304
|
*/
|
|
305
|
-
onRefresh?: (chart: Chart) => void;
|
|
305
|
+
onRefresh?: (chart: Chart$1) => void;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
/**
|
|
@@ -353,7 +353,7 @@ interface SettingOptions {
|
|
|
353
353
|
};
|
|
354
354
|
cursor: string;
|
|
355
355
|
onClick: (args: {
|
|
356
|
-
chart: Chart;
|
|
356
|
+
chart: Chart$1;
|
|
357
357
|
event: MouseEvent;
|
|
358
358
|
}) => void;
|
|
359
359
|
}
|
|
@@ -368,10 +368,10 @@ type HtmlLegendOptions = {
|
|
|
368
368
|
styles?: {
|
|
369
369
|
text?: Record<string, string>;
|
|
370
370
|
textHidden?: Record<string, string>;
|
|
371
|
-
box?: (item: any, type: string, chart: Chart) => Record<string, string | number>;
|
|
371
|
+
box?: (item: any, type: string, chart: Chart$1) => Record<string, string | number>;
|
|
372
372
|
};
|
|
373
373
|
getItemText?: (item: any) => string;
|
|
374
|
-
getDatasetType?: (chart: Chart, item: Record<string, any>) => string | undefined;
|
|
374
|
+
getDatasetType?: (chart: Chart$1, item: Record<string, any>) => string | undefined;
|
|
375
375
|
};
|
|
376
376
|
type CustomOptionPlugins<TType extends ChartType = ChartType> = DeepPartial<PluginOptionsByType<TType>> & {
|
|
377
377
|
zoom?: DeepPartialZoomType;
|
|
@@ -390,7 +390,7 @@ type CustomOptionPlugins<TType extends ChartType = ChartType> = DeepPartial<Plug
|
|
|
390
390
|
};
|
|
391
391
|
borderWidth?: Record<'normal' | 'hover', number>;
|
|
392
392
|
cursor?: string;
|
|
393
|
-
onClick?: (chart: Chart<TType>, event: MouseEvent) => void;
|
|
393
|
+
onClick?: (chart: Chart$1<TType>, event: MouseEvent) => void;
|
|
394
394
|
};
|
|
395
395
|
htmlLegend?: HtmlLegendOptions;
|
|
396
396
|
};
|
|
@@ -406,14 +406,14 @@ type CustomChartOptions<TType extends ChartType = ChartType> = Override<ChartOpt
|
|
|
406
406
|
right?: number;
|
|
407
407
|
};
|
|
408
408
|
};
|
|
409
|
-
onResize?: (this: Chart<TType>, chart: Chart<TType>, size: {
|
|
409
|
+
onResize?: (this: Chart$1<TType>, chart: Chart$1<TType>, size: {
|
|
410
410
|
width: number;
|
|
411
411
|
height: number;
|
|
412
412
|
}) => void;
|
|
413
|
-
onClick?: (this: Chart<TType>, event: ChartEvent, elements: ActiveElement[]) => void;
|
|
414
|
-
onHover?: (this: Chart<TType>, event: ChartEvent, elements: ActiveElement[]) => void;
|
|
413
|
+
onClick?: (this: Chart$1<TType>, event: ChartEvent, elements: ActiveElement[]) => void;
|
|
414
|
+
onHover?: (this: Chart$1<TType>, event: ChartEvent, elements: ActiveElement[]) => void;
|
|
415
415
|
}> & {
|
|
416
|
-
_mounted?: (chart: Chart<TType>) => void;
|
|
416
|
+
_mounted?: (chart: Chart$1<TType>) => void;
|
|
417
417
|
_chartId?: string;
|
|
418
418
|
_loading?: boolean;
|
|
419
419
|
};
|
|
@@ -454,7 +454,7 @@ interface ChartBuilder<TType extends string> {
|
|
|
454
454
|
build(id?: string): ChartConfig;
|
|
455
455
|
makeConfig(id?: string): ChartConfig;
|
|
456
456
|
hasPlugin(pluginId: string): boolean;
|
|
457
|
-
onResize(callback: (chart: Chart<any>, size: {
|
|
457
|
+
onResize(callback: (chart: Chart$1<any>, size: {
|
|
458
458
|
width: number;
|
|
459
459
|
height: number;
|
|
460
460
|
}) => void): this;
|
|
@@ -670,7 +670,7 @@ type ChartBuilderMap = {
|
|
|
670
670
|
polarArea: ChartBuilder<'polarArea'>;
|
|
671
671
|
treemap: TreemapChartBuilder;
|
|
672
672
|
};
|
|
673
|
-
declare abstract class
|
|
673
|
+
declare abstract class Chart<TType extends ChartType, TOptions extends CustomChartOptions<TType> = CustomChartOptions<TType>> implements ChartBuilder<TType> {
|
|
674
674
|
protected type: TType;
|
|
675
675
|
protected labels: (string | number)[] | undefined;
|
|
676
676
|
private _datasets;
|
|
@@ -678,7 +678,6 @@ declare abstract class ChartWrapper<TType extends ChartType, TOptions extends Cu
|
|
|
678
678
|
protected plugins?: any | undefined;
|
|
679
679
|
protected get datasets(): CustomChartDatasets<TType>[];
|
|
680
680
|
protected set datasets(value: CustomChartDatasets<TType>[]);
|
|
681
|
-
static registry: Map<string, Constructor<any, any>>;
|
|
682
681
|
constructor(type: TType, labels: (string | number)[] | undefined, _datasets: CustomChartDatasets<TType>[], options: TOptions, plugins?: any | undefined);
|
|
683
682
|
static create<TType extends ChartType>(type: TType, labels: (string | number)[], datasets: CustomChartDatasets<TType>[], options?: CustomChartOptions<TType>, plugins?: Plugin$1): TType extends keyof ChartBuilderMap ? ChartBuilderMap[TType] : ChartBuilder<TType>;
|
|
684
683
|
static register<TType extends ChartType, TInstance>(type: TType, wrapperClass: Constructor<TType, TInstance>): void;
|
|
@@ -726,7 +725,7 @@ declare abstract class ChartWrapper<TType extends ChartType, TOptions extends Cu
|
|
|
726
725
|
* @Since 1.0.0
|
|
727
726
|
* @category options
|
|
728
727
|
*/
|
|
729
|
-
onResize(callback: (chart: Chart<TType>, size: {
|
|
728
|
+
onResize(callback: (chart: Chart$1<TType>, size: {
|
|
730
729
|
width: number;
|
|
731
730
|
height: number;
|
|
732
731
|
}) => void): this;
|
|
@@ -860,10 +859,10 @@ interface DatasetWithPrevColors {
|
|
|
860
859
|
_prevBorderDash?: number[];
|
|
861
860
|
_prevPointRadius?: number;
|
|
862
861
|
}
|
|
863
|
-
interface ChartWithFocus extends Chart {
|
|
862
|
+
interface ChartWithFocus extends Chart$1 {
|
|
864
863
|
_currentFocusedAxis?: string | null;
|
|
865
864
|
}
|
|
866
|
-
type FocusCallback = (chart: Chart, focusedAxis: string | null) => void;
|
|
865
|
+
type FocusCallback = (chart: Chart$1, focusedAxis: string | null) => void;
|
|
867
866
|
interface ZoomRangeSliderColors {
|
|
868
867
|
sliderTrackColor?: string;
|
|
869
868
|
sliderActiveColor?: string;
|
|
@@ -879,12 +878,12 @@ interface ZoomRangeSliderVar {
|
|
|
879
878
|
interface ZoomRangeSliderPlugin {
|
|
880
879
|
id: 'zoomRangeSlider';
|
|
881
880
|
var: ZoomRangeSliderVar;
|
|
882
|
-
afterDatasetDraw(chart: Chart, args: any, options: any): void;
|
|
883
|
-
afterUpdate(chart: Chart, args: any, options: any): void;
|
|
884
|
-
afterEvent(chart: Chart, args: any, options: any): void;
|
|
881
|
+
afterDatasetDraw(chart: Chart$1, args: any, options: any): void;
|
|
882
|
+
afterUpdate(chart: Chart$1, args: any, options: any): void;
|
|
883
|
+
afterEvent(chart: Chart$1, args: any, options: any): void;
|
|
885
884
|
}
|
|
886
885
|
|
|
887
|
-
declare abstract class
|
|
886
|
+
declare abstract class CartesianChart<TType extends CartesianChartType> extends Chart<TType> implements CartesianChartBuilder<TType> {
|
|
888
887
|
readonly type: TType;
|
|
889
888
|
private _chartId?;
|
|
890
889
|
protected constructor(type: TType, labels: (string | number)[], datasets: CustomCartesianDataset<TType>[], options?: CustomChartOptions<TType>, plugins?: Plugin);
|
|
@@ -1248,7 +1247,7 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
|
|
|
1248
1247
|
private isTimeSeries;
|
|
1249
1248
|
}
|
|
1250
1249
|
|
|
1251
|
-
declare class
|
|
1250
|
+
declare class BarChart extends CartesianChart<'bar'> implements BarChartBuilder {
|
|
1252
1251
|
constructor(type: 'bar', labels: (string | number)[], datasets: CartesianDataset<'bar'>[], options?: CustomBarChartOptions, plugins?: any);
|
|
1253
1252
|
protected requireLabels(): boolean;
|
|
1254
1253
|
makeConfig(id?: string): {
|
|
@@ -1427,7 +1426,7 @@ declare class BarChartWrapper extends CartesianChartWrapper<'bar'> implements Ba
|
|
|
1427
1426
|
ganttChart(): this;
|
|
1428
1427
|
}
|
|
1429
1428
|
|
|
1430
|
-
declare class
|
|
1429
|
+
declare class LineChart extends CartesianChart<'line'> implements LineChartBuilder {
|
|
1431
1430
|
constructor(type: 'line', labels: (string | number)[], datasets: CartesianDataset<'line'>[], options?: CustomChartOptions<'line'>);
|
|
1432
1431
|
/**
|
|
1433
1432
|
*
|
|
@@ -1599,7 +1598,7 @@ declare class LineChartWrapper extends CartesianChartWrapper<'line'> implements
|
|
|
1599
1598
|
sparkLineChart(): this;
|
|
1600
1599
|
}
|
|
1601
1600
|
|
|
1602
|
-
declare class
|
|
1601
|
+
declare class BubbleChart extends CartesianChart<'bubble'> implements BubbleChartBuilder {
|
|
1603
1602
|
constructor(type: 'bubble', labels: (string | number)[], datasets: CartesianDataset<'bubble'>[], options?: CustomBubbleChartOptions, plugins?: any);
|
|
1604
1603
|
protected requireLabels(): boolean;
|
|
1605
1604
|
makeConfig(id?: string): {
|
|
@@ -1772,7 +1771,7 @@ declare class BubbleChartWrapper extends CartesianChartWrapper<'bubble'> impleme
|
|
|
1772
1771
|
* ═════════════════════════════════════════════════════════════
|
|
1773
1772
|
*/
|
|
1774
1773
|
|
|
1775
|
-
declare abstract class
|
|
1774
|
+
declare abstract class ArcChart<TType extends ArcChartType> extends Chart<TType> implements ArcChartBuilder<TType> {
|
|
1776
1775
|
readonly type: TType;
|
|
1777
1776
|
private _chartId?;
|
|
1778
1777
|
protected constructor(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options?: CustomArcChartOptions<TType>, plugins?: Plugin$1);
|
|
@@ -1910,7 +1909,7 @@ declare abstract class ArcChartWrapper<TType extends ArcChartType> extends Chart
|
|
|
1910
1909
|
setSegmentImages(images: string[] | UidImageMapping[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
1911
1910
|
}
|
|
1912
1911
|
|
|
1913
|
-
declare class
|
|
1912
|
+
declare class DoughnutChart extends ArcChart<'doughnut'> implements DoughnutChartBuilder {
|
|
1914
1913
|
constructor(type: 'doughnut', labels: (string | number)[], datasets: ChartDataset<'doughnut', (number | null)[]>[], options?: CustomDoughnutChartOptions, plugins?: any);
|
|
1915
1914
|
protected requireLabels(): boolean;
|
|
1916
1915
|
/**
|
|
@@ -2030,7 +2029,7 @@ declare class DoughnutChartWrapper extends ArcChartWrapper<'doughnut'> implement
|
|
|
2030
2029
|
}): this;
|
|
2031
2030
|
}
|
|
2032
2031
|
|
|
2033
|
-
declare class
|
|
2032
|
+
declare class PieChart extends ArcChart<'pie'> implements PieChartBuilder {
|
|
2034
2033
|
constructor(type: 'pie', labels: (string | number)[], datasets: ChartDataset<'pie', (number | null)[]>[], options?: CustomPieChartOptions, plugins?: any);
|
|
2035
2034
|
protected requireLabels(): boolean;
|
|
2036
2035
|
/**
|
|
@@ -2228,7 +2227,7 @@ declare class PieChartWrapper extends ArcChartWrapper<'pie'> implements PieChart
|
|
|
2228
2227
|
* ═════════════════════════════════════════════════════════════
|
|
2229
2228
|
*/
|
|
2230
2229
|
|
|
2231
|
-
declare class
|
|
2230
|
+
declare class TreemapChart extends Chart<'treemap', CustomTreemapChartOptions> implements TreemapChartBuilder {
|
|
2232
2231
|
private _chartId?;
|
|
2233
2232
|
constructor(type: 'treemap', labels: undefined, datasets: CustomTreemapDataset[], options?: CustomTreemapChartOptions, plugins?: Plugin$1);
|
|
2234
2233
|
get chartId(): string;
|
|
@@ -2447,9 +2446,9 @@ declare const customLegend: {
|
|
|
2447
2446
|
};
|
|
2448
2447
|
};
|
|
2449
2448
|
getItemText: (item: any) => any;
|
|
2450
|
-
getDatasetType: (chart: Chart, item: Record<string, any>) => ChartType | undefined;
|
|
2449
|
+
getDatasetType: (chart: Chart$1, item: Record<string, any>) => ChartType | undefined;
|
|
2451
2450
|
};
|
|
2452
|
-
_fnc: (chart: Chart, id: string, options: {
|
|
2451
|
+
_fnc: (chart: Chart$1, id: string, options: {
|
|
2453
2452
|
className: {
|
|
2454
2453
|
list: string;
|
|
2455
2454
|
};
|
|
@@ -2582,14 +2581,14 @@ declare function doughnutCenterTextPlugin(config: {
|
|
|
2582
2581
|
fontSize?: string;
|
|
2583
2582
|
}): {
|
|
2584
2583
|
id: string;
|
|
2585
|
-
afterInit(chart: Chart): void;
|
|
2586
|
-
afterUpdate(chart: Chart): void;
|
|
2587
|
-
updatePosition(chart: Chart): void;
|
|
2588
|
-
destroy(chart: Chart): void;
|
|
2584
|
+
afterInit(chart: Chart$1): void;
|
|
2585
|
+
afterUpdate(chart: Chart$1): void;
|
|
2586
|
+
updatePosition(chart: Chart$1): void;
|
|
2587
|
+
destroy(chart: Chart$1): void;
|
|
2589
2588
|
};
|
|
2590
2589
|
declare function segmentImagePlugin(config: SegmentImageConfig): {
|
|
2591
2590
|
id: string;
|
|
2592
|
-
afterDatasetDraw(chart: Chart<"doughnut" | "pie">, args: any): void;
|
|
2591
|
+
afterDatasetDraw(chart: Chart$1<"doughnut" | "pie">, args: any): void;
|
|
2593
2592
|
};
|
|
2594
2593
|
|
|
2595
2594
|
declare const defaultBarTooltipCallback: (context: TooltipItem<"bar">) => string;
|
|
@@ -2757,13 +2756,13 @@ declare class ChartFactory {
|
|
|
2757
2756
|
|
|
2758
2757
|
declare class ChartInstance {
|
|
2759
2758
|
private static map;
|
|
2760
|
-
static register(id: string, instance: Chart): void;
|
|
2761
|
-
static get(id: string): Chart | undefined;
|
|
2762
|
-
static getChart(id: string): Chart;
|
|
2759
|
+
static register(id: string, instance: Chart$1): void;
|
|
2760
|
+
static get(id: string): Chart$1 | undefined;
|
|
2761
|
+
static getChart(id: string): Chart$1;
|
|
2763
2762
|
static unregister(id: string): boolean;
|
|
2764
2763
|
static has(id: string): boolean;
|
|
2765
2764
|
static clear(): void;
|
|
2766
|
-
static update(id: string, instance: Chart, mode?: Mode): void;
|
|
2765
|
+
static update(id: string, instance: Chart$1, mode?: Mode): void;
|
|
2767
2766
|
static resize(id: string): void;
|
|
2768
2767
|
}
|
|
2769
2768
|
|
|
@@ -2771,7 +2770,9 @@ interface StzConfig {
|
|
|
2771
2770
|
errorLogging?: boolean;
|
|
2772
2771
|
silentMode?: boolean;
|
|
2773
2772
|
defaultColor?: string[];
|
|
2773
|
+
/** @deprecated no-op. Built-in chart types are bootstrapped at package load time. */
|
|
2774
2774
|
autoRegister?: boolean;
|
|
2775
|
+
/** @deprecated no-op. Built-in chart types are bootstrapped at package load time. */
|
|
2775
2776
|
registerTypes?: ChartType[];
|
|
2776
2777
|
}
|
|
2777
2778
|
/**
|
|
@@ -2785,8 +2786,7 @@ interface StzConfig {
|
|
|
2785
2786
|
* setChartConfig({
|
|
2786
2787
|
* errorLogging: true,
|
|
2787
2788
|
* silentMode: false,
|
|
2788
|
-
*
|
|
2789
|
-
* registerTypes: ['line', 'bar']
|
|
2789
|
+
* defaultColor: ['#111111', '#22c55e', '#3b82f6']
|
|
2790
2790
|
* });
|
|
2791
2791
|
* ```
|
|
2792
2792
|
*
|
|
@@ -2826,7 +2826,7 @@ declare function downloadChartAsImage(chartId: string, options?: ChartImageExpor
|
|
|
2826
2826
|
* @since 1.5.0
|
|
2827
2827
|
* @category util
|
|
2828
2828
|
*/
|
|
2829
|
-
declare function downloadChartAsImageByInstance(chart: Chart, options?: ChartImageExportOptions): void;
|
|
2829
|
+
declare function downloadChartAsImageByInstance(chart: Chart$1, options?: ChartImageExportOptions): void;
|
|
2830
2830
|
/**
|
|
2831
2831
|
* @description 차트를 Base64 문자열로 반환합니다.
|
|
2832
2832
|
* @param chartId 차트 ID
|
|
@@ -2844,7 +2844,7 @@ declare function getChartAsBase64(chartId: string, options?: Omit<ChartImageExpo
|
|
|
2844
2844
|
* @since 1.5.0
|
|
2845
2845
|
* @category util
|
|
2846
2846
|
*/
|
|
2847
|
-
declare function getChartAsBase64ByInstance(chart: Chart, options?: Omit<ChartImageExportOptions, 'filename'>): string;
|
|
2847
|
+
declare function getChartAsBase64ByInstance(chart: Chart$1, options?: Omit<ChartImageExportOptions, 'filename'>): string;
|
|
2848
2848
|
/**
|
|
2849
2849
|
* @description 차트를 Blob 객체로 반환합니다.
|
|
2850
2850
|
* @param chartId 차트 ID
|
|
@@ -2862,24 +2862,33 @@ declare function getChartAsBlob(chartId: string, options?: Omit<ChartImageExport
|
|
|
2862
2862
|
* @since 1.5.0
|
|
2863
2863
|
* @category util
|
|
2864
2864
|
*/
|
|
2865
|
-
declare function getChartAsBlobByInstance(chart: Chart, options?: Omit<ChartImageExportOptions, 'filename'>): Promise<Blob>;
|
|
2865
|
+
declare function getChartAsBlobByInstance(chart: Chart$1, options?: Omit<ChartImageExportOptions, 'filename'>): Promise<Blob>;
|
|
2866
2866
|
|
|
2867
2867
|
declare const ChartToolBox: {
|
|
2868
2868
|
setErrorLog(enabled?: boolean): void;
|
|
2869
2869
|
setErrorShield(enabled?: boolean): void;
|
|
2870
2870
|
};
|
|
2871
2871
|
declare const T$: {
|
|
2872
|
-
readonly create: typeof
|
|
2873
|
-
readonly register: typeof
|
|
2874
|
-
readonly
|
|
2875
|
-
readonly
|
|
2876
|
-
readonly
|
|
2877
|
-
readonly
|
|
2878
|
-
readonly
|
|
2879
|
-
readonly
|
|
2880
|
-
readonly
|
|
2881
|
-
readonly
|
|
2882
|
-
readonly
|
|
2872
|
+
readonly create: typeof Chart.create;
|
|
2873
|
+
readonly register: typeof Chart.register;
|
|
2874
|
+
readonly Chart: typeof Chart;
|
|
2875
|
+
readonly CartesianChart: typeof CartesianChart;
|
|
2876
|
+
readonly BarChart: typeof BarChart;
|
|
2877
|
+
readonly LineChart: typeof LineChart;
|
|
2878
|
+
readonly BubbleChart: typeof BubbleChart;
|
|
2879
|
+
readonly ArcChart: typeof ArcChart;
|
|
2880
|
+
readonly DoughnutChart: typeof DoughnutChart;
|
|
2881
|
+
readonly PieChart: typeof PieChart;
|
|
2882
|
+
readonly TreemapChart: typeof TreemapChart;
|
|
2883
|
+
readonly ChartWrapper: typeof Chart;
|
|
2884
|
+
readonly CartesianChartWrapper: typeof CartesianChart;
|
|
2885
|
+
readonly BarChartWrapper: typeof BarChart;
|
|
2886
|
+
readonly LineChartWrapper: typeof LineChart;
|
|
2887
|
+
readonly BubbleChartWrapper: typeof BubbleChart;
|
|
2888
|
+
readonly ArcChartWrapper: typeof ArcChart;
|
|
2889
|
+
readonly DoughnutChartWrapper: typeof DoughnutChart;
|
|
2890
|
+
readonly PieChartWrapper: typeof PieChart;
|
|
2891
|
+
readonly TreemapChartWrapper: typeof TreemapChart;
|
|
2883
2892
|
readonly defaultTypes: typeof Types;
|
|
2884
2893
|
readonly defaultsOptions: typeof LocalDefaults;
|
|
2885
2894
|
readonly toolBox: {
|
|
@@ -2888,5 +2897,5 @@ declare const T$: {
|
|
|
2888
2897
|
};
|
|
2889
2898
|
};
|
|
2890
2899
|
|
|
2891
|
-
export { ArcChartWrapper, BarChartWrapper, BubbleChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, DoughnutChartWrapper, LineChartWrapper, PieChartWrapper, T$, TreemapChartWrapper, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createAssignedTasksPlugin, createDefaultBarOptions, createDefaultBubbleOptions, createDefaultDoughnutOptions, createDefaultLineOptions, createDefaultPieOptions, createDefaultTreemapOptions, createStatusPlugin, createTodayLinePlugin, createWeekendPlugin, customDatasetPlugins, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultBubbleScales, defaultBubbleTooltipCallback, defaultDoughnutTooltipCallback, defaultLineScales, defaultLineTooltipCallback, defaultPieTooltipCallback, defaultTreemapTooltipCallback, doughnutCenterTextPlugin, downloadChartAsImage, downloadChartAsImageByInstance, getChartAsBase64, getChartAsBase64ByInstance, getChartAsBlob, getChartAsBlobByInstance, loadingPlugin, makeCenterHtml, noDataPlugin, segmentImagePlugin, setChartConfig, sparkBarOptions, sparkBubbleOptions, sparkLineOptions, zoomRangeSlider, zoomResetPlugin };
|
|
2900
|
+
export { ArcChart, ArcChart as ArcChartWrapper, BarChart, BarChart as BarChartWrapper, BubbleChart, BubbleChart as BubbleChartWrapper, CartesianChart, CartesianChart as CartesianChartWrapper, Chart, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, Chart as ChartWrapper, CreateZoomRangeSlider, DoughnutChart, DoughnutChart as DoughnutChartWrapper, LineChart, LineChart as LineChartWrapper, PieChart, PieChart as PieChartWrapper, T$, TreemapChart, TreemapChart as TreemapChartWrapper, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createAssignedTasksPlugin, createDefaultBarOptions, createDefaultBubbleOptions, createDefaultDoughnutOptions, createDefaultLineOptions, createDefaultPieOptions, createDefaultTreemapOptions, createStatusPlugin, createTodayLinePlugin, createWeekendPlugin, customDatasetPlugins, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultBubbleScales, defaultBubbleTooltipCallback, defaultDoughnutTooltipCallback, defaultLineScales, defaultLineTooltipCallback, defaultPieTooltipCallback, defaultTreemapTooltipCallback, doughnutCenterTextPlugin, downloadChartAsImage, downloadChartAsImageByInstance, getChartAsBase64, getChartAsBase64ByInstance, getChartAsBlob, getChartAsBlobByInstance, loadingPlugin, makeCenterHtml, noDataPlugin, segmentImagePlugin, setChartConfig, sparkBarOptions, sparkBubbleOptions, sparkLineOptions, zoomRangeSlider, zoomResetPlugin };
|
|
2892
2901
|
export type { Align, AllChartTypes, ArcChartBuilder, ArcChartType, ArcDataset, AxisColors, BarChartBuilder, BubbleChartBuilder, CartesianChartBuilder, CartesianChartType, CartesianDataset, ChartBuilder, ChartImageExportOptions, ChartWithFocus, Color, CommonAxes, CommonAxesSacels, CommonCartesian, CommonCartesianAxes, CommonCartesianLegendConfig, CommonCartesianTicks, CommonCartesianTitleConfig, CommonTicks, Constructor, CustomArcChartOptions, CustomBarChartOptions, CustomBubbleChartOptions, CustomCartesianDataset, CustomChartDatasets, CustomChartOptions, CustomDoughnutChartOptions, CustomLineChartOptions, CustomOptionPlugins, CustomPieChartOptions, CustomTreemapChartOptions, CustomTreemapDataset, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, DoughnutChartBuilder, FocusCallback, HierarchicalChartType, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, Override, PartialDataLabels, PieChartBuilder, Position, RadarChartBuilder, RadialChartType, ScaleWithOriginalColors, SegmentImageConfig, SettingOptions, StzConfig, TreemapChartBuilder, UidImageMapping, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
|