@toast-ui/chart
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -89,3 +89,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class AreaChart extends Chart<AreaChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: AreaChartProps); | ||
@@ -92,0 +91,0 @@ initialize(): void; |
@@ -118,4 +118,4 @@ import Chart from "./chart"; | ||
categories: props.data.categories, | ||
modules: [stackSeriesData, dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [stackSeriesData, dataRange, scale, axes, plot]; | ||
/** | ||
@@ -122,0 +122,0 @@ * Add data. |
@@ -85,3 +85,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class BarChart extends Chart<BarChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data }: BarChartProps); | ||
@@ -88,0 +87,0 @@ initialize(): void; |
@@ -113,4 +113,4 @@ import Chart from "./chart"; | ||
categories: data.categories, | ||
modules: [stackSeriesData, dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [stackSeriesData, dataRange, scale, axes, plot]; | ||
/** | ||
@@ -117,0 +117,0 @@ * Add data. |
@@ -81,3 +81,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class BoxPlotChart extends Chart<BoxPlotChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data: { series, categories } }: BoxPlotChartProps); | ||
@@ -84,0 +83,0 @@ initialize(): void; |
@@ -104,4 +104,4 @@ import Chart from "./chart"; | ||
categories, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -108,0 +108,0 @@ * Add data. |
@@ -81,3 +81,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class BubbleChart extends Chart<BaseOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: BubbleChartProps); | ||
@@ -84,0 +83,0 @@ initialize(): void; |
@@ -104,4 +104,4 @@ import Chart from "./chart"; | ||
}, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -108,0 +108,0 @@ * Add data. |
@@ -83,3 +83,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class BulletChart extends Chart<BulletChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data: { series } }: BulletChartProps); | ||
@@ -86,0 +85,0 @@ initialize(): void; |
@@ -106,4 +106,4 @@ import Chart from "./chart"; | ||
}, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -110,0 +110,0 @@ * Hide series data label. |
@@ -38,3 +38,3 @@ import Store from "../store/store"; | ||
readonly componentManager: ComponentManager<T>; | ||
modules?: StoreModule[]; | ||
modules: StoreModule[]; | ||
enteredComponents: Component[]; | ||
@@ -54,3 +54,3 @@ animationControlFlag: { | ||
handleEvent(event: MouseEvent): void; | ||
protected initStore(defaultModules: StoreModule[]): void; | ||
protected initStore(): void; | ||
protected initialize(): void; | ||
@@ -57,0 +57,0 @@ draw(): void; |
@@ -44,2 +44,3 @@ import Store from "../store/store"; | ||
constructor(props) { | ||
var _a, _b, _c, _d; | ||
this.___animId___ = null; | ||
@@ -244,3 +245,4 @@ this.painter = new Painter(this); | ||
}; | ||
const { el, options, series, categories } = props; | ||
const { el, options, series, categories, modules } = props; | ||
this.modules = (modules !== null && modules !== void 0 ? modules : []); | ||
if (isUndefined(options.usageStatistics) || options.usageStatistics) { | ||
@@ -285,13 +287,9 @@ sendHostname(); | ||
}, 10)); | ||
// for using class field "modules" | ||
setTimeout(() => { | ||
var _a, _b, _c, _d; | ||
this.initialize(); | ||
this.store.observe(() => { | ||
this.painter.setup(); | ||
}); | ||
if (isAutoValue((_b = (_a = options) === null || _a === void 0 ? void 0 : _a.chart) === null || _b === void 0 ? void 0 : _b.width) || isAutoValue((_d = (_c = options) === null || _c === void 0 ? void 0 : _c.chart) === null || _d === void 0 ? void 0 : _d.height)) { | ||
this.setResizeEvent(); | ||
} | ||
}, 0); | ||
this.initialize(); | ||
this.store.observe(() => { | ||
this.painter.setup(); | ||
}); | ||
if (isAutoValue((_b = (_a = options) === null || _a === void 0 ? void 0 : _a.chart) === null || _b === void 0 ? void 0 : _b.width) || isAutoValue((_d = (_c = options) === null || _c === void 0 ? void 0 : _c.chart) === null || _d === void 0 ? void 0 : _d.height)) { | ||
this.setResizeEvent(); | ||
} | ||
} | ||
@@ -407,8 +405,16 @@ getAnimationDuration(animationOption) { | ||
} | ||
initStore(defaultModules) { | ||
var _a; | ||
[...defaultModules, ...(_a = this.modules, (_a !== null && _a !== void 0 ? _a : []))].forEach((module) => this.store.setModule(module)); | ||
initStore() { | ||
[ | ||
root, | ||
optionsStore, | ||
theme, | ||
seriesData, | ||
legend, | ||
layout, | ||
category, | ||
...this.modules, | ||
].forEach((module) => this.store.setModule(module)); | ||
} | ||
initialize() { | ||
this.initStore([root, optionsStore, theme, seriesData, legend, layout, category]); | ||
this.initStore(); | ||
this.store.dispatch('initChartSize', this.el); | ||
@@ -415,0 +421,0 @@ } |
@@ -86,3 +86,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class ColumnChart extends Chart<ColumnChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data }: ColumnChartProps); | ||
@@ -89,0 +88,0 @@ initialize(): void; |
@@ -113,4 +113,4 @@ import Chart from "./chart"; | ||
categories: data.categories, | ||
modules: [stackSeriesData, dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [stackSeriesData, dataRange, scale, axes, plot]; | ||
/** | ||
@@ -117,0 +117,0 @@ * Add data. |
@@ -88,3 +88,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class ColumnLineChart extends Chart<ColumnLineChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data: { series, categories } }: ColumnLineChartProps); | ||
@@ -91,0 +90,0 @@ initialize(): void; |
@@ -122,4 +122,4 @@ import Chart from "./chart"; | ||
categories, | ||
modules: [stackSeriesData, dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [stackSeriesData, dataRange, scale, axes, plot]; | ||
/** | ||
@@ -126,0 +126,0 @@ * Add data. |
@@ -81,3 +81,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class HeatmapChart extends Chart<HeatmapChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: HeatmapChartProps); | ||
@@ -84,0 +83,0 @@ initialize(): void; |
@@ -112,4 +112,4 @@ import Chart from "./chart"; | ||
}, | ||
modules: [heatmapSeriesData, colorValueScale, heatmapAxes], | ||
}); | ||
this.modules = [heatmapSeriesData, colorValueScale, heatmapAxes]; | ||
/** | ||
@@ -116,0 +116,0 @@ * Add data. |
@@ -89,3 +89,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class LineAreaChart extends Chart<LineAreaChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: LineAreaChartProps); | ||
@@ -92,0 +91,0 @@ initialize(): void; |
@@ -117,4 +117,4 @@ import Chart from "./chart"; | ||
categories: props.data.categories, | ||
modules: [stackSeriesData, dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [stackSeriesData, dataRange, scale, axes, plot]; | ||
/** | ||
@@ -121,0 +121,0 @@ * Add data. |
@@ -88,3 +88,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class LineChart extends Chart<LineChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: LineChartProps); | ||
@@ -91,0 +90,0 @@ initialize(): void; |
@@ -117,4 +117,4 @@ import Chart from "./chart"; | ||
categories: (_a = props.data) === null || _a === void 0 ? void 0 : _a.categories, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -121,0 +121,0 @@ * Add data. |
@@ -81,3 +81,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class LineScatterChart extends Chart<LineScatterChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: LineScatterChartProps); | ||
@@ -84,0 +83,0 @@ initialize(): void; |
@@ -107,4 +107,4 @@ import Chart from "./chart"; | ||
series: props.data.series, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -111,0 +111,0 @@ * Add data. |
@@ -59,3 +59,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class NestedPieChart extends Chart<NestedPieChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data: { series, categories } }: NestedPieChartProps); | ||
@@ -62,0 +61,0 @@ initialize(): void; |
@@ -75,4 +75,4 @@ import Chart from "./chart"; | ||
categories, | ||
modules: [nestedPieSeriesData], | ||
}); | ||
this.modules = [nestedPieSeriesData]; | ||
/** | ||
@@ -79,0 +79,0 @@ * Hide series data label. |
@@ -71,3 +71,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class RadarChart extends Chart<RadarChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor({ el, options, data }: RadarChartProps); | ||
@@ -74,0 +73,0 @@ initialize(): void; |
@@ -93,4 +93,4 @@ import Chart from "./chart"; | ||
categories: data.categories, | ||
modules: [dataRange, scale, axes], | ||
}); | ||
this.modules = [dataRange, scale, axes]; | ||
/** | ||
@@ -97,0 +97,0 @@ * Add data. |
@@ -78,3 +78,2 @@ import Chart, { SelectSeriesInfo } from "./chart"; | ||
export default class ScatterChart extends Chart<ScatterChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: ScatterChartProps); | ||
@@ -81,0 +80,0 @@ initialize(): void; |
@@ -121,4 +121,4 @@ import Chart from "./chart"; | ||
categories: (_a = props.data) === null || _a === void 0 ? void 0 : _a.categories, | ||
modules: [dataRange, scale, axes, plot], | ||
}); | ||
this.modules = [dataRange, scale, axes, plot]; | ||
/** | ||
@@ -125,0 +125,0 @@ * Add data. |
@@ -61,3 +61,2 @@ import Chart, { AddSeriesDataInfo, SelectSeriesInfo } from "./chart"; | ||
export default class TreemapChart extends Chart<TreemapChartOptions> { | ||
modules: import("../../types/store/store").StoreModule[]; | ||
constructor(props: TreemapChartProps); | ||
@@ -64,0 +63,0 @@ initialize(): void; |
@@ -81,4 +81,4 @@ import Chart from "./chart"; | ||
}, | ||
modules: [treemapSeriesData, colorValueScale], | ||
}); | ||
this.modules = [treemapSeriesData, colorValueScale]; | ||
/** | ||
@@ -85,0 +85,0 @@ * Hide series data label. |
{ | ||
"name": "@toast-ui/chart", | ||
"version": "4.0.3", | ||
"version": "4.0.4", | ||
"description": "TOAST UI Application: Chart", | ||
@@ -138,3 +138,3 @@ "main": "dist/toastui-chart.js", | ||
}, | ||
"gitHead": "9cc28a1db1d81619660f2433fd77f677305dbee7" | ||
"gitHead": "86529a34714dde77b79e6424ac3b114bdbb1d4d4" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Categories, RawSeries, Options } from '@t/store/store'; | ||
import { Categories, RawSeries, Options, StoreModule } from '@t/store/store'; | ||
import { TooltipData, TooltipModel } from '@t/components/tooltip'; | ||
@@ -538,2 +538,3 @@ import { ScatterSeriesIconType } from '@t/components/series'; | ||
categories?: Categories; | ||
modules?: StoreModule[]; | ||
options: T; | ||
@@ -540,0 +541,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3139788
56472