stz-chart-maker 1.6.3 → 1.6.5

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +35 -30
  2. package/dist/index.js +2399 -2319
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -825,10 +825,13 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
825
825
  * @category Dataset
826
826
  */
827
827
  protected decorateDataset(ds: any, idx: number): void;
828
- protected mustHavePlugins(): {
828
+ protected mustHavePlugins(): ({
829
829
  id: string;
830
- _tooltips: WeakMap<WeakKey, any>;
831
830
  afterDraw(chart: any, args: any, options: any): void;
831
+ afterDestroy(chart: any): void;
832
+ } | {
833
+ id: string;
834
+ _tooltips: WeakMap<WeakKey, any>;
832
835
  afterInit(chart: any, args: any, options: any): void;
833
836
  beforeUpdate(chart: any, args: any, options: any): void;
834
837
  _handleGroupVisibility(chart: any, datasets: any[]): void;
@@ -838,7 +841,7 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
838
841
  _showTooltip(chart: any, e: MouseEvent, tooltipContent: string | ((context: any) => string), legendItem: any): void;
839
842
  _hideTooltip(chart: any): void;
840
843
  afterDestroy(chart: any): void;
841
- }[];
844
+ })[];
842
845
  protected isLine(): boolean;
843
846
  protected isScatter(): boolean;
844
847
  protected isBar(): boolean;
@@ -881,16 +884,18 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
881
884
  */
882
885
  setScales(scales: CommonAxesSacels): this;
883
886
  /**
884
- * @description 카테시안 차트의 축 제목을 설정합니다.
885
- * @param axis
886
- * @param titleConfig
887
+ * @description 카테시안 차트의 축 제목을 설정합니다. x, y 뿐만 아니라 y1, x1 등 커스텀 축도 지원합니다.
888
+ * @param {string} axis - 축의 ID (예: 'x', 'y', 'y1', 'x1')
889
+ * @param {CommonCartesianTitleConfig} titleConfig - 축 제목 설정 옵션
887
890
  * @returns {this}
888
891
  * @since 1.0.0
889
892
  * @category Scales
890
- * @defaultValue
891
- *
893
+ * @example
894
+ * chart.setAxisTitle('y', { display: true, text: 'Primary Y Axis' });
895
+ * chart.setAxisTitle('y1', { display: true, text: 'Secondary Y Axis' });
896
+ * chart.setAxisTitle('x', { display: true, text: 'Time', color: '#333' });
892
897
  */
893
- setAxisTitle(axis: 'x' | 'y', titleConfig: CommonCartesianTitleConfig): this;
898
+ setAxisTitle(axis: string, titleConfig: CommonCartesianTitleConfig): this;
894
899
  /**
895
900
  * @description 카테시안 차트의 그리드 옵션을 설정합니다.
896
901
  * @param axis
@@ -1650,7 +1655,11 @@ declare abstract class ArcChartWrapper<TType extends ArcChartType> extends Chart
1650
1655
  * @beta
1651
1656
  */
1652
1657
  protected decorateDataset(ds: any, idx: number): void;
1653
- protected mustHavePlugins(): never[];
1658
+ protected mustHavePlugins(): {
1659
+ id: string;
1660
+ afterDraw(chart: any, args: any, options: any): void;
1661
+ afterDestroy(chart: any): void;
1662
+ }[];
1654
1663
  protected normalize(): void;
1655
1664
  protected configAop(config: any): any;
1656
1665
  /**
@@ -2084,24 +2093,15 @@ declare class PieChartWrapper extends ArcChartWrapper<'pie'> implements PieChart
2084
2093
  * ═════════════════════════════════════════════════════════════
2085
2094
  */
2086
2095
 
