stz-chart-maker 1.5.2 → 1.6.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/dist/index.d.ts +264 -18
- package/dist/index.js +2433 -2189
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ChartType, ChartDataset, GridLineOptions, FontSpec, Tick, PluginOptionsByType, ChartOptions, Chart, ChartEvent, ActiveElement, LegendOptions, Plugin as Plugin$1, TooltipItem
|
|
1
|
+
import { ChartTypeRegistry, ChartType, ChartDataset, GridLineOptions, FontSpec, Tick, PluginOptionsByType, ChartOptions, Chart, ChartEvent, ActiveElement, LegendOptions, Plugin as Plugin$1, TooltipItem } from 'chart.js';
|
|
2
|
+
import { TreemapControllerDatasetOptions } from 'chartjs-chart-treemap';
|
|
2
3
|
import { ZoomPluginOptions } from 'chartjs-plugin-zoom/types/options';
|
|
3
4
|
import { DeepPartial as DeepPartial$1 } from 'chart.js/dist/types/utils';
|
|
4
5
|
|
|
@@ -23,11 +24,24 @@ type Mode = 'default' | 'resize' | 'reset' | 'none' | 'hide' | 'show' | 'active'
|
|
|
23
24
|
type CartesianChartType = 'line' | 'bar' | 'scatter' | 'bubble';
|
|
24
25
|
type ArcChartType = 'doughnut' | 'pie';
|
|
25
26
|
type RadialChartType = 'radar' | 'polarArea';
|
|
27
|
+
type HierarchicalChartType = 'treemap';
|
|
26
28
|
type DeepPartial<T> = {
|
|
27
29
|
[P in keyof T]?: T[P] extends object ? (T[P] extends Function ? T[P] : DeepPartial<T[P]>) : T[P];
|
|
28
30
|
};
|
|
29
31
|
type Override<T, U> = Omit<T, keyof U> & U;
|
|
30
32
|
|
|
33
|
+
type AllChartTypes = keyof ChartTypeRegistry;
|
|
34
|
+
declare enum ChartTypes {
|
|
35
|
+
BAR = "bar",
|
|
36
|
+
LINE = "line",
|
|
37
|
+
DOUGHNUT = "doughnut",
|
|
38
|
+
PIE = "pie",
|
|
39
|
+
RADAR = "radar",
|
|
40
|
+
BUBBLE = "bubble",
|
|
41
|
+
SCATTER = "scatter",
|
|
42
|
+
TREEMAP = "treemap"
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
/**
|
|
32
46
|
* ═════════════════════════════════════════════════════════════
|
|
33
47
|
* 📄 FILE : dataset.ts
|
|
@@ -53,7 +67,7 @@ interface DatasetExtensions {
|
|
|
53
67
|
_groupLabel?: string;
|
|
54
68
|
_toggleBehavior?: 'normal' | 'radio' | 'disabled';
|
|
55
69
|
}
|
|
56
|
-
type CustomChartDatasets<TType extends ChartType = ChartType> = ChartDataset<TType,
|
|
70
|
+
type CustomChartDatasets<TType extends ChartType = ChartType> = ChartDataset<TType, any> & DatasetExtensions;
|
|
57
71
|
type ArcDataset<TType extends ArcChartType = ArcChartType> = ChartDataset<TType, (number | null)[]> & DatasetExtensions;
|
|
58
72
|
type CartesianDataset<TType extends CartesianChartType = CartesianChartType> = ChartDataset<TType, (number | null)[]> & DatasetExtensions & {
|
|
59
73
|
yAxisID?: string;
|
|
@@ -71,6 +85,10 @@ type CustomCartesianDataset<TType extends CartesianChartType = CartesianChartTyp
|
|
|
71
85
|
image?: string;
|
|
72
86
|
images?: string[];
|
|
73
87
|
};
|
|
88
|
+
type CustomTreemapDataset<DType = Record<string, unknown>> = Omit<TreemapControllerDatasetOptions<DType>, 'groups' | 'sumKeys'> & DatasetExtensions & {
|
|
89
|
+
groups?: string[];
|
|
90
|
+
sumKeys?: string[];
|
|
91
|
+
};
|
|
74
92
|
|
|
75
93
|
/**
|
|
76
94
|
* ═════════════════════════════════════════════════════════════
|
|
@@ -359,6 +377,9 @@ type CustomLineChartOptions = CustomChartOptions<'line'>;
|
|
|
359
377
|
type CustomBubbleChartOptions = CustomChartOptions<'bubble'>;
|
|
360
378
|
type CustomPieChartOptions = CustomArcChartOptions<'pie'>;
|
|
361
379
|
type CustomDoughnutChartOptions = CustomArcChartOptions<'doughnut'>;
|
|
380
|
+
type CustomTreemapChartOptions = CustomChartOptions<'treemap'> & {
|
|
381
|
+
scales?: never;
|
|
382
|
+
};
|
|
362
383
|
type Constructor<TType extends ChartType, TInstance> = new (type: TType, labels: (string | number)[], datasets: any[], options?: CustomChartOptions<TType>, plugins?: []) => TInstance;
|
|
363
384
|
|
|
364
385
|
/**
|
|
@@ -429,6 +450,7 @@ interface BarChartBuilder extends CartesianChartBuilder<'bar'> {
|
|
|
429
450
|
setStacked(isStacked: boolean): this;
|
|
430
451
|
setBarImg(axis: string): this;
|
|
431
452
|
sparkBarChart(): this;
|
|
453
|
+
ganttChart(): this;
|
|
432
454
|
}
|
|
433
455
|
interface LineChartBuilder extends CartesianChartBuilder<'line'> {
|
|
434
456
|
setFill(datasetIndex: number, enable: boolean, backgroundColor?: string): this;
|
|
@@ -468,6 +490,7 @@ interface ArcChartBuilder<TType extends ArcChartType> extends ChartBuilder<TType
|
|
|
468
490
|
setAllBorderWidth(borderWidth: number): this;
|
|
469
491
|
setBorderColor(datasetIndex: number, borderColor: string | string[]): this;
|
|
470
492
|
setAllBorderColor(borderColor: string | string[]): this;
|
|
493
|
+
setSegmentImages(images: string[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
471
494
|
}
|
|
472
495
|
interface PieChartBuilder extends ArcChartBuilder<'pie'> {
|
|
473
496
|
setSegmentColors(colors: string[]): this;
|
|
@@ -497,6 +520,15 @@ interface DoughnutChartBuilder extends ArcChartBuilder<'doughnut'> {
|
|
|
497
520
|
}
|
|
498
521
|
interface RadarChartBuilder extends ChartBuilder<'radar'> {
|
|
499
522
|
}
|
|
523
|
+
interface TreemapChartBuilder extends ChartBuilder<'treemap'> {
|
|
524
|
+
setTreeData(data: any[]): this;
|
|
525
|
+
setColorKey(key: string): this;
|
|
526
|
+
setLabelKey(key: string): this;
|
|
527
|
+
setValueKey(key: string): this;
|
|
528
|
+
setSpacing(spacing: number): this;
|
|
529
|
+
setBorderWidth(borderWidth: number): this;
|
|
530
|
+
setBorderColor(borderColor: string): this;
|
|
531
|
+
}
|
|
500
532
|
|
|
501
533
|
/**
|
|
502
534
|
* ═════════════════════════════════════════════════════════════
|
|
@@ -544,10 +576,13 @@ type Types_CustomDoughnutChartOptions = CustomDoughnutChartOptions;
|
|
|
544
576
|
type Types_CustomLineChartOptions = CustomLineChartOptions;
|
|
545
577
|
type Types_CustomOptionPlugins<TType extends ChartType = ChartType> = CustomOptionPlugins<TType>;
|
|
546
578
|
type Types_CustomPieChartOptions = CustomPieChartOptions;
|
|
579
|
+
type Types_CustomTreemapChartOptions = CustomTreemapChartOptions;
|
|
580
|
+
type Types_CustomTreemapDataset<DType = Record<string, unknown>> = CustomTreemapDataset<DType>;
|
|
547
581
|
type Types_DeepPartial<T> = DeepPartial<T>;
|
|
548
582
|
type Types_DeepPartialCartesianAxes = DeepPartialCartesianAxes;
|
|
549
583
|
type Types_DeepPartialPluginOptions<T extends ChartType> = DeepPartialPluginOptions<T>;
|
|
550
584
|
type Types_DoughnutChartBuilder = DoughnutChartBuilder;
|
|
585
|
+
type Types_HierarchicalChartType = HierarchicalChartType;
|
|
551
586
|
type Types_HtmlLegendOptions = HtmlLegendOptions;
|
|
552
587
|
type Types_LineChartBuilder = LineChartBuilder;
|
|
553
588
|
type Types_Mode = Mode;
|
|
@@ -558,8 +593,9 @@ type Types_RadarChartBuilder = RadarChartBuilder;
|
|
|
558
593
|
type Types_RadialChartType = RadialChartType;
|
|
559
594
|
type Types_SegmentImageConfig = SegmentImageConfig;
|
|
560
595
|
type Types_SettingOptions = SettingOptions;
|
|
596
|
+
type Types_TreemapChartBuilder = TreemapChartBuilder;
|
|
561
597
|
declare namespace Types {
|
|
562
|
-
export type { Types_Align as Align, Types_ArcChartBuilder as ArcChartBuilder, Types_ArcChartType as ArcChartType, Types_ArcDataset as ArcDataset, 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_CommonCartesianLegendConfig as CommonCartesianLegendConfig, 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_CustomChartDatasets as CustomChartDatasets, 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_Override as Override, Types_PieChartBuilder as PieChartBuilder, Types_Position as Position, Types_RadarChartBuilder as RadarChartBuilder, Types_RadialChartType as RadialChartType, Types_SegmentImageConfig as SegmentImageConfig, Types_SettingOptions as SettingOptions };
|
|
598
|
+
export type { Types_Align as Align, Types_ArcChartBuilder as ArcChartBuilder, Types_ArcChartType as ArcChartType, Types_ArcDataset as ArcDataset, 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_CommonCartesianLegendConfig as CommonCartesianLegendConfig, 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_CustomChartDatasets as CustomChartDatasets, Types_CustomChartOptions as CustomChartOptions, Types_CustomDoughnutChartOptions as CustomDoughnutChartOptions, Types_CustomLineChartOptions as CustomLineChartOptions, Types_CustomOptionPlugins as CustomOptionPlugins, Types_CustomPieChartOptions as CustomPieChartOptions, Types_CustomTreemapChartOptions as CustomTreemapChartOptions, Types_CustomTreemapDataset as CustomTreemapDataset, Types_DeepPartial as DeepPartial, Types_DeepPartialCartesianAxes as DeepPartialCartesianAxes, Types_DeepPartialPluginOptions as DeepPartialPluginOptions, Types_DoughnutChartBuilder as DoughnutChartBuilder, Types_HierarchicalChartType as HierarchicalChartType, Types_HtmlLegendOptions as HtmlLegendOptions, Types_LineChartBuilder as LineChartBuilder, Types_Mode as Mode, Types_Override as Override, Types_PieChartBuilder as PieChartBuilder, Types_Position as Position, Types_RadarChartBuilder as RadarChartBuilder, Types_RadialChartType as RadialChartType, Types_SegmentImageConfig as SegmentImageConfig, Types_SettingOptions as SettingOptions, Types_TreemapChartBuilder as TreemapChartBuilder };
|
|
563
599
|
}
|
|
564
600
|
|
|
565
601
|
interface ChartConfig {
|
|
@@ -579,17 +615,18 @@ type ChartBuilderMap = {
|
|
|
579
615
|
pie: PieChartBuilder;
|
|
580
616
|
radar: ChartBuilder<'radar'>;
|
|
581
617
|
polarArea: ChartBuilder<'polarArea'>;
|
|
618
|
+
treemap: TreemapChartBuilder;
|
|
582
619
|
};
|
|
583
620
|
declare abstract class ChartWrapper<TType extends ChartType, TOptions extends CustomChartOptions<TType> = CustomChartOptions<TType>> implements ChartBuilder<TType> {
|
|
584
621
|
protected type: TType;
|
|
585
|
-
protected labels: (string | number)[];
|
|
622
|
+
protected labels: (string | number)[] | undefined;
|
|
586
623
|
private _datasets;
|
|
587
624
|
protected options: TOptions;
|
|
588
625
|
protected plugins?: any | undefined;
|
|
589
626
|
protected get datasets(): CustomChartDatasets<TType>[];
|
|
590
627
|
protected set datasets(value: CustomChartDatasets<TType>[]);
|
|
591
628
|
static registry: Map<string, Constructor<any, any>>;
|
|
592
|
-
constructor(type: TType, labels: (string | number)[], _datasets: CustomChartDatasets<TType>[], options: TOptions, plugins?: any | undefined);
|
|
629
|
+
constructor(type: TType, labels: (string | number)[] | undefined, _datasets: CustomChartDatasets<TType>[], options: TOptions, plugins?: any | undefined);
|
|
593
630
|
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>;
|
|
594
631
|
static register<TType extends ChartType, TInstance>(type: TType, wrapperClass: Constructor<TType, TInstance>): void;
|
|
595
632
|
static has(type: ChartType): boolean;
|
|
@@ -1203,6 +1240,46 @@ declare class BarChartWrapper extends CartesianChartWrapper<'bar'> implements Ba
|
|
|
1203
1240
|
* @beta (기능 테스트 중)
|
|
1204
1241
|
*/
|
|
1205
1242
|
sparkBarChart(): this;
|
|
1243
|
+
/**
|
|
1244
|
+
* @description 간트차트 스타일을 적용합니다. 데이터의 x 값은 반드시 yyyy-mm-dd 포맷이어야 합니다.
|
|
1245
|
+
* X축을 time scale로 설정하고, indexAxis를 'y'로 설정하여 horizontal bar chart로 표시합니다.
|
|
1246
|
+
* 모든 dataset에 borderWidth: 1, borderSkipped: false가 자동으로 적용됩니다.
|
|
1247
|
+
* @returns {this}
|
|
1248
|
+
* @throws {CustomError} 데이터가 yyyy-mm-dd 포맷이 아닐 경우 INVALID_DATA_STRUCTURE 에러 발생
|
|
1249
|
+
* @since 1.0.0
|
|
1250
|
+
* @category options
|
|
1251
|
+
* @example
|
|
1252
|
+
* // 간트차트 데이터 형식 (배열):
|
|
1253
|
+
* const datasets = [
|
|
1254
|
+
* {
|
|
1255
|
+
* label: 'Task 1',
|
|
1256
|
+
* data: [['2024-01-01', '2024-01-05']],
|
|
1257
|
+
* backgroundColor: 'rgba(255, 99, 132, 0.5)'
|
|
1258
|
+
* },
|
|
1259
|
+
* {
|
|
1260
|
+
* label: 'Task 2',
|
|
1261
|
+
* data: [['2024-01-03', '2024-01-08']],
|
|
1262
|
+
* backgroundColor: 'rgba(54, 162, 235, 0.5)'
|
|
1263
|
+
* }
|
|
1264
|
+
* ];
|
|
1265
|
+
*
|
|
1266
|
+
* // 간트차트 데이터 형식 (객체):
|
|
1267
|
+
* const datasets = [
|
|
1268
|
+
* {
|
|
1269
|
+
* label: 'Task 1',
|
|
1270
|
+
* data: [
|
|
1271
|
+
* { x: '2024-01-01', y: 0 },
|
|
1272
|
+
* { x: '2024-01-05', y: 0 }
|
|
1273
|
+
* ]
|
|
1274
|
+
* }
|
|
1275
|
+
* ];
|
|
1276
|
+
*
|
|
1277
|
+
* const chart = ChartWrapper.create('bar', ['Task 1', 'Task 2'], datasets)
|
|
1278
|
+
* .ganttChart()
|
|
1279
|
+
* .build();
|
|
1280
|
+
* @beta (기능 테스트 중)
|
|
1281
|
+
*/
|
|
1282
|
+
ganttChart(): this;
|
|
1206
1283
|
}
|
|
1207
1284
|
|
|
1208
1285
|
declare class LineChartWrapper extends CartesianChartWrapper<'line'> implements LineChartBuilder {
|
|
@@ -1992,6 +2069,110 @@ declare class PieChartWrapper extends ArcChartWrapper<'pie'> implements PieChart
|
|
|
1992
2069
|
private generateGradientColors;
|
|
1993
2070
|
}
|
|
1994
2071
|
|
|
2072
|
+
/**
|
|
2073
|
+
* ═════════════════════════════════════════════════════════════
|
|
2074
|
+
* 📄 FILE : TreemapChartWrapper.ts
|
|
2075
|
+
* 📁 PACKAGE : chart-toolbox
|
|
2076
|
+
* 👤 AUTHOR : stz
|
|
2077
|
+
* 🕒 CREATED : 2025. 1. 23.
|
|
2078
|
+
* ═════════════════════════════════════════════════════════════
|
|
2079
|
+
* ═════════════════════════════════════════════════════════════
|
|
2080
|
+
* 📝 DESCRIPTION
|
|
2081
|
+
* Treemap Chart 를 위한 래퍼 클래스
|
|
2082
|
+
* ═════════════════════════════════════════════════════════════
|
|
2083
|
+
* ═════════════════════════════════════════════════════════════
|
|
2084
|
+
* 🔄 CHANGE LOG
|
|
2085
|
+
* - DATE : 2025/01/23 | Author : stz | 최초 생성
|
|
2086
|
+
* ═════════════════════════════════════════════════════════════
|
|
2087
|
+
*/
|
|
2088
|
+
|
|
2089
|
+
declare class TreemapChartWrapper<DType = Record<string, unknown>> extends ChartWrapper<'treemap', CustomTreemapChartOptions> implements TreemapChartBuilder {
|
|
2090
|
+
private _chartId?;
|
|
2091
|
+
constructor(type: 'treemap', labels: any, datasets: CustomTreemapDataset<DType>[], options?: CustomTreemapChartOptions, plugins?: Plugin$1);
|
|
2092
|
+
get chartId(): string;
|
|
2093
|
+
set chartId(value: string);
|
|
2094
|
+
protected normalize(): void;
|
|
2095
|
+
protected mustHavePlugins(): {
|
|
2096
|
+
id: string;
|
|
2097
|
+
_tooltips: WeakMap<WeakKey, any>;
|
|
2098
|
+
afterDraw(chart: any, args: any, options: any): void;
|
|
2099
|
+
afterInit(chart: any, args: any, options: any): void;
|
|
2100
|
+
beforeUpdate(chart: any, args: any, options: any): void;
|
|
2101
|
+
_handleGroupVisibility(chart: any, datasets: any[]): void;
|
|
2102
|
+
_handleLegendClick(e: any, legendItem: any, legend: any, toggleBehavior: string): void;
|
|
2103
|
+
_setupLegendTooltip(chart: any): void;
|
|
2104
|
+
_hitTestLegend(chart: any, x: number, y: number): any;
|
|
2105
|
+
_showTooltip(chart: any, e: MouseEvent, tooltipContent: string | ((context: any) => string), legendItem: any): void;
|
|
2106
|
+
_hideTooltip(chart: any): void;
|
|
2107
|
+
afterDestroy(chart: any): void;
|
|
2108
|
+
}[];
|
|
2109
|
+
protected configAop(config: any): any;
|
|
2110
|
+
/**
|
|
2111
|
+
* @Description 차트 설정 객체를 생성합니다.
|
|
2112
|
+
* @param id
|
|
2113
|
+
* @returns {ChartConfig}
|
|
2114
|
+
* @Since 1.0.0
|
|
2115
|
+
* @category Chart
|
|
2116
|
+
*/
|
|
2117
|
+
build(id?: string): ChartConfig;
|
|
2118
|
+
/**
|
|
2119
|
+
* @description treemap의 데이터를 설정합니다.
|
|
2120
|
+
* @param data - 계층적 트리 데이터
|
|
2121
|
+
* @returns {this}
|
|
2122
|
+
* @since 1.0.0
|
|
2123
|
+
* @category Data
|
|
2124
|
+
*/
|
|
2125
|
+
setTreeData(data: DType[] | number[] | Record<string, unknown>): this;
|
|
2126
|
+
/**
|
|
2127
|
+
* @description 색상을 결정하는 키를 설정합니다.
|
|
2128
|
+
* @param key - 색상 키
|
|
2129
|
+
* @returns {this}
|
|
2130
|
+
* @since 1.0.0
|
|
2131
|
+
* @category Options
|
|
2132
|
+
*/
|
|
2133
|
+
setColorKey(key: string): this;
|
|
2134
|
+
/**
|
|
2135
|
+
* @description 라벨을 표시할 키를 설정합니다.
|
|
2136
|
+
* @param key - 라벨 키
|
|
2137
|
+
* @returns {this}
|
|
2138
|
+
* @since 1.0.0
|
|
2139
|
+
* @category Options
|
|
2140
|
+
*/
|
|
2141
|
+
setLabelKey(key: string): this;
|
|
2142
|
+
/**
|
|
2143
|
+
* @description 값을 결정하는 키를 설정합니다.
|
|
2144
|
+
* @param key - 값 키
|
|
2145
|
+
* @returns {this}
|
|
2146
|
+
* @since 1.0.0
|
|
2147
|
+
* @category Options
|
|
2148
|
+
*/
|
|
2149
|
+
setValueKey(key: string): this;
|
|
2150
|
+
/**
|
|
2151
|
+
* @description 타일 간 간격을 설정합니다.
|
|
2152
|
+
* @param spacing - 간격 (픽셀)
|
|
2153
|
+
* @returns {this}
|
|
2154
|
+
* @since 1.0.0
|
|
2155
|
+
* @category Options
|
|
2156
|
+
*/
|
|
2157
|
+
setSpacing(spacing: number): this;
|
|
2158
|
+
/**
|
|
2159
|
+
* @description 타일의 경계선 너비를 설정합니다.
|
|
2160
|
+
* @param borderWidth - 경계선 너비
|
|
2161
|
+
* @returns {this}
|
|
2162
|
+
* @since 1.0.0
|
|
2163
|
+
* @category Options
|
|
2164
|
+
*/
|
|
2165
|
+
setBorderWidth(borderWidth: number): this;
|
|
2166
|
+
/**
|
|
2167
|
+
* @description 타일의 경계선 색상을 설정합니다.
|
|
2168
|
+
* @param borderColor - 경계선 색상
|
|
2169
|
+
* @returns {this}
|
|
2170
|
+
* @since 1.0.0
|
|
2171
|
+
* @category Options
|
|
2172
|
+
*/
|
|
2173
|
+
setBorderColor(borderColor: string): this;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
1995
2176
|
declare const noDataPlugin: {
|
|
1996
2177
|
id: string;
|
|
1997
2178
|
beforeUpdate: (chart: any) => void;
|
|
@@ -2195,6 +2376,69 @@ declare const defaultBubbleScales: CommonAxesSacels;
|
|
|
2195
2376
|
declare const createDefaultBubbleOptions: (userOptions?: CustomBubbleChartOptions, defaultScales?: CommonAxesSacels) => CustomBubbleChartOptions;
|
|
2196
2377
|
declare const sparkBubbleOptions: CustomBubbleChartOptions;
|
|
2197
2378
|
|
|
2379
|
+
/**
|
|
2380
|
+
* ═════════════════════════════════════════════════════════════
|
|
2381
|
+
* 📄 FILE : Doughnut.ts
|
|
2382
|
+
* 📁 PACKAGE : chart-toolbox
|
|
2383
|
+
* 👤 AUTHOR : stz
|
|
2384
|
+
* 🕒 CREATED : 25. 9. 28.
|
|
2385
|
+
* ═════════════════════════════════════════════════════════════
|
|
2386
|
+
* ═════════════════════════════════════════════════════════════
|
|
2387
|
+
* 📝 DESCRIPTION
|
|
2388
|
+
* Doughnut 차트 기본 설정
|
|
2389
|
+
* ═════════════════════════════════════════════════════════════
|
|
2390
|
+
* ═════════════════════════════════════════════════════════════
|
|
2391
|
+
* 🔄 CHANGE LOG
|
|
2392
|
+
* - DATE : 2025/09/28 | Author : stz | 최초 생성
|
|
2393
|
+
* ═════════════════════════════════════════════════════════════
|
|
2394
|
+
*/
|
|
2395
|
+
|
|
2396
|
+
declare const defaultDoughnutTooltipCallback: (context: TooltipItem<"doughnut">) => string;
|
|
2397
|
+
declare const createDefaultDoughnutOptions: (userOptions?: CustomDoughnutChartOptions) => CustomDoughnutChartOptions;
|
|
2398
|
+
|
|
2399
|
+
/**
|
|
2400
|
+
* ═════════════════════════════════════════════════════════════
|
|
2401
|
+
* 📄 FILE : Pie.ts
|
|
2402
|
+
* 📁 PACKAGE : chart-toolbox
|
|
2403
|
+
* 👤 AUTHOR : stz
|
|
2404
|
+
* 🕒 CREATED : 25. 11. 16.
|
|
2405
|
+
* ═════════════════════════════════════════════════════════════
|
|
2406
|
+
* ═════════════════════════════════════════════════════════════
|
|
2407
|
+
* 📝 DESCRIPTION
|
|
2408
|
+
* Pie 차트 기본 설정
|
|
2409
|
+
* ═════════════════════════════════════════════════════════════
|
|
2410
|
+
* ═════════════════════════════════════════════════════════════
|
|
2411
|
+
* 🔄 CHANGE LOG
|
|
2412
|
+
* - DATE : 2025/11/16 | Author : stz | 최초 생성
|
|
2413
|
+
* ═════════════════════════════════════════════════════════════
|
|
2414
|
+
*/
|
|
2415
|
+
|
|
2416
|
+
declare const defaultPieTooltipCallback: (context: TooltipItem<"pie">) => string;
|
|
2417
|
+
declare const createDefaultPieOptions: (userOptions?: CustomPieChartOptions) => CustomPieChartOptions;
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* ═════════════════════════════════════════════════════════════
|
|
2421
|
+
* 📄 FILE : Treemap.ts
|
|
2422
|
+
* 📁 PACKAGE : chart-toolbox
|
|
2423
|
+
* 👤 AUTHOR : stz
|
|
2424
|
+
* 🕒 CREATED : 2025. 1. 23.
|
|
2425
|
+
* ═════════════════════════════════════════════════════════════
|
|
2426
|
+
* ═════════════════════════════════════════════════════════════
|
|
2427
|
+
* 📝 DESCRIPTION
|
|
2428
|
+
* Treemap 차트 기본 설정
|
|
2429
|
+
* ═════════════════════════════════════════════════════════════
|
|
2430
|
+
* ═════════════════════════════════════════════════════════════
|
|
2431
|
+
* 🔄 CHANGE LOG
|
|
2432
|
+
* - DATE : 2025/01/23 | Author : stz | 최초 생성
|
|
2433
|
+
* ═════════════════════════════════════════════════════════════
|
|
2434
|
+
*/
|
|
2435
|
+
|
|
2436
|
+
declare const defaultTreemapTooltipCallback: {
|
|
2437
|
+
title(items: any[]): any;
|
|
2438
|
+
label(item: any): string;
|
|
2439
|
+
};
|
|
2440
|
+
declare const createDefaultTreemapOptions: (userOptions?: CustomTreemapChartOptions) => CustomTreemapChartOptions;
|
|
2441
|
+
|
|
2198
2442
|
declare const LocalDefaults_CreateZoomRangeSlider: typeof CreateZoomRangeSlider;
|
|
2199
2443
|
declare const LocalDefaults_barScaleImgPlugin: typeof barScaleImgPlugin;
|
|
2200
2444
|
declare const LocalDefaults_blinkPlugin: typeof blinkPlugin;
|
|
@@ -2202,14 +2446,20 @@ declare const LocalDefaults_changeSetting: typeof changeSetting;
|
|
|
2202
2446
|
declare const LocalDefaults_chartMountPlugin: typeof chartMountPlugin;
|
|
2203
2447
|
declare const LocalDefaults_createDefaultBarOptions: typeof createDefaultBarOptions;
|
|
2204
2448
|
declare const LocalDefaults_createDefaultBubbleOptions: typeof createDefaultBubbleOptions;
|
|
2449
|
+
declare const LocalDefaults_createDefaultDoughnutOptions: typeof createDefaultDoughnutOptions;
|
|
2205
2450
|
declare const LocalDefaults_createDefaultLineOptions: typeof createDefaultLineOptions;
|
|
2451
|
+
declare const LocalDefaults_createDefaultPieOptions: typeof createDefaultPieOptions;
|
|
2452
|
+
declare const LocalDefaults_createDefaultTreemapOptions: typeof createDefaultTreemapOptions;
|
|
2206
2453
|
declare const LocalDefaults_customLegend: typeof customLegend;
|
|
2207
2454
|
declare const LocalDefaults_defaultBarScales: typeof defaultBarScales;
|
|
2208
2455
|
declare const LocalDefaults_defaultBarTooltipCallback: typeof defaultBarTooltipCallback;
|
|
2209
2456
|
declare const LocalDefaults_defaultBubbleScales: typeof defaultBubbleScales;
|
|
2210
2457
|
declare const LocalDefaults_defaultBubbleTooltipCallback: typeof defaultBubbleTooltipCallback;
|
|
2458
|
+
declare const LocalDefaults_defaultDoughnutTooltipCallback: typeof defaultDoughnutTooltipCallback;
|
|
2211
2459
|
declare const LocalDefaults_defaultLineScales: typeof defaultLineScales;
|
|
2212
2460
|
declare const LocalDefaults_defaultLineTooltipCallback: typeof defaultLineTooltipCallback;
|
|
2461
|
+
declare const LocalDefaults_defaultPieTooltipCallback: typeof defaultPieTooltipCallback;
|
|
2462
|
+
declare const LocalDefaults_defaultTreemapTooltipCallback: typeof defaultTreemapTooltipCallback;
|
|
2213
2463
|
declare const LocalDefaults_doughnutCenterTextPlugin: typeof doughnutCenterTextPlugin;
|
|
2214
2464
|
declare const LocalDefaults_loadingPlugin: typeof loadingPlugin;
|
|
2215
2465
|
declare const LocalDefaults_makeCenterHtml: typeof makeCenterHtml;
|
|
@@ -2229,14 +2479,20 @@ declare namespace LocalDefaults {
|
|
|
2229
2479
|
LocalDefaults_chartMountPlugin as chartMountPlugin,
|
|
2230
2480
|
LocalDefaults_createDefaultBarOptions as createDefaultBarOptions,
|
|
2231
2481
|
LocalDefaults_createDefaultBubbleOptions as createDefaultBubbleOptions,
|
|
2482
|
+
LocalDefaults_createDefaultDoughnutOptions as createDefaultDoughnutOptions,
|
|
2232
2483
|
LocalDefaults_createDefaultLineOptions as createDefaultLineOptions,
|
|
2484
|
+
LocalDefaults_createDefaultPieOptions as createDefaultPieOptions,
|
|
2485
|
+
LocalDefaults_createDefaultTreemapOptions as createDefaultTreemapOptions,
|
|
2233
2486
|
LocalDefaults_customLegend as customLegend,
|
|
2234
2487
|
LocalDefaults_defaultBarScales as defaultBarScales,
|
|
2235
2488
|
LocalDefaults_defaultBarTooltipCallback as defaultBarTooltipCallback,
|
|
2236
2489
|
LocalDefaults_defaultBubbleScales as defaultBubbleScales,
|
|
2237
2490
|
LocalDefaults_defaultBubbleTooltipCallback as defaultBubbleTooltipCallback,
|
|
2491
|
+
LocalDefaults_defaultDoughnutTooltipCallback as defaultDoughnutTooltipCallback,
|
|
2238
2492
|
LocalDefaults_defaultLineScales as defaultLineScales,
|
|
2239
2493
|
LocalDefaults_defaultLineTooltipCallback as defaultLineTooltipCallback,
|
|
2494
|
+
LocalDefaults_defaultPieTooltipCallback as defaultPieTooltipCallback,
|
|
2495
|
+
LocalDefaults_defaultTreemapTooltipCallback as defaultTreemapTooltipCallback,
|
|
2240
2496
|
LocalDefaults_doughnutCenterTextPlugin as doughnutCenterTextPlugin,
|
|
2241
2497
|
LocalDefaults_loadingPlugin as loadingPlugin,
|
|
2242
2498
|
LocalDefaults_makeCenterHtml as makeCenterHtml,
|
|
@@ -2270,17 +2526,6 @@ declare class ChartInstance {
|
|
|
2270
2526
|
static resize(id: string): void;
|
|
2271
2527
|
}
|
|
2272
2528
|
|
|
2273
|
-
type AllChartTypes = keyof ChartTypeRegistry;
|
|
2274
|
-
declare enum ChartTypes {
|
|
2275
|
-
BAR = "bar",
|
|
2276
|
-
LINE = "line",
|
|
2277
|
-
DOUGHNUT = "doughnut",
|
|
2278
|
-
PIE = "pie",
|
|
2279
|
-
RADAR = "radar",
|
|
2280
|
-
BUBBLE = "bubble",
|
|
2281
|
-
SCATTER = "scatter"
|
|
2282
|
-
}
|
|
2283
|
-
|
|
2284
2529
|
interface StzConfig {
|
|
2285
2530
|
errorLogging?: boolean;
|
|
2286
2531
|
silentMode?: boolean;
|
|
@@ -2393,6 +2638,7 @@ declare const T$: {
|
|
|
2393
2638
|
readonly ArcChartWrapper: typeof ArcChartWrapper;
|
|
2394
2639
|
readonly DoughnutChartWrapper: typeof DoughnutChartWrapper;
|
|
2395
2640
|
readonly PieChartWrapper: typeof PieChartWrapper;
|
|
2641
|
+
readonly TreemapChartWrapper: typeof TreemapChartWrapper;
|
|
2396
2642
|
readonly defaultTypes: typeof Types;
|
|
2397
2643
|
readonly defaultsOptions: typeof LocalDefaults;
|
|
2398
2644
|
readonly toolBox: {
|
|
@@ -2401,5 +2647,5 @@ declare const T$: {
|
|
|
2401
2647
|
};
|
|
2402
2648
|
};
|
|
2403
2649
|
|
|
2404
|
-
export { ArcChartWrapper, BarChartWrapper, BubbleChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, DoughnutChartWrapper, LineChartWrapper, PieChartWrapper, T$, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createDefaultBarOptions, createDefaultBubbleOptions, createDefaultLineOptions, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultBubbleScales, defaultBubbleTooltipCallback, defaultLineScales, defaultLineTooltipCallback, doughnutCenterTextPlugin, downloadChartAsImage, downloadChartAsImageByInstance, getChartAsBase64, getChartAsBase64ByInstance, getChartAsBlob, getChartAsBlobByInstance, loadingPlugin, makeCenterHtml, noDataPlugin, segmentImagePlugin, setChartConfig, sparkBarOptions, sparkBubbleOptions, sparkLineOptions, zoomRangeSlider, zoomResetPlugin };
|
|
2405
|
-
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, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, DoughnutChartBuilder, FocusCallback, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, Override, PartialDataLabels, PieChartBuilder, Position, RadarChartBuilder, RadialChartType, ScaleWithOriginalColors, SegmentImageConfig, SettingOptions, StzConfig, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
|
|
2650
|
+
export { ArcChartWrapper, BarChartWrapper, BubbleChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, DoughnutChartWrapper, LineChartWrapper, PieChartWrapper, T$, TreemapChartWrapper, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createDefaultBarOptions, createDefaultBubbleOptions, createDefaultDoughnutOptions, createDefaultLineOptions, createDefaultPieOptions, createDefaultTreemapOptions, 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 };
|
|
2651
|
+
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, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
|