Wiki源代码5.8.2.3 Pie chart
显示最后作者
| author | version | line-number | content |
|---|---|---|---|
| 1 | ==== **[Usage Scenario]** ==== | ||
| 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: | ||
| 4 | |||
| 5 | * ((( | ||
| 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. | ||
| 7 | ))) | ||
| 8 | * ((( | ||
| 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. | ||
| 10 | ))) | ||
| 11 | * ((( | ||
| 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. | ||
| 13 | ))) | ||
| 14 | * ((( | ||
| 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. | ||
| 16 | ))) | ||
| 17 | |||
| 18 | ==== **[Basic Requirements ]** ==== | ||
| 19 | |||
| 20 | The basic requirements for a pie chart are as follows: | ||
| 21 | |||
| 22 | (% style="width:584px" %) | ||
| 23 | |(% style="width:280px" %)Category Field|(% style="width:300px" %)Mumeric Field | ||
| 24 | |(% style="width:280px" %)Only one field can be configured|(% style="width:300px" %)Only one field can be configured | ||
| 25 | |||
| 26 | ==== Only one field can be configured ==== | ||
| 27 | |||
| 28 | **Step-1 Select components and configure data sources** | ||
| 29 | |||
| 30 | Create a report, select the pie chart in the upper left corner, and then choose the data source, as shown in the figure: | ||
| 31 | |||
| 32 | [[image:1729843622506-386.png||height="546" width="767"]] | ||
| 33 | |||
| 34 | |||
| 35 | **Step-2 Select chart display fields** | ||
| 36 | |||
| 37 | Drag and drop the fields from the data source on the right onto the classification and numerical fields | ||
| 38 | |||
| 39 | * ((( | ||
| 40 | Data source for pie chart: | ||
| 41 | |||
| 42 | With the classification field and numerical field, it is possible to draw the correct pie chart based on the actual situation of the data. In the following figure:将销售物品类型拖入分类字段中,将销售数量拖入数值字段中,则可以得出:【按照销售物品类型分类后的销售数量的统计饼状图】 | ||
| 43 | |||
| 44 | |||
| 45 | * ((( | ||
| 46 | **Classification field:** This field represents the category or classification of the data, and each data point should have a corresponding category. The category field can be product name, region name, department name, etc., used to indicate the specific category to which the data belongs. | ||
| 47 | ))) | ||
| 48 | * ((( | ||
| 49 | **Numerical field:** This field represents the specific numerical value/quantity for each category. Numerical fields can be sales revenue, sales quantity, market share, etc., used to represent the proportion or percentage of each category in the overall population. | ||
| 50 | |||
| 51 | ((( | ||
| 52 | ====== If a non numeric field (such as string, date, location type) is dragged into a numeric field (dashed box), the string, date, location will be converted to the number of times the field appears based on the default aggregation method (count) ====== | ||
| 53 | ))) | ||
| 54 | |||
| 55 | [[image:1729749814387-113.png||height="669" width="1300"]] | ||
| 56 | ))) | ||
| 57 | ))) | ||
| 58 | |||
| 59 | **Step-3 Style settings** | ||
| 60 | |||
| 61 | Divided into three categories: Basic Settings, Labels, and Legends, as shown in the following figure: | ||
| 62 | |||
| 63 | [[image:1729750188515-947.png||height="766" width="1425"]] | ||
| 64 | |||
| 65 | |||
| 66 | ((( | ||
| 67 | |||
| 68 | ))) | ||
| 69 | |||
| 70 | ((( | ||
| 71 | |||
| 72 | |||
| 73 | |||
| 74 | ))) | ||
| 75 | |||
| 76 | ==== **[Style Configuration Description]** ==== | ||
| 77 | |||
| 78 | |(% colspan="1" rowspan="1" style="width:107px" %)Classification|(% colspan="1" rowspan="1" style="width:150px" %)Configuration Items|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 79 | Purpose | ||
| 80 | ))) | ||
| 81 | |(% colspan="1" rowspan="6" style="width:107px" %)((( | ||
| 82 | Basic Style | ||
| 83 | |||
| 84 | |||
| 85 | )))|(% colspan="1" rowspan="1" style="width:150px" %)Show heading|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 86 | Control whether the chart title in the upper left corner of the canvas is displayed. When closed, the chart title will not be displayed in the report, The words "柱状图1" are shown in the following figure; | ||
| 87 | |||
| 88 | [[image:1729754356435-491.png]] | ||
| 89 | ))) | ||
| 90 | |(% colspan="1" rowspan="1" style="width:150px" %)Chart title|(% colspan="1" rowspan="1" style="width:1304px" %)You can name the chart by yourself | ||
| 91 | |(% colspan="1" rowspan="1" style="width:150px" %)Help text|(% colspan="1" rowspan="1" style="width:1304px" %)Control whether the help copy is displayed in the chart. If enabled, client users can see a "?" icon after the chart title and the corresponding help copy when moving the mouse over the icon; | ||
| 92 | [[image:1729754478509-444.png]] | ||
| 93 | |(% colspan="1" rowspan="1" style="width:150px" %)Help text content|(% colspan="1" rowspan="1" style="width:1304px" %)Enter a description of the chart here to help client users understand the chart data; | ||
| 94 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 95 | 饼状图类型 | ||
| 96 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 97 | 默认选中“常规”,第二选项:环形图,环形图效果如下: | ||
| 98 | |||
| 99 | [[image:1729754564047-207.png||height="451" width="1137"]] | ||
| 100 | |||
| 101 | |||
| 102 | ))) | ||
| 103 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 104 | 配色方案 | ||
| 105 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 106 | 支持用户自定义图形整体的配色方案 | ||
| 107 | ))) | ||
| 108 | |(% colspan="1" rowspan="5" style="width:107px" %)((( | ||
| 109 | 标签 | ||
| 110 | |||
| 111 | |||
| 112 | )))|(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 113 | 显示标签 | ||
| 114 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 115 | ((( | ||
| 116 | 控制是否显示标签的开关,如下图: | ||
| 117 | |||
| 118 | [[image:1729754768467-631.png||height="523" width="1081"]] | ||
| 119 | ))) | ||
| 120 | |||
| 121 | ((( | ||
| 122 | |||
| 123 | ))) | ||
| 124 | ))) | ||
| 125 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 126 | 颜色字号 | ||
| 127 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 128 | 略 | ||
| 129 | ))) | ||
| 130 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 131 | 标签位置 | ||
| 132 | |||
| 133 | |||
| 134 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 135 | 支持3种模式:内部,外部,蜘蛛图 | ||
| 136 | ))) | ||
| 137 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 138 | 标签内容 | ||
| 139 | |||
| 140 | |||
| 141 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 142 | 是标题、百分比、值的各种排列组合,默认选择【标题,百分比】如下,用户也可以改成其他内容,例如“标题,值(百分比)”,如下图: | ||
| 143 | |||
| 144 | [[image:1729756074259-175.png]] | ||
| 145 | |||
| 146 | |||
| 147 | ))) | ||
| 148 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 149 | 百分比小数位数 | ||
| 150 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 151 | 设置上述标签内容中,百分比的小数位数,例如设置成显示3位小数,如下图: | ||
| 152 | |||
| 153 | [[image:1729756197988-684.png]] | ||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | ))) | ||
| 158 | |(% colspan="1" rowspan="3" style="width:107px" %)((( | ||
| 159 | 图例 | ||
| 160 | )))|(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 161 | 显示图例 | ||
| 162 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 163 | 默认开启, 如下图: | ||
| 164 | |||
| 165 | [[image:1729756246566-930.png]] | ||
| 166 | ))) | ||
| 167 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 168 | 图例位置 | ||
| 169 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( | ||
| 170 | 图例默认出现在画布的左上角,同时支持用户设置图例在画布中的位置 | ||
| 171 | |||
| 172 | |||
| 173 | |||
| 174 | ))) | ||
| 175 | |(% colspan="1" rowspan="1" style="width:150px" %)((( | ||
| 176 | 颜色字号 | ||
| 177 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)支持用户根据需要自行调整图例的文字颜色和字体大小 |