stz-chart-maker 1.6.1 → 1.6.3
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 +19 -21
- package/dist/index.js +3025 -3074
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -272,8 +272,12 @@ type PartialDataLabels = Partial<DataLabels>;
|
|
|
272
272
|
* ═════════════════════════════════════════════════════════════
|
|
273
273
|
*/
|
|
274
274
|
|
|
275
|
+
interface UidImageMapping {
|
|
276
|
+
_uid: string;
|
|
277
|
+
image: string;
|
|
278
|
+
}
|
|
275
279
|
interface SegmentImageConfig {
|
|
276
|
-
images: string[];
|
|
280
|
+
images: string[] | UidImageMapping[];
|
|
277
281
|
width?: number;
|
|
278
282
|
height?: number;
|
|
279
283
|
backgroundColor?: string;
|
|
@@ -490,7 +494,7 @@ interface ArcChartBuilder<TType extends ArcChartType> extends ChartBuilder<TType
|
|
|
490
494
|
setAllBorderWidth(borderWidth: number): this;
|
|
491
495
|
setBorderColor(datasetIndex: number, borderColor: string | string[]): this;
|
|
492
496
|
setAllBorderColor(borderColor: string | string[]): this;
|
|
493
|
-
setSegmentImages(images: string[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
497
|
+
setSegmentImages(images: string[] | UidImageMapping[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
494
498
|
}
|
|
495
499
|
interface PieChartBuilder extends ArcChartBuilder<'pie'> {
|
|
496
500
|
setSegmentColors(colors: string[]): this;
|
|
@@ -594,8 +598,9 @@ type Types_RadialChartType = RadialChartType;
|
|
|
594
598
|
type Types_SegmentImageConfig = SegmentImageConfig;
|
|
595
599
|
type Types_SettingOptions = SettingOptions;
|
|
596
600
|
type Types_TreemapChartBuilder = TreemapChartBuilder;
|
|
601
|
+
type Types_UidImageMapping = UidImageMapping;
|
|
597
602
|
declare namespace Types {
|
|
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 };
|
|
603
|
+
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, Types_UidImageMapping as UidImageMapping };
|
|
599
604
|
}
|
|
600
605
|
|
|
601
606
|
interface ChartConfig {
|
|
@@ -1645,20 +1650,7 @@ declare abstract class ArcChartWrapper<TType extends ArcChartType> extends Chart
|
|
|
1645
1650
|
* @beta
|
|
1646
1651
|
*/
|
|
1647
1652
|
protected decorateDataset(ds: any, idx: number): void;
|
|
1648
|
-
protected mustHavePlugins():
|
|
1649
|
-
id: string;
|
|
1650
|
-
_tooltips: WeakMap<WeakKey, any>;
|
|
1651
|
-
afterDraw(chart: any, args: any, options: any): void;
|
|
1652
|
-
afterInit(chart: any, args: any, options: any): void;
|
|
1653
|
-
beforeUpdate(chart: any, args: any, options: any): void;
|
|
1654
|
-
_handleGroupVisibility(chart: any, datasets: any[]): void;
|
|
1655
|
-
_handleLegendClick(e: any, legendItem: any, legend: any, toggleBehavior: string): void;
|
|
1656
|
-
_setupLegendTooltip(chart: any): void;
|
|
1657
|
-
_hitTestLegend(chart: any, x: number, y: number): any;
|
|
1658
|
-
_showTooltip(chart: any, e: MouseEvent, tooltipContent: string | ((context: any) => string), legendItem: any): void;
|
|
1659
|
-
_hideTooltip(chart: any): void;
|
|
1660
|
-
afterDestroy(chart: any): void;
|
|
1661
|
-
}[];
|
|
1653
|
+
protected mustHavePlugins(): never[];
|
|
1662
1654
|
protected normalize(): void;
|
|
1663
1655
|
protected configAop(config: any): any;
|
|
1664
1656
|
/**
|
|
@@ -1746,26 +1738,32 @@ declare abstract class ArcChartWrapper<TType extends ArcChartType> extends Chart
|
|
|
1746
1738
|
setAllBorderColor(borderColor: string | string[]): this;
|
|
1747
1739
|
/**
|
|
1748
1740
|
* @description 각 세그먼트에 이미지를 설정합니다.
|
|
1749
|
-
* @param images - 이미지 URL 배열 (URL, Base64, SVG, Emoji 등)
|
|
1741
|
+
* @param images - 이미지 URL 배열 (URL, Base64, SVG, Emoji 등) 또는 UID 매핑 배열
|
|
1750
1742
|
* @param config - 이미지 설정 옵션
|
|
1751
1743
|
* @returns {this}
|
|
1752
1744
|
* @since 1.6.0
|
|
1753
1745
|
* @category Dataset
|
|
1754
1746
|
* @beta
|
|
1755
1747
|
* @example
|
|
1756
|
-
* // URL 방식
|
|
1748
|
+
* // URL 방식 (순서대로 매핑)
|
|
1757
1749
|
* chart.setSegmentImages([
|
|
1758
1750
|
* 'https://example.com/icon1.png',
|
|
1759
1751
|
* 'https://example.com/icon2.png'
|
|
1760
1752
|
* ]);
|
|
1761
1753
|
*
|
|
1754
|
+
* // UID 매핑 방식
|
|
1755
|
+
* chart.setSegmentImages([
|
|
1756
|
+
* { _uid: 'chart_id_ds_0', image: 'public/assets/image1.png' },
|
|
1757
|
+
* { _uid: 'chart_id_ds_1', image: 'public/assets/image2.png' }
|
|
1758
|
+
* ]);
|
|
1759
|
+
*
|
|
1762
1760
|
* // 크기 조절
|
|
1763
1761
|
* chart.setSegmentImages(
|
|
1764
1762
|
* ['image1.png', 'image2.png'],
|
|
1765
1763
|
* { width: 40, height: 40, backgroundColor: 'transparent' }
|
|
1766
1764
|
* );
|
|
1767
1765
|
*/
|
|
1768
|
-
setSegmentImages(images: string[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
1766
|
+
setSegmentImages(images: string[] | UidImageMapping[], config?: Partial<Omit<SegmentImageConfig, 'images'>>): this;
|
|
1769
1767
|
}
|
|
1770
1768
|
|
|
1771
1769
|
declare class DoughnutChartWrapper extends ArcChartWrapper<'doughnut'> implements DoughnutChartBuilder {
|
|
@@ -2648,4 +2646,4 @@ declare const T$: {
|
|
|
2648
2646
|
};
|
|
2649
2647
|
|
|
2650
2648
|
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 };
|
|
2649
|
+
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 };
|