Echarts pie charts and statistical analysis

Development tools and key technologies: VS backend

Author: Chen Chi Fan                                                                           

Write time: 2019.6.8

1. The relevant behavior, it must be used until the introduction of the pie. Echarts setting data graphic style can start from three levels, namely: global, series and data. Pie is expressed percentage of the total data of different categories depending on the apparent occupied sector radians. Compared to the histogram, pie simpler data format, which is one-dimensional values, without giving category.

Pie is not on the Cartesian coordinate system realization, is no need xAxis and yAxis. ECharts data item may be set to values only, a set may contain the name of the configuration data of a graphic pattern, configuration object tag

2.Echarts configure shadow

After you create a basic Nightingale chart, we can to add some common styles, such as shadows, transparency, color, border color, border width. Echarts of these styles are usually set in the series itemStyle in.

3. In operation chart Echarts will trigger corresponding events, which is monitored by the developer, then the callback function make the appropriate treatment, you can pop up a dialog box to jump to an address or data, and so do the next drill.

4.ECharts There are two types of events:

(1) One is the user mouse clicks, event-triggered or hover graphic charts;

(2)还有一种是用户在使用可以交互的组件后触发的行为事件,例如在切换图例开关时触发的 'legendselectchanged' 事件(这里需要注意切换图例开关是不会触发'legendselected'事件的),数据区域缩放时触发的 'datazoom' 事件等等。

(3) 支持常规的鼠标事件类型,包括 'click'、'dblclick'、'mousedown'、'mousemove'、'mouseup'、'mouseover'、'mouseout' 事件。

5.在表示横向的量的时候,由于组件的位置和大小可以由任意的两个量决定,所以在 left、right、width 三个量中,可以只提供两个量的值。至于取哪两个量的值就取决于用户,例如 left 和 right 或者 right 和 width 都可以决定组件的位置和大小。 

同理,在表示纵向的量 top、bottom、height 时,取值与横向量相同。

显示的效果图如下:

结语:Echarts饼状图分析与统计相关定义,Echarts 配置阴影,ECharts 中有两种事件类型等等。

Guess you like

Origin blog.csdn.net/qq_44554890/article/details/91351183