Wiki源代码5.8.2.3 Pie chart

由用户 maym 在 2025/03/10 08:00 保存的版本 14.3

隐藏最后作者
maym 14.1 1 ==== **[Usage Scenario]** ====
yinshi 1.1 2
maym 14.2 3 A pie chart is a commonly used type of data visualization chart that presents data as a circular shape resembling a pie chart, displaying the proportions of different data classifications in a fan-shaped manner. It is suitable for the following scenarios:
yinshi 1.1 4
5 * (((
maym 14.2 6 **Proportional display:** A pie chart is suitable for displaying the proportion or proportion relationship of different categories in the population. For example, market share, the proportion of various expenses to total expenses, etc.
yinshi 1.1 7 )))
8 * (((
maym 14.2 9 **Category Display:** A pie chart can classify and display data according to different categories, visually showing comparisons between different categories. For example, the sales proportion of different products, the sales proportion of different regions, etc.
yinshi 1.1 10 )))
11 * (((
maym 14.2 12 **Trend analysis:** By observing the size changes of each sector in the pie chart, the trend and changes of the data can be analyzed. For example, seasonal changes in sales revenue, changes in the proportion of users in different age groups, etc.
yinshi 1.1 13 )))
14 * (((
maym 14.2 15 **Highlights**: Specific data or categories can be emphasized by highlighting a sector or several important sectors in the pie chart. For example, highlighting the market share of a certain product, highlighting the sales proportion of a certain region, etc.
yinshi 1.1 16 )))
17
maym 14.3 18 ==== **[Basic Requirements ]** ====
yinshi 1.1 19
20 饼图的基本要求如下:
21
yinshi 5.1 22 (% style="width:402px" %)
23 |(% style="width:175px" %)分类字段|(% style="width:225px" %)数值字段
24 |(% style="width:175px" %)最多1个字段|(% style="width:225px" %)最多1个字段
yinshi 1.1 25
yinshi 3.1 26 ==== **【操作步骤】** ====
yinshi 1.1 27
28 **Step-1 选择组件,配置数据源**
29
30 创建报表,在左上角选择饼状图,然后选定数据源,如图:
31
yinshi 11.1 32 [[image:1729843622506-386.png||height="546" width="767"]]
yinshi 1.1 33
34
35 **Step-2 选择图表展示字段**
36
37 将右边数据源中字段拖动放到**分类字段**、**数值字段**上
38
39 * (((
40 饼状图的数据源:
41
yinshi 6.1 42 有了分类字段和数值字段,就可以根据数据的实际情况,绘制出正确的饼状图。下图中:将分类字段拖入销售物品类型,数值字段拖入销售数量,则可以得出:【按照销售物品类型分类后的销售数量的统计饼状图】
yinshi 1.1 43
44
45 * (((
46 **分类字段:** 本字段表示数据的类别或分类,每个数据点都应该有一个对应的类别。类别字段可以是产品名称、地区名称、部门名称等,用于表示数据所属的具体类别。
47 )))
48 * (((
49 **数值字段:** 本字段表示每个类别的具体数值/数量。数值字段可以是销售额、销售数量、市场份额等,用于表示每个类别在总体中的比例或占比。
yinshi 6.1 50
yinshi 7.1 51 >
52
53 (((
yinshi 6.1 54 ====== 如果在数值字段(虚线框)中拖入非数值类型的字段(如:字符串、日期、地点类型),会根据默认聚合方式(计数),将字符串、日期、地点转化为该字段出现的次数 ======
yinshi 1.1 55 )))
yinshi 6.1 56
57 [[image:1729749814387-113.png||height="669" width="1300"]]
yinshi 1.1 58 )))
59 )))
60
61 **Step-3 样式设置**
62
yinshi 7.1 63 分为三小类:【基础设置】、【标签】,【图例】,如下图:
yinshi 1.1 64
yinshi 6.1 65 [[image:1729750188515-947.png||height="766" width="1425"]]
yinshi 1.1 66
67
yinshi 7.1 68 (((
69
yinshi 1.1 70 )))
yinshi 3.1 71
yinshi 7.1 72 (((
yinshi 3.1 73
yinshi 7.1 74
75
yinshi 1.1 76 )))
77
yinshi 3.1 78 ==== **【样式配置说明】** ====
yinshi 2.1 79
yinshi 1.1 80 |(% colspan="1" rowspan="1" %)(((
81
yinshi 9.1 82 )))|(% colspan="1" rowspan="1" style="width:107px" %)(((
yinshi 1.1 83 样式设置分类
yinshi 9.1 84 )))|(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 85 配置项
yinshi 9.1 86 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
87 用途
yinshi 1.1 88 )))
yinshi 12.1 89 |(% colspan="1" rowspan="14" %)(((
yinshi 1.1 90 **饼状图**
91
92
yinshi 9.1 93 )))|(% colspan="1" rowspan="6" style="width:107px" %)(((
94 基础设置
yinshi 1.1 95
96
yinshi 9.1 97 )))|(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 98 显示标题
yinshi 9.1 99 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
100 控制画布左上角的标题是否显示的开关
101
102 [[image:1729754356435-491.png]]
yinshi 1.1 103 )))
yinshi 9.1 104 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 105 标题名称
yinshi 9.1 106 )))|(% colspan="1" rowspan="1" style="width:1304px" %)支持用户自定义报表标题
107 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 108 帮助文字
yinshi 9.1 109 )))|(% colspan="1" rowspan="1" style="width:1304px" %)开启后,标题右侧出现小问号,鼠标悬浮时,出现帮助文字具体内容
110 [[image:1729754478509-444.png]]
111 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 112 帮助文字内容
yinshi 9.1 113 )))|(% colspan="1" rowspan="1" style="width:1304px" %)支持用户自定义帮助文字的文案,例如“本月销售总额统计”
114 |(% colspan="1" rowspan="1" style="width:150px" %)(((
115 饼状图类型
116 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 1.1 117 默认选中“常规”,第二选项:环形图,环形图效果如下:
118
yinshi 9.1 119 [[image:1729754564047-207.png||height="451" width="1137"]]
yinshi 1.1 120
121
122 )))
yinshi 9.1 123 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 124 配色方案
yinshi 9.1 125 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
126 支持用户自定义图形整体的配色方案
yinshi 1.1 127 )))
yinshi 12.1 128 |(% colspan="1" rowspan="5" style="width:107px" %)(((
yinshi 1.1 129 标签
130
131
yinshi 9.1 132 )))|(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 133 显示标签
yinshi 9.1 134 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 135 (((
136 控制是否显示标签的开关,如下图:
137
138 [[image:1729754768467-631.png||height="523" width="1081"]]
yinshi 1.1 139 )))
yinshi 10.1 140
141 (((
142
143 )))
144 )))
yinshi 9.1 145 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 146 颜色字号
yinshi 9.1 147 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 148
yinshi 1.1 149 )))
yinshi 9.1 150 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 151 标签位置
152
153
yinshi 9.1 154 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 13.1 155 支持3种模式:内部,外部,蜘蛛图
yinshi 1.1 156 )))
yinshi 9.1 157 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 158 标签内容
159
160
yinshi 9.1 161 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 162 是标题、百分比、值的各种排列组合,默认选择【标题,百分比】如下,用户也可以改成其他内容,例如“标题,值(百分比)”,如下图:
yinshi 1.1 163
yinshi 10.1 164 [[image:1729756074259-175.png]]
yinshi 1.1 165
166
167 )))
yinshi 9.1 168 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 169 百分比小数位数
yinshi 9.1 170 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 171 设置上述标签内容中,百分比的小数位数,例如设置成显示3位小数,如下图:
yinshi 1.1 172
yinshi 10.1 173 [[image:1729756197988-684.png]]
yinshi 1.1 174
yinshi 10.1 175
yinshi 1.1 176
177 )))
yinshi 9.1 178 |(% colspan="1" rowspan="3" style="width:107px" %)(((
yinshi 1.1 179 图例
yinshi 9.1 180 )))|(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 181 显示图例
yinshi 9.1 182 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 183 默认开启, 如下图:
184
185 [[image:1729756246566-930.png]]
yinshi 1.1 186 )))
yinshi 9.1 187 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 188 图例位置
yinshi 9.1 189 )))|(% colspan="1" rowspan="1" style="width:1304px" %)(((
yinshi 10.1 190 图例默认出现在画布的左上角,同时支持用户设置图例在画布中的位置
yinshi 1.1 191
192
193
194 )))
yinshi 9.1 195 |(% colspan="1" rowspan="1" style="width:150px" %)(((
yinshi 1.1 196 颜色字号
yinshi 10.1 197 )))|(% colspan="1" rowspan="1" style="width:1304px" %)支持用户根据需要自行调整图例的文字颜色和字体大小