This article is documentation that describes the encapsulated utility functions @simon_he/s-charts
peculiarity: High scalability, flexible and convenient calling
More
- Common functions lazy-js-utils
- Export functions exports-functions
- Threejs simplistic s-three
- numsWheel component s-nums-wheel
- vAxios Request encapsulationv-axios
Instructions for use
npm i @simon_he/s-charts # install
import {
sCharts,
...
} from '@simon_he/s-charts' # Ingestion on demand
Directory structure
00sChartsSimplify the use of echarts
sCharts
- Simplify the use of echarts
- It can make your code more concise and beautiful
- Automatically listens for resize events and automatically updates the size of the canvas
- params:
- container: string | HTMLElement /* Parent container */
- options: SChartsOption /* With echarts options, w: initialization width, h: initialization height, theme: echarts subject, all event behaviors starting with on are called */
- autoResize: boolean /* Whether to adjust the width and height automatically */
const charts = sCharts('#main', {
w: 500,
h: 300,
theme: 'dark',
xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {},
series: [
{
type: 'bar',
data: [23, 24, 18, 25, 27, 28, 25],
},
],
})