@toast-ui/chart
Advanced tools
Comparing version 4.0.0-beta.5 to 4.0.1
{ | ||
"name": "@toast-ui/chart", | ||
"version": "4.0.0-beta.5", | ||
"version": "4.0.1", | ||
"description": "TOAST UI Application: Chart", | ||
@@ -136,3 +136,3 @@ "main": "dist/toastui-chart.js", | ||
}, | ||
"gitHead": "edf7093b6f83d70f284106900707ef39b068a755" | ||
"gitHead": "33a0fa3e0c0eba740948d07d21ecacb4f26e8a37" | ||
} |
@@ -9,3 +9,3 @@ # ![Toast UI Chart](https://user-images.githubusercontent.com/35218826/37320160-c4d6dec4-26b5-11e8-9a91-79bb2b882410.png) | ||
- [!Toast UI Chart](#) | ||
- [Toast UI Chart](#) | ||
- [🚩 Table of Contents](#-table-of-contents) | ||
@@ -110,11 +110,42 @@ - [Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source) | ||
Factory function needs three parameters: el, data, options | ||
[In Webpack 4, when importing package modules, the parts that are defined in the module field have higher priority than the parts defined in the main field](https://webpack.js.org/configuration/resolve/#resolvemainfields). To use the Webpack 4 with the `require` syntax to import `@toast-ui/chart`, the ESM file defined in the `module` field will be loaded, and the file will be transpiled to be compatible with the `require` syntax. In order to use the **bundle file for UMD**, the user must personally load and use the `@toast-ui/chart/dist/toastui-chart.js` or `@toast-ui/chart/dist/toastui-chart.min.js`. | ||
```js | ||
const Chart = require('@toast-ui/chart/dist/toastui-chart.min.js'); // loading the bundle file for UMD | ||
``` | ||
Webpack 5 supports the `exports` field. The entry point can be determined by the `exports` field defined in the package. Furthermore, the necessary chart can be loaded through a sub-path, as presented below. | ||
```js | ||
const Chart = require('@toast-ui/chart'); // ./dist/toastui-chart.js | ||
import { BarChart } from '@toast-ui/chart'; // ./dist/esm/index.js | ||
import BarChart from '@toast-ui/chart/bar'; | ||
import ColumnChart from '@toast-ui/chart/column'; | ||
import LineChart from '@toast-ui/chart/line'; | ||
import AreaChart from '@toast-ui/chart/area'; | ||
import LineAreaChart from '@toast-ui/chart/lineArea'; | ||
import ColumnLineChart from '@toast-ui/chart/columnLine'; | ||
import BulletChart from '@toast-ui/chart/bullet'; | ||
import BoxPlotChart from '@toast-ui/chart/boxPlot'; | ||
import TreemapChart from '@toast-ui/chart/treemap'; | ||
import HeatmapChart from '@toast-ui/chart/heatmap'; | ||
import ScatterChart from '@toast-ui/chart/scatter'; | ||
import LineScatterChart from '@toast-ui/chart/lineScatter'; | ||
import BubbleChart from '@toast-ui/chart/bubble'; | ||
import PieChart from '@toast-ui/chart/pie'; | ||
import NestedPieChart from '@toast-ui/chart/nestedPie'; | ||
import RadarChart from '@toast-ui/chart/radar'; | ||
``` | ||
Constructor function needs three parameters: el, data, options | ||
- el: Wrapper HTML element that will contain the chart as a child. | ||
- data: Numerical data the chart will be based on. | ||
- options: Functional options including legend, alignment, and tooltip visibilities. | ||
- options: Functional options including legend, alignment, and tooltip formatter. | ||
```js | ||
var el = document.getElementById('chart'); | ||
var data = { | ||
const el = document.getElementById('chart'); | ||
const data = { | ||
categories: [ | ||
@@ -127,3 +158,3 @@ //... | ||
}; | ||
var options = { | ||
const options = { | ||
chart: { width: 700, height: 400 }, | ||
@@ -130,0 +161,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3133082
0
166