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 | |
| |
14.4 | 20 | The basic requirements for a pie chart are as follows: |
| |
1.1 | 21 | |
| |
14.4 | 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 | ||
| |
1.1 | 25 | |
| |
15.3 | 26 | ==== **[Configuration steps]** ==== |
| |
1.1 | 27 | |
| |
15.4 | 28 | **Step-1 Select chart and configure data sources** |
| |
15.2 | 29 | |
| |
14.4 | 30 | Create a report, select the pie chart in the upper left corner, and then choose the data source, as shown in the figure: |
| |
1.1 | 31 | |
| |
14.10 | 32 | [[image:1741595325557-627.png]] |
| |
1.1 | 33 | |
| 34 | |||
| |
14.4 | 35 | **Step-2 Select chart display fields** |
| |
1.1 | 36 | |
| |
14.8 | 37 | Drag and drop the fields from the data source on the right onto the classification and numerical fields. |
| |
1.1 | 38 | |
| 39 | * ((( | ||
| |
14.4 | 40 | Data source for pie chart: |
| |
1.1 | 41 | |
| |
14.10 | 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: Drag the order time into the category field and the order amount into the numerical field, and you will get the following pie chart of order amounts classified by order date: |
| |
1.1 | 43 | |
| 44 | * ((( | ||
| |
14.4 | 45 | **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. |
| |
1.1 | 46 | ))) |
| 47 | * ((( | ||
| |
14.4 | 48 | **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. |
| |
6.1 | 49 | |
| |
7.1 | 50 | ((( |
| |
14.8 | 51 | ====== 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). ====== |
| |
1.1 | 52 | ))) |
| |
6.1 | 53 | |
| |
14.10 | 54 | [[image:1741595446152-461.png]] |
| |
1.1 | 55 | ))) |
| 56 | ))) | ||
| 57 | |||
| |
14.4 | 58 | **Step-3 Style settings** |
| |
1.1 | 59 | |
| |
14.4 | 60 | Divided into three categories: Basic Settings, Labels, and Legends, as shown in the following figure: |
| |
1.1 | 61 | |
| |
14.10 | 62 | [[image:1741595493430-615.png]] |
| |
1.1 | 63 | |
| 64 | |||
| |
14.4 | 65 | ==== **[Style Configuration Description]** ==== |
| |
2.1 | 66 | |
| |
14.4 | 67 | |(% colspan="1" rowspan="1" style="width:107px" %)Classification|(% colspan="1" rowspan="1" style="width:150px" %)Configuration Items|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| 68 | Purpose | ||
| |
1.1 | 69 | ))) |
| |
14.4 | 70 | |(% colspan="1" rowspan="6" style="width:107px" %)((( |
| 71 | Basic Style | ||
| |
1.1 | 72 | |
| 73 | |||
| |
14.4 | 74 | )))|(% colspan="1" rowspan="1" style="width:150px" %)Show heading|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| |
14.8 | 75 | 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 |
| |
1.1 | 76 | |
| |
14.10 | 77 | [[image:1741595558139-598.png]] |
| |
1.1 | 78 | ))) |
| |
14.5 | 79 | |(% colspan="1" rowspan="1" style="width:150px" %)Chart title|(% colspan="1" rowspan="1" style="width:1304px" %)You can name the chart by yourself |
| |
14.8 | 80 | |(% 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 |
| |
14.10 | 81 | [[image:1741595638111-718.png]] |
| |
14.8 | 82 | |(% 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 |
| |
14.6 | 83 | |(% colspan="1" rowspan="1" style="width:150px" %)Pie chart type|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| 84 | By default, "General" is selected. The second option is a circular chart, which has the following effect: | ||
| |
1.1 | 85 | |
| |
14.10 | 86 | [[image:1741595667776-260.png]] |
| |
1.1 | 87 | |
| 88 | |||
| 89 | ))) | ||
| |
14.8 | 90 | |(% colspan="1" rowspan="1" style="width:150px" %)Color scheme|(% colspan="1" rowspan="1" style="width:1304px" %)Customize the color scheme of the Y-axis pillar |
| |
12.1 | 91 | |(% colspan="1" rowspan="5" style="width:107px" %)((( |
| |
14.7 | 92 | Label |
| |
1.1 | 93 | |
| 94 | |||
| |
9.1 | 95 | )))|(% colspan="1" rowspan="1" style="width:150px" %)((( |
| |
14.7 | 96 | Display Label |
| |
9.1 | 97 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| |
10.1 | 98 | ((( |
| |
14.7 | 99 | Control whether to display the labels of the pie chart, as shown in the following figure: |
| |
10.1 | 100 | |
| |
14.10 | 101 | [[image:1741595724904-816.png]] |
| |
1.1 | 102 | ))) |
| |
10.1 | 103 | |
| 104 | ((( | ||
| 105 | |||
| 106 | ))) | ||
| 107 | ))) | ||
| |
14.8 | 108 | |(% colspan="1" rowspan="1" style="width:150px" %)Color font size|(% colspan="1" rowspan="1" style="width:1304px" %)Support user-defined color and font size for label |
| |
9.1 | 109 | |(% colspan="1" rowspan="1" style="width:150px" %)((( |
| |
14.8 | 110 | Label position |
| |
1.1 | 111 | |
| 112 | |||
| |
14.8 | 113 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)Provide 3 modes: internal, external, spider diagram |
| |
9.1 | 114 | |(% colspan="1" rowspan="1" style="width:150px" %)((( |
| |
14.9 | 115 | Label content |
| |
1.1 | 116 | |
| 117 | |||
| |
9.1 | 118 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| |
14.9 | 119 | It is a combination of titles, percentages, and values arranged in various ways. The default combination is [title, percentage], but users can also change it to other content, such as the "title, value (percentage)" combination, as shown in the following figure: |
| |
1.1 | 120 | |
| |
14.10 | 121 | [[image:1741595756674-393.png]] |
| |
1.1 | 122 | |
| 123 | |||
| 124 | ))) | ||
| |
14.9 | 125 | |(% colspan="1" rowspan="1" style="width:150px" %)% decimals|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| 126 | Set the decimal places for percentages in the above labels, for example, to display 3 decimal places, as shown in the following figure: | ||
| |
1.1 | 127 | |
| |
14.10 | 128 | [[image:1741595788641-743.png]] |
| |
1.1 | 129 | |
| |
10.1 | 130 | |
| |
1.1 | 131 | |
| 132 | ))) | ||
| |
9.1 | 133 | |(% colspan="1" rowspan="3" style="width:107px" %)((( |
| |
14.9 | 134 | Legend |
| |
9.1 | 135 | )))|(% colspan="1" rowspan="1" style="width:150px" %)((( |
| |
14.9 | 136 | Show legend |
| |
9.1 | 137 | )))|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| |
14.9 | 138 | By default, it is turned on, and when turned off, the legend will not be displayed |
| |
10.1 | 139 | |
| |
14.10 | 140 | [[image:1741595825268-360.png]] |
| |
1.1 | 141 | ))) |
| |
14.9 | 142 | |(% colspan="1" rowspan="1" style="width:150px" %)Legend position|(% colspan="1" rowspan="1" style="width:1304px" %)((( |
| 143 | The legend defaults to the top left corner of the chart and supports displaying the legend in other positions of the chart, such as the top center, bottom left corner, top right corner, bottom center, or bottom right corner | ||
| |
1.1 | 144 | ))) |
| |
14.9 | 145 | |(% colspan="1" rowspan="1" style="width:150px" %)Color and font size|(% colspan="1" rowspan="1" style="width:1304px" %)Adjust the text color and font size of the legend |