@techie_doubts/tui.chart.2026 4.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/README.md +165 -0
- package/dist/esm/animator.d.ts +32 -0
- package/dist/esm/animator.js +102 -0
- package/dist/esm/brushes/axis.d.ts +3 -0
- package/dist/esm/brushes/axis.js +21 -0
- package/dist/esm/brushes/basic.d.ts +9 -0
- package/dist/esm/brushes/basic.js +95 -0
- package/dist/esm/brushes/boxPlot.d.ts +2 -0
- package/dist/esm/brushes/boxPlot.js +22 -0
- package/dist/esm/brushes/circleLegend.d.ts +2 -0
- package/dist/esm/brushes/circleLegend.js +26 -0
- package/dist/esm/brushes/dataLabel.d.ts +6 -0
- package/dist/esm/brushes/dataLabel.js +176 -0
- package/dist/esm/brushes/exportMenu.d.ts +2 -0
- package/dist/esm/brushes/exportMenu.js +55 -0
- package/dist/esm/brushes/gauge.d.ts +2 -0
- package/dist/esm/brushes/gauge.js +39 -0
- package/dist/esm/brushes/label.d.ts +34 -0
- package/dist/esm/brushes/label.js +165 -0
- package/dist/esm/brushes/legend.d.ts +7 -0
- package/dist/esm/brushes/legend.js +162 -0
- package/dist/esm/brushes/lineSeries.d.ts +5 -0
- package/dist/esm/brushes/lineSeries.js +41 -0
- package/dist/esm/brushes/polygon.d.ts +2 -0
- package/dist/esm/brushes/polygon.js +24 -0
- package/dist/esm/brushes/resetButton.d.ts +3 -0
- package/dist/esm/brushes/resetButton.js +112 -0
- package/dist/esm/brushes/scatterSeries.d.ts +2 -0
- package/dist/esm/brushes/scatterSeries.js +125 -0
- package/dist/esm/brushes/sector.d.ts +2 -0
- package/dist/esm/brushes/sector.js +54 -0
- package/dist/esm/brushes/spectrumLegend.d.ts +14 -0
- package/dist/esm/brushes/spectrumLegend.js +199 -0
- package/dist/esm/charts/areaChart.d.ts +254 -0
- package/dist/esm/charts/areaChart.js +358 -0
- package/dist/esm/charts/barChart.d.ts +203 -0
- package/dist/esm/charts/barChart.js +300 -0
- package/dist/esm/charts/boxPlotChart.d.ts +209 -0
- package/dist/esm/charts/boxPlotChart.js +288 -0
- package/dist/esm/charts/bubbleChart.d.ts +188 -0
- package/dist/esm/charts/bubbleChart.js +263 -0
- package/dist/esm/charts/bulletChart.d.ts +199 -0
- package/dist/esm/charts/bulletChart.js +278 -0
- package/dist/esm/charts/chart.d.ts +133 -0
- package/dist/esm/charts/chart.js +484 -0
- package/dist/esm/charts/columnChart.d.ts +205 -0
- package/dist/esm/charts/columnChart.js +299 -0
- package/dist/esm/charts/columnLineChart.d.ts +271 -0
- package/dist/esm/charts/columnLineChart.js +386 -0
- package/dist/esm/charts/gaugeChart.d.ts +191 -0
- package/dist/esm/charts/gaugeChart.js +279 -0
- package/dist/esm/charts/heatmapChart.d.ts +199 -0
- package/dist/esm/charts/heatmapChart.js +292 -0
- package/dist/esm/charts/lineAreaChart.d.ts +271 -0
- package/dist/esm/charts/lineAreaChart.js +374 -0
- package/dist/esm/charts/lineChart.d.ts +253 -0
- package/dist/esm/charts/lineChart.js +360 -0
- package/dist/esm/charts/lineScatterChart.d.ts +200 -0
- package/dist/esm/charts/lineScatterChart.js +285 -0
- package/dist/esm/charts/nestedPieChart.d.ts +192 -0
- package/dist/esm/charts/nestedPieChart.js +268 -0
- package/dist/esm/charts/pieChart.d.ts +156 -0
- package/dist/esm/charts/pieChart.js +224 -0
- package/dist/esm/charts/radarChart.d.ts +169 -0
- package/dist/esm/charts/radarChart.js +240 -0
- package/dist/esm/charts/radialBarChart.d.ts +172 -0
- package/dist/esm/charts/radialBarChart.js +251 -0
- package/dist/esm/charts/scatterChart.d.ts +184 -0
- package/dist/esm/charts/scatterChart.js +279 -0
- package/dist/esm/charts/treemapChart.d.ts +166 -0
- package/dist/esm/charts/treemapChart.js +239 -0
- package/dist/esm/component/areaSeries.d.ts +96 -0
- package/dist/esm/component/areaSeries.js +474 -0
- package/dist/esm/component/axis.d.ts +40 -0
- package/dist/esm/component/axis.js +176 -0
- package/dist/esm/component/axisTitle.d.ts +25 -0
- package/dist/esm/component/axisTitle.js +67 -0
- package/dist/esm/component/axisUsingCenterY.d.ts +32 -0
- package/dist/esm/component/axisUsingCenterY.js +175 -0
- package/dist/esm/component/backButton.d.ts +13 -0
- package/dist/esm/component/backButton.js +26 -0
- package/dist/esm/component/background.d.ts +10 -0
- package/dist/esm/component/background.js +15 -0
- package/dist/esm/component/boxPlotSeries.d.ts +126 -0
- package/dist/esm/component/boxPlotSeries.js +410 -0
- package/dist/esm/component/boxSeries.d.ts +211 -0
- package/dist/esm/component/boxSeries.js +603 -0
- package/dist/esm/component/boxStackSeries.d.ts +62 -0
- package/dist/esm/component/boxStackSeries.js +447 -0
- package/dist/esm/component/bubbleSeries.d.ts +35 -0
- package/dist/esm/component/bubbleSeries.js +174 -0
- package/dist/esm/component/bulletSeries.d.ts +89 -0
- package/dist/esm/component/bulletSeries.js +392 -0
- package/dist/esm/component/circleLegend.d.ts +10 -0
- package/dist/esm/component/circleLegend.js +37 -0
- package/dist/esm/component/component.d.ts +64 -0
- package/dist/esm/component/component.js +170 -0
- package/dist/esm/component/componentManager.d.ts +23 -0
- package/dist/esm/component/componentManager.js +45 -0
- package/dist/esm/component/dataLabels.d.ts +23 -0
- package/dist/esm/component/dataLabels.js +134 -0
- package/dist/esm/component/exportMenu.d.ts +38 -0
- package/dist/esm/component/exportMenu.js +147 -0
- package/dist/esm/component/gaugeSeries.d.ts +160 -0
- package/dist/esm/component/gaugeSeries.js +447 -0
- package/dist/esm/component/heatmapSeries.d.ts +64 -0
- package/dist/esm/component/heatmapSeries.js +152 -0
- package/dist/esm/component/hoveredSeries.d.ts +27 -0
- package/dist/esm/component/hoveredSeries.js +95 -0
- package/dist/esm/component/legend.d.ts +26 -0
- package/dist/esm/component/legend.js +149 -0
- package/dist/esm/component/lineSeries.d.ts +69 -0
- package/dist/esm/component/lineSeries.js +319 -0
- package/dist/esm/component/noDataText.d.ts +9 -0
- package/dist/esm/component/noDataText.js +31 -0
- package/dist/esm/component/pieSeries.d.ts +137 -0
- package/dist/esm/component/pieSeries.js +390 -0
- package/dist/esm/component/plot.d.ts +37 -0
- package/dist/esm/component/plot.js +163 -0
- package/dist/esm/component/radarSeries.d.ts +85 -0
- package/dist/esm/component/radarSeries.js +222 -0
- package/dist/esm/component/radialAxis.d.ts +26 -0
- package/dist/esm/component/radialAxis.js +210 -0
- package/dist/esm/component/radialBarSeries.d.ts +111 -0
- package/dist/esm/component/radialBarSeries.js +349 -0
- package/dist/esm/component/radialPlot.d.ts +55 -0
- package/dist/esm/component/radialPlot.js +188 -0
- package/dist/esm/component/rangeSelection.d.ts +61 -0
- package/dist/esm/component/rangeSelection.js +150 -0
- package/dist/esm/component/resetButton.d.ts +13 -0
- package/dist/esm/component/resetButton.js +26 -0
- package/dist/esm/component/scatterSeries.d.ts +34 -0
- package/dist/esm/component/scatterSeries.js +159 -0
- package/dist/esm/component/selectedSeries.d.ts +26 -0
- package/dist/esm/component/selectedSeries.js +109 -0
- package/dist/esm/component/spectrumLegend.d.ts +15 -0
- package/dist/esm/component/spectrumLegend.js +76 -0
- package/dist/esm/component/title.d.ts +12 -0
- package/dist/esm/component/title.js +53 -0
- package/dist/esm/component/tooltip.d.ts +41 -0
- package/dist/esm/component/tooltip.js +131 -0
- package/dist/esm/component/treemapSeries.d.ts +57 -0
- package/dist/esm/component/treemapSeries.js +191 -0
- package/dist/esm/component/zeroAxis.d.ts +9 -0
- package/dist/esm/component/zeroAxis.js +49 -0
- package/dist/esm/eventEmitter.d.ts +8 -0
- package/dist/esm/eventEmitter.js +15 -0
- package/dist/esm/helpers/arrayUtil.d.ts +10 -0
- package/dist/esm/helpers/arrayUtil.js +54 -0
- package/dist/esm/helpers/axes.d.ts +67 -0
- package/dist/esm/helpers/axes.js +345 -0
- package/dist/esm/helpers/boxSeries.d.ts +5 -0
- package/dist/esm/helpers/boxSeries.js +71 -0
- package/dist/esm/helpers/calculator.d.ts +19 -0
- package/dist/esm/helpers/calculator.js +153 -0
- package/dist/esm/helpers/color.d.ts +153 -0
- package/dist/esm/helpers/color.js +218 -0
- package/dist/esm/helpers/colorSpectrum.d.ts +5 -0
- package/dist/esm/helpers/colorSpectrum.js +17 -0
- package/dist/esm/helpers/coordinate.d.ts +9 -0
- package/dist/esm/helpers/coordinate.js +51 -0
- package/dist/esm/helpers/dataLabels.d.ts +36 -0
- package/dist/esm/helpers/dataLabels.js +405 -0
- package/dist/esm/helpers/dom.d.ts +2 -0
- package/dist/esm/helpers/dom.js +8 -0
- package/dist/esm/helpers/downloader.d.ts +7 -0
- package/dist/esm/helpers/downloader.js +287 -0
- package/dist/esm/helpers/formatDate.d.ts +16 -0
- package/dist/esm/helpers/formatDate.js +140 -0
- package/dist/esm/helpers/geometric.d.ts +3 -0
- package/dist/esm/helpers/geometric.js +35 -0
- package/dist/esm/helpers/googleAnalytics.d.ts +1 -0
- package/dist/esm/helpers/googleAnalytics.js +39 -0
- package/dist/esm/helpers/htmlSanitizer.d.ts +1 -0
- package/dist/esm/helpers/htmlSanitizer.js +86 -0
- package/dist/esm/helpers/legend.d.ts +9 -0
- package/dist/esm/helpers/legend.js +47 -0
- package/dist/esm/helpers/pieSeries.d.ts +15 -0
- package/dist/esm/helpers/pieSeries.js +72 -0
- package/dist/esm/helpers/plot.d.ts +2 -0
- package/dist/esm/helpers/plot.js +4 -0
- package/dist/esm/helpers/radarSeries.d.ts +1 -0
- package/dist/esm/helpers/radarSeries.js +7 -0
- package/dist/esm/helpers/range.d.ts +6 -0
- package/dist/esm/helpers/range.js +16 -0
- package/dist/esm/helpers/responders.d.ts +37 -0
- package/dist/esm/helpers/responders.js +197 -0
- package/dist/esm/helpers/sector.d.ts +55 -0
- package/dist/esm/helpers/sector.js +117 -0
- package/dist/esm/helpers/squarifier.d.ts +8 -0
- package/dist/esm/helpers/squarifier.js +110 -0
- package/dist/esm/helpers/style.d.ts +14 -0
- package/dist/esm/helpers/style.js +48 -0
- package/dist/esm/helpers/theme.d.ts +58 -0
- package/dist/esm/helpers/theme.js +557 -0
- package/dist/esm/helpers/tooltip.d.ts +2 -0
- package/dist/esm/helpers/tooltip.js +18 -0
- package/dist/esm/helpers/tooltipTemplate.d.ts +21 -0
- package/dist/esm/helpers/tooltipTemplate.js +147 -0
- package/dist/esm/helpers/utils.d.ts +42 -0
- package/dist/esm/helpers/utils.js +268 -0
- package/dist/esm/helpers/validation.d.ts +6 -0
- package/dist/esm/helpers/validation.js +16 -0
- package/dist/esm/index.d.ts +40 -0
- package/dist/esm/index.js +75 -0
- package/dist/esm/message.d.ts +11 -0
- package/dist/esm/message.js +11 -0
- package/dist/esm/painter.d.ts +27 -0
- package/dist/esm/painter.js +88 -0
- package/dist/esm/responderDetectors.d.ts +6 -0
- package/dist/esm/responderDetectors.js +124 -0
- package/dist/esm/scale/coordinateScaleCalculator.d.ts +24 -0
- package/dist/esm/scale/coordinateScaleCalculator.js +174 -0
- package/dist/esm/scale/datetimeScaleCalculator.d.ts +20 -0
- package/dist/esm/scale/datetimeScaleCalculator.js +59 -0
- package/dist/esm/store/axes.d.ts +30 -0
- package/dist/esm/store/axes.js +282 -0
- package/dist/esm/store/category.d.ts +4 -0
- package/dist/esm/store/category.js +73 -0
- package/dist/esm/store/colorValueScale.d.ts +3 -0
- package/dist/esm/store/colorValueScale.js +56 -0
- package/dist/esm/store/dataRange.d.ts +4 -0
- package/dist/esm/store/dataRange.js +170 -0
- package/dist/esm/store/gaugeAxes.d.ts +4 -0
- package/dist/esm/store/gaugeAxes.js +175 -0
- package/dist/esm/store/heatmapAxes.d.ts +3 -0
- package/dist/esm/store/heatmapAxes.js +98 -0
- package/dist/esm/store/heatmapSeriesData.d.ts +3 -0
- package/dist/esm/store/heatmapSeriesData.js +34 -0
- package/dist/esm/store/layout.d.ts +12 -0
- package/dist/esm/store/layout.js +487 -0
- package/dist/esm/store/legend.d.ts +3 -0
- package/dist/esm/store/legend.js +435 -0
- package/dist/esm/store/nestedPieSeriesData.d.ts +3 -0
- package/dist/esm/store/nestedPieSeriesData.js +49 -0
- package/dist/esm/store/options.d.ts +3 -0
- package/dist/esm/store/options.js +62 -0
- package/dist/esm/store/plot.d.ts +3 -0
- package/dist/esm/store/plot.js +102 -0
- package/dist/esm/store/radialAxes.d.ts +8 -0
- package/dist/esm/store/radialAxes.js +199 -0
- package/dist/esm/store/reactive.d.ts +11 -0
- package/dist/esm/store/reactive.js +196 -0
- package/dist/esm/store/root.d.ts +3 -0
- package/dist/esm/store/root.js +46 -0
- package/dist/esm/store/scale.d.ts +3 -0
- package/dist/esm/store/scale.js +102 -0
- package/dist/esm/store/seriesData.d.ts +3 -0
- package/dist/esm/store/seriesData.js +299 -0
- package/dist/esm/store/stackSeriesData.d.ts +8 -0
- package/dist/esm/store/stackSeriesData.js +192 -0
- package/dist/esm/store/store.d.ts +20 -0
- package/dist/esm/store/store.js +112 -0
- package/dist/esm/store/theme.d.ts +3 -0
- package/dist/esm/store/theme.js +139 -0
- package/dist/esm/store/treemapSeriesData.d.ts +4 -0
- package/dist/esm/store/treemapSeriesData.js +93 -0
- package/dist/td-chart.css +127 -0
- package/dist/td-chart.js +41463 -0
- package/dist/td-chart.min.css +6 -0
- package/dist/td-chart.min.js +9 -0
- package/package.json +112 -0
- package/types/brushes.d.ts +30 -0
- package/types/charts.d.ts +152 -0
- package/types/components/axis.d.ts +71 -0
- package/types/components/circleLegend.d.ts +9 -0
- package/types/components/dataLabels.d.ts +119 -0
- package/types/components/exportMenu.d.ts +14 -0
- package/types/components/legend.d.ts +27 -0
- package/types/components/plot.d.ts +8 -0
- package/types/components/radialAxis.d.ts +22 -0
- package/types/components/radialPlot.d.ts +11 -0
- package/types/components/rangeSelection.d.ts +3 -0
- package/types/components/resetButton.d.ts +13 -0
- package/types/components/series.d.ts +386 -0
- package/types/components/spectrumLegend.d.ts +25 -0
- package/types/components/tooltip.d.ts +58 -0
- package/types/components/zoom.d.ts +3 -0
- package/types/eventEmitter.d.ts +12 -0
- package/types/index.d.ts +615 -0
- package/types/options.d.ts +833 -0
- package/types/resizeObserver.d.ts +54 -0
- package/types/store/store.d.ts +564 -0
- package/types/theme.d.ts +670 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import Chart from "./chart";
|
|
2
|
+
import dataRange from "../store/dataRange";
|
|
3
|
+
import scale from "../store/scale";
|
|
4
|
+
import axes from "../store/axes";
|
|
5
|
+
import plot from "../store/plot";
|
|
6
|
+
import Tooltip from "../component/tooltip";
|
|
7
|
+
import Plot from "../component/plot";
|
|
8
|
+
import LineSeries from "../component/lineSeries";
|
|
9
|
+
import ScatterSeries from "../component/scatterSeries";
|
|
10
|
+
import Axis from "../component/axis";
|
|
11
|
+
import Legend from "../component/legend";
|
|
12
|
+
import DataLabels from "../component/dataLabels";
|
|
13
|
+
import AxisTitle from "../component/axisTitle";
|
|
14
|
+
import Title from "../component/title";
|
|
15
|
+
import ExportMenu from "../component/exportMenu";
|
|
16
|
+
import SelectedSeries from "../component/selectedSeries";
|
|
17
|
+
import HoveredSeries from "../component/hoveredSeries";
|
|
18
|
+
import RangeSelection from "../component/rangeSelection";
|
|
19
|
+
import Background from "../component/background";
|
|
20
|
+
import NoDataText from "../component/noDataText";
|
|
21
|
+
import * as lineSeriesBrush from "../brushes/lineSeries";
|
|
22
|
+
import * as basicBrush from "../brushes/basic";
|
|
23
|
+
import * as axisBrush from "../brushes/axis";
|
|
24
|
+
import * as legendBrush from "../brushes/legend";
|
|
25
|
+
import * as labelBrush from "../brushes/label";
|
|
26
|
+
import * as exportMenuBrush from "../brushes/exportMenu";
|
|
27
|
+
import * as dataLabelBrush from "../brushes/dataLabel";
|
|
28
|
+
import * as resetButtonBrush from "../brushes/resetButton";
|
|
29
|
+
import * as scatterSeriesBrush from "../brushes/scatterSeries";
|
|
30
|
+
/**
|
|
31
|
+
* @class
|
|
32
|
+
* @classdesc LineScatter Chart
|
|
33
|
+
* @param {Object} props
|
|
34
|
+
* @param {HTMLElement} props.el - The target element to create chart.
|
|
35
|
+
* @param {Object} props.data - Data for making LineArea Chart.
|
|
36
|
+
* @param {Array<Object>} props.data.series - Series data.
|
|
37
|
+
* @param {Array<Object>} props.data.series.line - Line series data. Only coordinate type data is possible.
|
|
38
|
+
* @param {Array<Object>} props.data.series.scatter - Scatter series data.
|
|
39
|
+
* @param {Object} [props.options] - Options for making LineScatter Chart.
|
|
40
|
+
* @param {Object} [props.options.chart]
|
|
41
|
+
* @param {string|Object} [props.options.chart.title] - Chart title text or options.
|
|
42
|
+
* @param {string} [props.options.chart.title.text] - Chart title text.
|
|
43
|
+
* @param {number} [props.options.chart.title.offsetX] - Offset value to move title horizontally.
|
|
44
|
+
* @param {number} [props.options.chart.title.offsetY] - Offset value to move title vertically.
|
|
45
|
+
* @param {string} [props.options.chart.title.align] - Chart text align. 'left', 'right', 'center' is available.
|
|
46
|
+
* @param {boolean|Object} [props.options.chart.animation] - Whether to use animation and duration when rendering the initial chart.
|
|
47
|
+
* @param {number|string} [props.options.chart.width] - Chart width. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the width of the parent container is followed.
|
|
48
|
+
* @param {number|string} [props.options.chart.height] - Chart height. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the height of the parent container is followed.
|
|
49
|
+
* @param {Object} [props.options.series] - Write common options in the upper depth and separate options to be applied to each chart.
|
|
50
|
+
* @param {Object} [props.options.series.line] - Options to be applied to the line chart. 'spline', 'showDot' is available. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Line Chart guide} on github.
|
|
51
|
+
* @param {boolean} [props.options.series.selectable=false] - Whether to make selectable series or not.
|
|
52
|
+
* @param {Object} [props.options.series.dataLabels] - Set the visibility, location, and formatting of dataLabel. For specific information, refer to the {@link https://github.com/nhn/tui.chart|DataLabels guide} on github.
|
|
53
|
+
* @param {Object} [props.options.xAxis]
|
|
54
|
+
* @param {string|Object} [props.options.xAxis.title] - Axis title.
|
|
55
|
+
* @param {boolean} [props.options.xAxis.pointOnColumn=false] - Whether to move the start of the chart to the center of the column.
|
|
56
|
+
* @param {boolean} [props.options.xAxis.rotateLabel=true] - Whether to allow axis label rotation.
|
|
57
|
+
* @param {boolean|Object} [props.options.xAxis.date] - Whether the x axis label is of date type. Format option used for date type. Whether the x axis label is of date type. If use date type, format option used for date type.
|
|
58
|
+
* @param {Object} [props.options.xAxis.tick] - Option to adjust tick interval.
|
|
59
|
+
* @param {Object} [props.options.xAxis.label] - Option to adjust label interval.
|
|
60
|
+
* @param {Object} [props.options.xAxis.scale] - Option to adjust axis minimum, maximum, step size.
|
|
61
|
+
* @param {number} [props.options.xAxis.width] - Width of xAxis.
|
|
62
|
+
* @param {number} [props.options.xAxis.height] - Height of xAxis.
|
|
63
|
+
* @param {Object|Array<Object>} [props.options.yAxis] - If this option is an array type, use the secondary y axis.
|
|
64
|
+
* @param {string|Object} [props.options.yAxis.title] - Axis title.
|
|
65
|
+
* @param {Object} [props.options.yAxis.tick] - Option to adjust tick interval.
|
|
66
|
+
* @param {Object} [props.options.yAxis.label] - Option to adjust label interval.
|
|
67
|
+
* @param {Object} [props.options.yAxis.scale] - Option to adjust axis minimum, maximum, step size.
|
|
68
|
+
* @param {number} [props.options.yAxis.width] - Width of yAxis.
|
|
69
|
+
* @param {number} [props.options.yAxis.height] - Height of yAxis.
|
|
70
|
+
* @param {Object} [props.options.plot]
|
|
71
|
+
* @param {number} [props.options.plot.width] - Width of plot.
|
|
72
|
+
* @param {number} [props.options.plot.height] - Height of plot.
|
|
73
|
+
* @param {boolean} [props.options.plot.visible] - Whether to show plot line.
|
|
74
|
+
* @param {Object} [props.options.legend]
|
|
75
|
+
* @param {string} [props.options.legend.align] - Legend align. 'top', 'bottom', 'right', 'left' is available.
|
|
76
|
+
* @param {string} [props.options.legend.showCheckbox] - Whether to show checkbox.
|
|
77
|
+
* @param {boolean} [props.options.legend.visible] - Whether to show legend.
|
|
78
|
+
* @param {number} [props.options.legend.width] - Width of legend.
|
|
79
|
+
* @param {Object} [props.options.legend.item] - `width` and `overflow` options of the legend item. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Legend guide} on github.
|
|
80
|
+
* @param {Object} [props.options.exportMenu]
|
|
81
|
+
* @param {boolean} [props.options.exportMenu.visible] - Whether to show export menu.
|
|
82
|
+
* @param {string} [props.options.exportMenu.filename] - File name applied when downloading.
|
|
83
|
+
* @param {Object} [props.options.tooltip]
|
|
84
|
+
* @param {number} [props.options.tooltip.offsetX] - Offset value to move title horizontally.
|
|
85
|
+
* @param {number} [props.options.tooltip.offsetY] - Offset value to move title vertically.
|
|
86
|
+
* @param {Function} [props.options.tooltip.formatter] - Function to format data value.
|
|
87
|
+
* @param {Function} [props.options.tooltip.template] - Function to create custom template. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Tooltip guide} on github.
|
|
88
|
+
* @param {Object} [props.options.responsive] - Rules for changing chart options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Responsive guide} on github.
|
|
89
|
+
* @param {boolean|Object} [props.options.responsive.animation] - Animation duration when the chart is modified.
|
|
90
|
+
* @param {Array<Object>} [props.options.responsive.rules] - Rules for the Chart to Respond.
|
|
91
|
+
* @param {Object} [props.options.lang] - Options for changing the text displayed on the chart or i18n languages.
|
|
92
|
+
* @param {Object} [props.options.lang.noData] - No Data Layer Text.
|
|
93
|
+
* @param {Object} [props.options.theme] - Chart theme options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|LineScatter Chart guide} on github.
|
|
94
|
+
* @param {Object} [props.options.theme.chart] - Chart font theme.
|
|
95
|
+
* @param {Object} [props.options.theme.noData] - No Data Layer Text theme.
|
|
96
|
+
* @param {Object} [props.options.theme.series] - Series theme. Each theme to be applied to the two charts should be written separately.
|
|
97
|
+
* @param {Object} [props.options.theme.title] - Title theme.
|
|
98
|
+
* @param {Object} [props.options.theme.xAxis] - X Axis theme.
|
|
99
|
+
* @param {Object|Array<Object>} [props.options.theme.yAxis] - Y Axis theme. In the case of an arrangement, the first is the main axis and the second is the theme for the secondary axis.
|
|
100
|
+
* @param {Object} [props.options.theme.legend] - Legend theme.
|
|
101
|
+
* @param {Object} [props.options.theme.tooltip] - Tooltip theme.
|
|
102
|
+
* @param {Object} [props.options.theme.plot] - Plot theme.
|
|
103
|
+
* @param {Object} [props.options.theme.exportMenu] - ExportMenu theme.
|
|
104
|
+
* @extends Chart
|
|
105
|
+
*/
|
|
106
|
+
export default class LineScatterChart extends Chart {
|
|
107
|
+
constructor(props) {
|
|
108
|
+
super({
|
|
109
|
+
el: props.el,
|
|
110
|
+
options: props.options,
|
|
111
|
+
series: props.data.series,
|
|
112
|
+
modules: [dataRange, scale, axes, plot],
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
initialize() {
|
|
116
|
+
super.initialize();
|
|
117
|
+
this.componentManager.add(Background);
|
|
118
|
+
this.componentManager.add(Title);
|
|
119
|
+
this.componentManager.add(Plot);
|
|
120
|
+
this.componentManager.add(Legend);
|
|
121
|
+
this.componentManager.add(LineSeries);
|
|
122
|
+
this.componentManager.add(ScatterSeries);
|
|
123
|
+
this.componentManager.add(Axis, { name: 'yAxis' });
|
|
124
|
+
this.componentManager.add(Axis, { name: 'xAxis' });
|
|
125
|
+
this.componentManager.add(Axis, { name: 'secondaryYAxis' });
|
|
126
|
+
this.componentManager.add(DataLabels);
|
|
127
|
+
this.componentManager.add(AxisTitle, { name: 'xAxis' });
|
|
128
|
+
this.componentManager.add(AxisTitle, { name: 'yAxis' });
|
|
129
|
+
this.componentManager.add(AxisTitle, { name: 'secondaryYAxis' });
|
|
130
|
+
this.componentManager.add(ExportMenu, { chartEl: this.el });
|
|
131
|
+
this.componentManager.add(HoveredSeries);
|
|
132
|
+
this.componentManager.add(SelectedSeries);
|
|
133
|
+
this.componentManager.add(Tooltip, { chartEl: this.el });
|
|
134
|
+
this.componentManager.add(RangeSelection);
|
|
135
|
+
this.componentManager.add(NoDataText);
|
|
136
|
+
this.painter.addGroups([
|
|
137
|
+
basicBrush,
|
|
138
|
+
axisBrush,
|
|
139
|
+
lineSeriesBrush,
|
|
140
|
+
legendBrush,
|
|
141
|
+
labelBrush,
|
|
142
|
+
exportMenuBrush,
|
|
143
|
+
dataLabelBrush,
|
|
144
|
+
resetButtonBrush,
|
|
145
|
+
scatterSeriesBrush,
|
|
146
|
+
]);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Add data.
|
|
150
|
+
* @param {Array} data - Array of data to be added.
|
|
151
|
+
* @param {string} chartType - Which type of chart to add.
|
|
152
|
+
* @api
|
|
153
|
+
* @example
|
|
154
|
+
* chart.addData([{x: 10, y: 20}, {x: 30, y: 40}], 'line');
|
|
155
|
+
*/
|
|
156
|
+
addData(data, chartType) {
|
|
157
|
+
this.animationControlFlag.updating = true;
|
|
158
|
+
this.resetSeries();
|
|
159
|
+
this.store.dispatch('addData', { data, chartType });
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Add series.
|
|
163
|
+
* @param {Object} data - Data to be added.
|
|
164
|
+
* @param {string} data.name - Series name.
|
|
165
|
+
* @param {Array<Object>} data.data - Array of data to be added.
|
|
166
|
+
* @param {Object} dataInfo - Which type of chart to add.
|
|
167
|
+
* @param {Object} dataInfo.chartType - Chart type.
|
|
168
|
+
* @api
|
|
169
|
+
* @example
|
|
170
|
+
* chart.addSeries(
|
|
171
|
+
* {
|
|
172
|
+
* name: 'newSeries',
|
|
173
|
+
* data: [{x: 10, y: 20}, {x: 30, y: 40}],
|
|
174
|
+
* },
|
|
175
|
+
* {
|
|
176
|
+
* chartType: 'line'
|
|
177
|
+
* });
|
|
178
|
+
*/
|
|
179
|
+
addSeries(data, dataInfo) {
|
|
180
|
+
this.resetSeries();
|
|
181
|
+
this.store.dispatch('addSeries', Object.assign({ data }, dataInfo));
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Convert the chart data to new data.
|
|
185
|
+
* @param {Object} data - Data to be set
|
|
186
|
+
* @api
|
|
187
|
+
* @example
|
|
188
|
+
* chart.setData({
|
|
189
|
+
* series: {
|
|
190
|
+
* line: [
|
|
191
|
+
* {
|
|
192
|
+
* name: 'A',
|
|
193
|
+
* data: [{x: 10, y: 20}, {x: 30, y: 40}],
|
|
194
|
+
* }
|
|
195
|
+
* ],
|
|
196
|
+
* scatter: [
|
|
197
|
+
* {
|
|
198
|
+
* name: 'B',
|
|
199
|
+
* data: [{x: 30, y: 20}, {x: 40, y: 40}],
|
|
200
|
+
* }
|
|
201
|
+
* ]
|
|
202
|
+
* }
|
|
203
|
+
* });
|
|
204
|
+
*/
|
|
205
|
+
setData(data) {
|
|
206
|
+
this.resetSeries();
|
|
207
|
+
this.store.dispatch('setData', data);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Convert the chart options to new options.
|
|
211
|
+
* @param {Object} options - Chart options
|
|
212
|
+
* @api
|
|
213
|
+
* @example
|
|
214
|
+
* chart.setOptions({
|
|
215
|
+
* chart: {
|
|
216
|
+
* width: 500,
|
|
217
|
+
* height: 'auto',
|
|
218
|
+
* title: 'Energy Usage',
|
|
219
|
+
* },
|
|
220
|
+
* xAxis: {
|
|
221
|
+
* title: 'Month',
|
|
222
|
+
* date: { format: 'yy/MM' },
|
|
223
|
+
* },
|
|
224
|
+
* yAxis: {
|
|
225
|
+
* title: 'Energy (kWh)',
|
|
226
|
+
* },
|
|
227
|
+
* series: {
|
|
228
|
+
* line: {
|
|
229
|
+
* showDot: true,
|
|
230
|
+
* },
|
|
231
|
+
* selectable: true,
|
|
232
|
+
* },
|
|
233
|
+
* tooltip: {
|
|
234
|
+
* formatter: (value) => `${value}kWh`,
|
|
235
|
+
* },
|
|
236
|
+
* });
|
|
237
|
+
*/
|
|
238
|
+
setOptions(options) {
|
|
239
|
+
this.resetSeries();
|
|
240
|
+
this.dispatchOptionsEvent('initOptions', options);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Update chart options.
|
|
244
|
+
* @param {Object} options - Chart options
|
|
245
|
+
* @api
|
|
246
|
+
* @example
|
|
247
|
+
* chart.updateOptions({
|
|
248
|
+
* chart: {
|
|
249
|
+
* height: 'auto',
|
|
250
|
+
* title: 'Energy Usage',
|
|
251
|
+
* },
|
|
252
|
+
* series: {
|
|
253
|
+
* line: {
|
|
254
|
+
* showDot: true,
|
|
255
|
+
* },
|
|
256
|
+
* },
|
|
257
|
+
* });
|
|
258
|
+
*/
|
|
259
|
+
updateOptions(options) {
|
|
260
|
+
this.resetSeries();
|
|
261
|
+
this.dispatchOptionsEvent('updateOptions', options);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Show tooltip.
|
|
265
|
+
* @param {Object} seriesInfo - Information of the series for the tooltip to be displayed
|
|
266
|
+
* @param {number} seriesInfo.seriesIndex - Index of series
|
|
267
|
+
* @param {number} seriesInfo.index - Index of data within series
|
|
268
|
+
* @param {string} seriesInfo.chartType - Specify which chart to select.
|
|
269
|
+
* @api
|
|
270
|
+
* @example
|
|
271
|
+
* chart.showTooltip({index: 1, seriesIndex: 2, chartType: 'scatter'});
|
|
272
|
+
*/
|
|
273
|
+
showTooltip(seriesInfo) {
|
|
274
|
+
this.eventBus.emit('showTooltip', Object.assign(Object.assign({}, seriesInfo), { state: this.store.state }));
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Hide tooltip.
|
|
278
|
+
* @api
|
|
279
|
+
* @example
|
|
280
|
+
* chart.hideTooltip();
|
|
281
|
+
*/
|
|
282
|
+
hideTooltip() {
|
|
283
|
+
this.eventBus.emit('hideTooltip');
|
|
284
|
+
}
|
|
285
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import Chart from "./chart";
|
|
2
|
+
import { NestedPieChartOptions, NestedPieSeriesData, NestedPieSeriesType } from "../../types/options";
|
|
3
|
+
import { NestedPieChartProps, AddSeriesDataInfo, SelectSeriesInfo } from "../../types/charts";
|
|
4
|
+
/**
|
|
5
|
+
* @class
|
|
6
|
+
* @classdesc NestedPie Chart
|
|
7
|
+
* @param {Object} props
|
|
8
|
+
* @param {HTMLElement} props.el - The target element to create chart.
|
|
9
|
+
* @param {Object} props.data - Data for making NestedPie Chart.
|
|
10
|
+
* @param {Array<string>} [props.data.categories] - Categories.
|
|
11
|
+
* @param {Array<Object>} props.data.series - Series data.
|
|
12
|
+
* @param {string} props.data.series.name - Series name.
|
|
13
|
+
* @param {number} props.data.series.data - Series data.
|
|
14
|
+
* @param {string} [props.data.series.parentName] - Value specifying parent data when using group nested pie chart.
|
|
15
|
+
* @param {Object} [props.options] - Options for making NestedPie Chart.
|
|
16
|
+
* @param {Object} [props.options.chart]
|
|
17
|
+
* @param {string|Object} [props.options.chart.title] - Chart title text or options.
|
|
18
|
+
* @param {string} [props.options.chart.title.text] - Chart title text.
|
|
19
|
+
* @param {number} [props.options.chart.title.offsetX] - Offset value to move title horizontally.
|
|
20
|
+
* @param {number} [props.options.chart.title.offsetY] - Offset value to move title vertically.
|
|
21
|
+
* @param {string} [props.options.chart.title.align] - Chart text align. 'left', 'right', 'center' is available.
|
|
22
|
+
* @param {boolean|Object} [props.options.chart.animation] - Whether to use animation and duration when rendering the initial chart.
|
|
23
|
+
* @param {number|string} [props.options.chart.width] - Chart width. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the width of the parent container is followed.
|
|
24
|
+
* @param {number|string} [props.options.chart.height] - Chart height. 'auto' or if not write, the width of the parent container is followed. 'auto' or if not created, the height of the parent container is followed.
|
|
25
|
+
* @param {Object} [props.options.series]
|
|
26
|
+
* @param {boolean} [props.options.series.selectable=false] - Whether to make selectable series or not.
|
|
27
|
+
* @param {Object} [props.options.series.dataLabels] - Set the visibility, location, and formatting of dataLabel. For specific information, refer to the {@link https://github.com/nhn/tui.chart|DataLabels guide} on github.
|
|
28
|
+
* @param {Object} [props.options.series.aliasName] - Chart options are specified based on the alias name. 'radiusRange', 'angleRange', 'clockwise', 'dataLabels' is available. For specific information, refer to the {@link https://github.com/nhn/tui.chart|NestedPie Chart guide} on github.
|
|
29
|
+
* @param {Object} [props.options.legend]
|
|
30
|
+
* @param {string} [props.options.legend.align] - Legend align. 'top', 'bottom', 'right', 'left' is available.
|
|
31
|
+
* @param {string} [props.options.legend.showCheckbox] - Whether to show checkbox.
|
|
32
|
+
* @param {boolean} [props.options.legend.visible] - Whether to show legend.
|
|
33
|
+
* @param {number} [props.options.legend.width] - Width of legend.
|
|
34
|
+
* @param {Object} [props.options.legend.item] - `width` and `overflow` options of the legend item. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Legend guide} on github.
|
|
35
|
+
* @param {Object} [props.options.exportMenu]
|
|
36
|
+
* @param {boolean} [props.options.exportMenu.visible] - Whether to show export menu.
|
|
37
|
+
* @param {string} [props.options.exportMenu.filename] - File name applied when downloading.
|
|
38
|
+
* @param {Object} [props.options.tooltip]
|
|
39
|
+
* @param {number} [props.options.tooltip.offsetX] - Offset value to move title horizontally.
|
|
40
|
+
* @param {number} [props.options.tooltip.offsetY] - Offset value to move title vertically.
|
|
41
|
+
* @param {Function} [props.options.tooltip.formatter] - Function to format data value.
|
|
42
|
+
* @param {Function} [props.options.tooltip.template] - Function to create custom template. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Tooltip guide} on github.
|
|
43
|
+
* @param {Object} [props.options.responsive] - Rules for changing chart options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|Responsive guide} on github.
|
|
44
|
+
* @param {boolean|Object} [props.options.responsive.animation] - Animation duration when the chart is modified.
|
|
45
|
+
* @param {Array<Object>} [props.options.responsive.rules] - Rules for the Chart to Respond.
|
|
46
|
+
* @param {Object} [props.options.lang] - Options for changing the text displayed on the chart or i18n languages.
|
|
47
|
+
* @param {Object} [props.options.lang.noData] - No Data Layer Text.
|
|
48
|
+
* @param {Object} [props.options.theme] - Chart theme options. For specific information, refer to the {@link https://github.com/nhn/tui.chart|NestedPie Chart guide} on github.
|
|
49
|
+
* @param {Object} [props.options.theme.chart] - Chart font theme.
|
|
50
|
+
* @param {Object} [props.options.theme.noData] - No Data Layer Text theme.
|
|
51
|
+
* @param {Object} [props.options.theme.series] - Series theme.
|
|
52
|
+
* @param {Object} [props.options.theme.title] - Title theme.
|
|
53
|
+
* @param {Object} [props.options.theme.legend] - Legend theme.
|
|
54
|
+
* @param {Object} [props.options.theme.tooltip] - Tooltip theme.
|
|
55
|
+
* @param {Object} [props.options.theme.exportMenu] - ExportMenu theme.
|
|
56
|
+
* @extends Chart
|
|
57
|
+
*/
|
|
58
|
+
export default class NestedPieChart extends Chart<NestedPieChartOptions> {
|
|
59
|
+
constructor({ el, options, data: { series, categories } }: NestedPieChartProps);
|
|
60
|
+
protected initialize(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Add series.
|
|
63
|
+
* @param {Object} data - Data to be added.
|
|
64
|
+
* @param {string} data.name - Series name.
|
|
65
|
+
* @param {Array<Object>} data.data - Array of data to be added.
|
|
66
|
+
* @param {Object} dataInfo - Which name of chart to add.
|
|
67
|
+
* @param {string} dataInfo.name - Chart series name.
|
|
68
|
+
* @api
|
|
69
|
+
* @example
|
|
70
|
+
* chart.addSeries(
|
|
71
|
+
* {
|
|
72
|
+
* name: 'newSeries',
|
|
73
|
+
* data: [
|
|
74
|
+
* { name: 'A', data: 10 },
|
|
75
|
+
* { name: 'B', data: 20 },
|
|
76
|
+
* ],
|
|
77
|
+
* },
|
|
78
|
+
* {
|
|
79
|
+
* name: 'series name'
|
|
80
|
+
* });
|
|
81
|
+
*/
|
|
82
|
+
addSeries(data: NestedPieSeriesType, dataInfo?: AddSeriesDataInfo): void;
|
|
83
|
+
/**
|
|
84
|
+
* Convert the chart data to new data.
|
|
85
|
+
* @param {Object} data - Data to be set
|
|
86
|
+
* @api
|
|
87
|
+
* @example
|
|
88
|
+
* chart.setData({
|
|
89
|
+
* categories: ['A', 'B'],
|
|
90
|
+
* series: [
|
|
91
|
+
* {
|
|
92
|
+
* name: 'browsers',
|
|
93
|
+
* data: [
|
|
94
|
+
* {
|
|
95
|
+
* name: 'Chrome',
|
|
96
|
+
* data: 50,
|
|
97
|
+
* },
|
|
98
|
+
* {
|
|
99
|
+
* name: 'Safari',
|
|
100
|
+
* data: 20,
|
|
101
|
+
* },
|
|
102
|
+
* ]
|
|
103
|
+
* },
|
|
104
|
+
* {
|
|
105
|
+
* name: 'versions',
|
|
106
|
+
* data: [
|
|
107
|
+
* {
|
|
108
|
+
* name: '1',
|
|
109
|
+
* data: 50,
|
|
110
|
+
* },
|
|
111
|
+
* {
|
|
112
|
+
* name: '2',
|
|
113
|
+
* data: 20,
|
|
114
|
+
* },
|
|
115
|
+
* ]
|
|
116
|
+
* }
|
|
117
|
+
* ]
|
|
118
|
+
* });
|
|
119
|
+
*/
|
|
120
|
+
setData(data: NestedPieSeriesData): void;
|
|
121
|
+
/**
|
|
122
|
+
* Hide series data label.
|
|
123
|
+
* @api
|
|
124
|
+
* @example
|
|
125
|
+
* chart.hideSeriesDataLabel();
|
|
126
|
+
*/
|
|
127
|
+
hideSeriesDataLabel(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Show series data label.
|
|
130
|
+
* @api
|
|
131
|
+
* @example
|
|
132
|
+
* chart.showSeriesDataLabel();
|
|
133
|
+
*/
|
|
134
|
+
showSeriesDataLabel(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Convert the chart options to new options.
|
|
137
|
+
* @param {Object} options - Chart options.
|
|
138
|
+
* @api
|
|
139
|
+
* @example
|
|
140
|
+
* chart.setOptions({
|
|
141
|
+
* chart: {
|
|
142
|
+
* width: 500,
|
|
143
|
+
* height: 'auto',
|
|
144
|
+
* title: 'Energy Usage',
|
|
145
|
+
* },
|
|
146
|
+
* series: {
|
|
147
|
+
* alias2: {
|
|
148
|
+
* radiusRange: [20%, 50%],
|
|
149
|
+
* },
|
|
150
|
+
* },
|
|
151
|
+
* tooltip: {
|
|
152
|
+
* formatter: (value) => `${value}kWh`,
|
|
153
|
+
* },
|
|
154
|
+
* });
|
|
155
|
+
*/
|
|
156
|
+
setOptions(options: NestedPieChartOptions): void;
|
|
157
|
+
/**
|
|
158
|
+
* Update chart options.
|
|
159
|
+
* @param {Object} options - Chart options.
|
|
160
|
+
* @api
|
|
161
|
+
* @example
|
|
162
|
+
* chart.updateOptions({
|
|
163
|
+
* chart: {
|
|
164
|
+
* height: 'auto',
|
|
165
|
+
* title: 'Energy Usage',
|
|
166
|
+
* },
|
|
167
|
+
* series: {
|
|
168
|
+
* alias1: {
|
|
169
|
+
* showDot: true,
|
|
170
|
+
* },
|
|
171
|
+
* },
|
|
172
|
+
* });
|
|
173
|
+
*/
|
|
174
|
+
updateOptions(options: NestedPieChartOptions): void;
|
|
175
|
+
/**
|
|
176
|
+
* Show tooltip.
|
|
177
|
+
* @param {Object} seriesInfo - Information of the series for the tooltip to be displayed.
|
|
178
|
+
* @param {number} seriesInfo.seriesIndex - Index of series.
|
|
179
|
+
* @param {number} seriesInfo.alias - alias name.
|
|
180
|
+
* @api
|
|
181
|
+
* @example
|
|
182
|
+
* chart.showTooltip({seriesIndex: 1, alias: 'name'});
|
|
183
|
+
*/
|
|
184
|
+
showTooltip(seriesInfo: SelectSeriesInfo): void;
|
|
185
|
+
/**
|
|
186
|
+
* Hide tooltip.
|
|
187
|
+
* @api
|
|
188
|
+
* @example
|
|
189
|
+
* chart.hideTooltip();
|
|
190
|
+
*/
|
|
191
|
+
hideTooltip(): void;
|
|
192
|
+
}
|