stz-chart-maker 1.1.0 → 1.1.2
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 +26 -4
- package/dist/index.js +1577 -1534
- package/package.json +5 -1
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;
|
|
@@ -320,6 +320,7 @@ interface LineChartBuilder extends CartesianChartBuilder<'line'> {
|
|
|
320
320
|
setAllPointRadius(radius: number): this;
|
|
321
321
|
setPointHoverRadius(datasetIndex: number, hoverRadius: number): this;
|
|
322
322
|
setAllPointHoverRadius(hoverRadius: number): this;
|
|
323
|
+
spakeLineChart(): this;
|
|
323
324
|
}
|
|
324
325
|
interface RadarChartBuilder extends ChartBuilder<'radar'> {
|
|
325
326
|
}
|
|
@@ -386,6 +387,16 @@ interface ChartConfig {
|
|
|
386
387
|
options: any;
|
|
387
388
|
plugins?: any;
|
|
388
389
|
}
|
|
390
|
+
type ChartBuilderMap = {
|
|
391
|
+
line: LineChartBuilder;
|
|
392
|
+
bar: BarChartBuilder;
|
|
393
|
+
scatter: CartesianChartBuilder<'scatter'>;
|
|
394
|
+
bubble: CartesianChartBuilder<'bubble'>;
|
|
395
|
+
doughnut: DoughnutChartBuilder;
|
|
396
|
+
pie: PieChartBuilder;
|
|
397
|
+
radar: ChartBuilder<'radar'>;
|
|
398
|
+
polarArea: ChartBuilder<'polarArea'>;
|
|
399
|
+
};
|
|
389
400
|
declare abstract class ChartWrapper<TType extends ChartType, TOptions extends CustomChartOptions<TType> = CustomChartOptions<TType>> implements ChartBuilder<TType> {
|
|
390
401
|
protected type: TType;
|
|
391
402
|
protected labels: (string | number)[];
|
|
@@ -394,7 +405,7 @@ declare abstract class ChartWrapper<TType extends ChartType, TOptions extends Cu
|
|
|
394
405
|
protected plugins?: any | undefined;
|
|
395
406
|
static registry: Map<string, Constructor<any, any>>;
|
|
396
407
|
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
|
|
408
|
+
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
409
|
static register<TType extends ChartType, TInstance>(type: TType, wrapperClass: Constructor<TType, TInstance>): void;
|
|
399
410
|
static has(type: ChartType): boolean;
|
|
400
411
|
protected abstract normalize(): void;
|
|
@@ -1069,6 +1080,14 @@ declare class LineChartWrapper extends CartesianChartWrapper<'line'> implements
|
|
|
1069
1080
|
* @beta (기능 테스트 중)
|
|
1070
1081
|
*/
|
|
1071
1082
|
private calculateGradientPositions;
|
|
1083
|
+
/**
|
|
1084
|
+
* @description 스파크라인 차트 옵션을 적용합니다.
|
|
1085
|
+
* @returns {this}
|
|
1086
|
+
* @since 1.0.0
|
|
1087
|
+
* @category options
|
|
1088
|
+
* @beta (기능 테스트 중)
|
|
1089
|
+
*/
|
|
1090
|
+
spakeLineChart(): this;
|
|
1072
1091
|
}
|
|
1073
1092
|
|
|
1074
1093
|
/**
|
|
@@ -1388,6 +1407,7 @@ declare const createDefaultBarOptions: (userOptions?: CustomBarChartOptions, def
|
|
|
1388
1407
|
declare const defaultLineTooltipCallback: (context: TooltipItem<"line">) => string;
|
|
1389
1408
|
declare const defaultLineScales: CommonAxesSacels;
|
|
1390
1409
|
declare const createDefaultLineOptions: (userOptions?: CustomLineChartOptions, defaultScales?: CommonAxesSacels) => CustomLineChartOptions;
|
|
1410
|
+
declare const spakeLineOptions: CustomLineChartOptions;
|
|
1391
1411
|
|
|
1392
1412
|
declare const LocalDefaults_CreateZoomRangeSlider: typeof CreateZoomRangeSlider;
|
|
1393
1413
|
declare const LocalDefaults_barScaleImgPlugin: typeof barScaleImgPlugin;
|
|
@@ -1405,6 +1425,7 @@ declare const LocalDefaults_doughnutCenterTextPlugin: typeof doughnutCenterTextP
|
|
|
1405
1425
|
declare const LocalDefaults_loadingPlugin: typeof loadingPlugin;
|
|
1406
1426
|
declare const LocalDefaults_makeCenterHtml: typeof makeCenterHtml;
|
|
1407
1427
|
declare const LocalDefaults_noDataPlugin: typeof noDataPlugin;
|
|
1428
|
+
declare const LocalDefaults_spakeLineOptions: typeof spakeLineOptions;
|
|
1408
1429
|
declare const LocalDefaults_zoomRangeSlider: typeof zoomRangeSlider;
|
|
1409
1430
|
declare const LocalDefaults_zoomResetPlugin: typeof zoomResetPlugin;
|
|
1410
1431
|
declare namespace LocalDefaults {
|
|
@@ -1425,6 +1446,7 @@ declare namespace LocalDefaults {
|
|
|
1425
1446
|
LocalDefaults_loadingPlugin as loadingPlugin,
|
|
1426
1447
|
LocalDefaults_makeCenterHtml as makeCenterHtml,
|
|
1427
1448
|
LocalDefaults_noDataPlugin as noDataPlugin,
|
|
1449
|
+
LocalDefaults_spakeLineOptions as spakeLineOptions,
|
|
1428
1450
|
LocalDefaults_zoomRangeSlider as zoomRangeSlider,
|
|
1429
1451
|
LocalDefaults_zoomResetPlugin as zoomResetPlugin,
|
|
1430
1452
|
};
|
|
@@ -1481,5 +1503,5 @@ declare const T$: {
|
|
|
1481
1503
|
};
|
|
1482
1504
|
};
|
|
1483
1505
|
|
|
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 };
|
|
1506
|
+
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, spakeLineOptions, zoomRangeSlider, zoomResetPlugin };
|
|
1485
1507
|
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 };
|