当前位置:网站首页>[echart] II. User manual and configuration item reading notes
[echart] II. User manual and configuration item reading notes
2022-06-26 10:41:00 【My name is 985】
Introduction
first echart
- introduce echart
npm install echarts --save
- vue
<template>
<div class="about">
<!-- by ECharts Prepare a with defined width and height DOM -->
<div id="main" style="width: 600px;height:400px;"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
components: {
},
mounted () {
// Based on the prepared dom, initialization echarts example
var myChart = echarts.init(document.getElementById('main'));
// Charting
myChart.setOption({
title: {
text: 'ECharts Introductory example '
},
tooltip: {
},
xAxis: {
data: [' shirt ', ' Woolen sweater ', ' Snow spins unlined upper garment ', ' The trousers ', ' High heels ', ' socks ']
},
yAxis: {
},
series: [
{
name: ' sales ',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}
]
});
},
data () {
return {
}
},
}
</script>
echart5 New features
1. Dynamic narrative
The animation effect of smooth transition is added in the data switching
2. Visual design
- Optimize color matching : The color saturation of the same type of data is consistent , Make the expressed importance consistent
- Labels in reports : Not in a huddle , Labels can be displayed gracefully in confined space through layout strategies
- time axis
- focus Prompt box : Beautification interface 、 And the function of sorting by category or value is added
- The dashboard
- Fan fillet : In pie chart 、 Sunrise chart 、 Rectangular tree , You can adjust border-radius
- Decals
3. Interactivity
- State management
When mouse focus To an element ,echart4 Will highlight the target through the highlighted state , but hover After the element ,echart4 The highlight will be cancelled , Change the target from the highlighted state to the normal state . stay echart4 On the basis of ,echart5 Added Fade out Characteristics of , stay focus After reaching the target , The target will highlight , Other elements fade out .
4. Performance improvement
5. Development experience
- Data sets :ECharts 5 Strengthen the data conversion ability of data set
- internationalization
Advanced
echart The style of
echart The style of , It can be adjusted by the following means :
Color theme (Theme)
Palette
Direct style setting (itemStyle、lineStyle、areaStyle、label、…)
Visual mapping (visualMap)
Data sets
Data sets (dataset) Is a component dedicated to managing data . Although each series can be in series.data Set data in , But from ECharts4 Support Data sets Start , More recommended Data sets To manage data . Because of this , Data can be reused by multiple components , It is also convenient for “ Data and other configurations ” Separate configuration style . After all , At run time , Data is the most frequently changed , Most of the other configurations will not change .
Conventional series Users are often required to process data first , Set the data partition to each series ( And category axis ) in . Besides , It is not conducive to multiple series sharing a single piece of data , It is also not conducive to chart type based on original data 、 The mapping arrangement of the series .
The benefits of using datasets are as follows :
- It can be close to the common thinking mode of data visualization :(I) Provide data ,(II) Specify data to visual mapping , To form a chart .
- Data and other configurations can be separated . Data constant , Other configurations remain unchanged . Separate and easy to manage separately .
- Data can be reused by multiple series or components , For big data scenarios , You don't have to create a data for each series .
- Support more common formats of data , For example, a two-dimensional array 、 Object array, etc , To a certain extent, users are prevented from converting for data format .
It should be noted that ,dataset There are also two formats : Two dimensional array and An array of objects
seriesLayoutBy It can be understood as taking what as x Axis
If the first act x Axis , Then the first column is the dimension ; If the first column is x Axis , Then take the first behavior dimension
As for the data , It's always y Axis 
take dataset Data is mapped into a series of charts series, Yes, it is series.encode To configure the .
Not all charts currently support dataset. Support dataset The charts for are : line、bar、pie、scatter、effectScatter、parallel、candlestick、map、funnel、custom. In the future, there will be more charts to support
Axis
Rectangular coordinate system (grid/cartesian): Namely x Axis 、y Axis
Uniaxial (singleAxis):
Polar system (polar): It is a circular report
Geographic coordinate system (geo): It's a map
For some graphs without coordinate system , For example, pie chart 、 Funnel chart, etc
Configuration article
echart5 Supported graphics
echart5 The currently supported graphics can be viewed in the configuration item manual , As shown in the figure below 
边栏推荐
- 開發者,微服務架構到底是什麼?
- 【LeetCode】59. Spiral matrix II
- MySQL第九次作业-连接查询&子查询
- Global and Chinese market of aluminum sunshade systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Installing MySQL under Linux [details]
- Renesas electronics launched a complete intelligent sensor solution for Internet of things applications
- Pytest configuration file
- Adaptiveavgpool2d does not support onnx export. Customize a class to replace adaptiveavgpool2d
- Hcia-dhcp experiment
- Searchview click failure
猜你喜欢
![Installing MySQL under Linux [details]](/img/38/77be56c3ef3923ce4c4e5df4a96f41.png)
Installing MySQL under Linux [details]

Write data to local file

AdaptiveAvgPool2D 不支持 onnx 导出,自定义一个类代替 AdaptiveAvgPool2D

Adaptiveavgpool2d does not support onnx export. Customize a class to replace adaptiveavgpool2d

Jar version conflict resolution

Appium automation test foundation - mobile end test environment construction (II)

Little red book - Summary of internal sales spike project

String constant pool, class constant pool, and runtime constant pool

Allocation of heap memory when creating objects

String constant pool, class constant pool, and runtime constant pool
随机推荐
8-图文打造LeeCode算法宝典-最小栈与LRU缓存机制算法题解
36 qtextedit control input multiline text
MySQL Chapter 5 Summary
MySQL 9th job - connection Query & sub query
Progressive Web 应用程序PWA是应用程序开发的未来
量化投资学习——经典书籍介绍
The sixth MySQL job - query data - multiple conditions
MySQL第八次作业
Installer MySQL sous Linux [détails]
Flutter与原生通信(上)
MySQL project 7 Summary
What are the symbolic and direct references of the JVM
SSH, SCP command appears permission denied, please try again solution
【软件项目管理】期末复习知识点整理
Omni channel, multi scenario and cross platform, how does app analyze channel traffic with data
MySQL项目8总结
MySQL第六次作业-查询数据-多条件
Blog article index summary -- Software Engineering
Problems encountered in the application and development of Hongmeng and some roast
Global and Chinese market of aluminum sunshade systems 2022-2028: Research Report on technology, participants, trends, market size and share