2087
- declare class TreemapChartWrapper<DType = Record<string, unknown>> extends ChartWrapper<'treemap', CustomTreemapChartOptions> implements TreemapChartBuilder {
2096
+ declare class TreemapChartWrapper extends ChartWrapper<'treemap', CustomTreemapChartOptions> implements TreemapChartBuilder {
2088
2097
  private _chartId?;
2089
- constructor(type: 'treemap', labels: any, datasets: CustomTreemapDataset<DType>[], options?: CustomTreemapChartOptions, plugins?: Plugin$1);
2098
+ constructor(type: 'treemap', labels: undefined, datasets: CustomTreemapDataset[], options?: CustomTreemapChartOptions, plugins?: Plugin$1);
2090
2099
  get chartId(): string;
2091
2100
  set chartId(value: string);
2092
2101
  protected normalize(): void;
2093
2102
  protected mustHavePlugins(): {
2094
2103
  id: string;
2095
- _tooltips: WeakMap<WeakKey, any>;
2096
2104
  afterDraw(chart: any, args: any, options: any): void;
2097
- afterInit(chart: any, args: any, options: any): void;
2098
- beforeUpdate(chart: any, args: any, options: any): void;
2099
- _handleGroupVisibility(chart: any, datasets: any[]): void;
2100
- _handleLegendClick(e: any, legendItem: any, legend: any, toggleBehavior: string): void;
2101
- _setupLegendTooltip(chart: any): void;
2102
- _hitTestLegend(chart: any, x: number, y: number): any;
2103
- _showTooltip(chart: any, e: MouseEvent, tooltipContent: string | ((context: any) => string), legendItem: any): void;
2104
- _hideTooltip(chart: any): void;
2105
2105
  afterDestroy(chart: any): void;
2106
2106
  }[];
2107
2107
  protected configAop(config: any): any;
@@ -2120,7 +2120,7 @@ declare class TreemapChartWrapper<DType = Record<string, unknown>> extends Chart
2120
2120
  * @since 1.0.0
2121
2121
  * @category Data
2122
2122
  */
2123
- setTreeData(data: DType[] | number[] | Record<string, unknown>): this;
2123
+ setTreeData(data: Record<string, unknown>[] | number[] | Record<string, unknown>): this;
2124
2124
  /**
2125
2125
  * @description 색상을 결정하는 키를 설정합니다.
2126
2126
  * @param key - 색상 키
@@ -2227,8 +2227,15 @@ declare const customLegend: {
2227
2227
  afterUpdate(chart: any, args: any, options: any): void;
2228
2228
  };
2229
2229
  /**
2230
- * @description 차트가 마운트될 때 호출되는 플러그인입니다. 마운트 후 chartjs 인스턴스를 등록하고 _mount 콜백을 실행합니다. 데이터셋의 부가적인 키를 추가하여 범례 동작을 제어하거나 툴팁을 표시할 수 있습니다.
2231
- *
2230
+ * @description 차트가 마운트될 때 호출되는 플러그인입니다.
2231
+ */
2232
+ declare const chartMountPlugin: {
2233
+ id: string;
2234
+ afterDraw(chart: any, args: any, options: any): void;
2235
+ afterDestroy(chart: any): void;
2236
+ };
2237
+ /**
2238
+ * @description 커스텀 데이터셋 속성을 읽어서 핸들링하는 플러그인
2232
2239
  * **지원하는 커스텀 데이터셋 속성:**
2233
2240
  * - `_aux: boolean` - 차트에는 그려지지만 범례에서 제외
2234
2241
  * - `_group: string | number` - 같은 그룹의 데이터셋들이 함께 show/hide
@@ -2299,13 +2306,9 @@ declare const customLegend: {
2299
2306
  *
2300
2307
  * @beta (aux 정상동작 , _group : 에러 , groupLabel : 정상 , _tooltip : 에러 , _toggleBehavior : 정상 , _visible : 정상 , _legendOrder : 확인중)
2301
2308
  */
2302
- /**
2303
- * @description 차트가 마운트될 때 호출되는 플러그인입니다.
2304
- */
2305
- declare const chartMountPlugin: {
2309
+ declare const customDatasetPlugins: {
2306
2310
  id: string;
2307
2311
  _tooltips: WeakMap<WeakKey, any>;
2308
- afterDraw(chart: any, args: any, options: any): void;
2309
2312
  afterInit(chart: any, args: any, options: any): void;
2310
2313
  beforeUpdate(chart: any, args: any, options: any): void;
2311
2314
  _handleGroupVisibility(chart: any, datasets: any[]): void;
@@ -2448,6 +2451,7 @@ declare const LocalDefaults_createDefaultDoughnutOptions: typeof createDefaultDo
2448
2451
  declare const LocalDefaults_createDefaultLineOptions: typeof createDefaultLineOptions;
2449
2452
  declare const LocalDefaults_createDefaultPieOptions: typeof createDefaultPieOptions;
2450
2453
  declare const LocalDefaults_createDefaultTreemapOptions: typeof createDefaultTreemapOptions;
2454
+ declare const LocalDefaults_customDatasetPlugins: typeof customDatasetPlugins;
2451
2455
  declare const LocalDefaults_customLegend: typeof customLegend;
2452
2456
  declare const LocalDefaults_defaultBarScales: typeof defaultBarScales;
2453
2457
  declare const LocalDefaults_defaultBarTooltipCallback: typeof defaultBarTooltipCallback;
@@ -2481,6 +2485,7 @@ declare namespace LocalDefaults {
2481
2485
  LocalDefaults_createDefaultLineOptions as createDefaultLineOptions,
2482
2486
  LocalDefaults_createDefaultPieOptions as createDefaultPieOptions,
2483
2487
  LocalDefaults_createDefaultTreemapOptions as createDefaultTreemapOptions,
2488
+ LocalDefaults_customDatasetPlugins as customDatasetPlugins,
2484
2489
  LocalDefaults_customLegend as customLegend,
2485
2490
  LocalDefaults_defaultBarScales as defaultBarScales,
2486
2491
  LocalDefaults_defaultBarTooltipCallback as defaultBarTooltipCallback,
@@ -2645,5 +2650,5 @@ declare const T$: {
2645
2650
  };
2646
2651
  };
2647
2652
 
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 };
2653
+ 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, 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 };
2649
2654
  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 };