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