Wiki源代码5.8.2.2 Line Chart

由用户 maym 在 2025/02/27 06:58 保存的版本 16.13

显示最后作者
1 ==== **[Usage Scenario]** ====
2
3 A line chart is a commonly used type of chart to display changes over time. It connects data points with lines to show the trend of variables, and is suitable for the following scenarios:
4
5 * (((
6 **Time trend analysis:**  Line charts are suitable for displaying time series data, such as daily, monthly, or quarterly sales, user visits, or inventory changes, to help users identify long-term trends.
7 )))
8 * (((
9 **Seasonal changes: ** By observing the fluctuations of the line, it is possible to analyze the periodic changes in the data. For example, seasonal fluctuations in sales revenue, changes in user activity during different time periods, etc.
10 )))
11 * (((
12 **Comparison trend: ** Multiple lines can be used to compare the changes in multiple variables. For example, comparing sales trends of different products, or comparing user growth trends in different markets.
13 )))
14 * (((
15 **Abnormal discovery: ** The prominent peaks or valleys in a line chart help identify abnormal situations in the data, such as an abnormal increase in sales or a sudden decrease in user churn in a certain month.
16 )))
17
18 ==== ====
19
20 ==== **[Function Introduction]** ====
21
22 A line chart is used to display the changes in data over a continuous time interval or span, and its characteristic is to reflect the trend of things changing over time or ordered categories.
23
24 [[image:1740626962720-557.png]]
25
26 The composition of a line chart includes:
27
28 1. **Horizontal axis (X-axis): **The horizontal axis in a line graph is the horizontal axis, usually used to display continuous variables such as data classification or time.
29 1. **Vertical axis (Y-axis):** The vertical axis in a line chart is the axis in the vertical direction, usually used to display numerical values or quantities of data.
30 1. **Point: ** Each point represents the data value at a specific position on the horizontal and vertical axes. In a line chart, the line connecting all points can show the trend and change of the data.
31 1. **Line:** The lines in a line chart are straight lines formed by connecting data points, representing the trend of data changes. The trend of the lines can intuitively show the growth, decrease, or fluctuation of the data.
32
33 (((
34
35
36
37
38 )))
39
40 ==== 【Basic Attributes】 ====
41
42 The basic properties of a line chart are as follows:
43
44
45 |横轴|纵轴|分组|参考线
46 |最多1个字段|可选多个字段,最多30个字段|最多1个字段|可选多个字段,最多30个字段
47
48 ====== ======
49
50 ==== **【配置步骤】** ====
51
52 **Step-1 选择图形**
53
54 创建报表,选择折线图,如图:
55
56 [[image:1737529051357-629.png]]
57
58
59 **Step-2 选择图表展示字段**
60
61 将右边数据源列表中的字段拖动放到【横轴】、【纵轴】、【分组】、【参考线】上
62
63 [[image:1737528997085-860.png]]
64
65
66 Step-3 样式设置
67
68 分为三小类:【基础】、【坐标轴】,【图例】,如下图
69
70 [[image:1729663961688-819.png]]
71
72
73
74 ==== **【样式配置说明】** ====
75
76 |(% colspan="1" rowspan="1" style="width:52px" %)(((
77
78 )))|(% colspan="1" rowspan="1" style="width:76.9844px" %)(((
79 样式设置分类
80 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
81 配置项
82 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
83 用途
84 )))
85 |(% colspan="1" rowspan="21" style="width:52px" %)(((
86 **折线图**
87
88
89 )))|(% colspan="1" rowspan="12" style="width:76.9844px" %)(((
90 基础
91
92
93 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
94 显示标题
95 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
96 (((
97 控制画布左上角的标题是否显示的开关
98
99 [[image:1729664204675-778.png||height="214" width="731"]]
100 )))
101
102 (((
103
104 )))
105 )))
106 |(% colspan="1" rowspan="1" style="width:94px" %)(((
107 标题名称
108 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户自定义报表标题
109 |(% colspan="1" rowspan="1" style="width:94px" %)(((
110 帮助文字
111 )))|(% colspan="1" rowspan="1" style="width:1272px" %)开启后,标题右侧出现小问号,鼠标悬浮时,出现帮助文字具体内容
112 [[image:1729664436892-701.png]]
113 |(% colspan="1" rowspan="1" style="width:94px" %)(((
114 帮助文字内容
115 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户自定义帮助文字的文案,例如“这是本月销售订单总额的统计”
116 |(% colspan="1" rowspan="1" style="width:94px" %)(((
117 折线图类型
118 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
119 (((
120 支持2种类型:折线、曲线
121 [[image:1729664469432-978.png||height="398" width="875"]]
122 )))
123
124 (((
125
126 )))
127 )))
128 |(% colspan="1" rowspan="1" style="width:94px" %)(((
129 配色方案
130 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
131 支持用户自定义(多Y轴时)整体的配色方案
132 )))
133 |(% colspan="1" rowspan="1" style="width:94px" %)(((
134 显示缩略轴
135 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户设置针对横轴的缩略轴,即:查看横轴上某一区间的数据
136 [[image:1729664570038-223.png||height="477" width="822"]]
137 |(% colspan="1" rowspan="1" style="width:94px" %)(((
138 展示点
139 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
140 (((
141 默认打开,关闭后画布上不显示折线的每个描点
142
143
144 [[image:1729736532720-382.png||height="441" width="866"]]
145 )))
146
147 (((
148
149 )))
150 )))
151 |(% colspan="1" rowspan="1" style="width:94px" %)(((
152 点大小
153 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
154 控制折线图中点大小
155
156 [[image:1729664677195-525.png||height="515" width="857"]]
157 )))
158 |(% colspan="1" rowspan="1" style="width:94px" %)(((
159 展示线
160 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
161 默认打开,关闭后折线的线段消失,只显示点(类似散点图)
162
163 [[image:1729664725301-778.png||height="403" width="937"]]
164
165
166 )))
167 |(% colspan="1" rowspan="1" style="width:94px" %)(((
168 线粗细
169
170
171 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
172 支持用户控制折线的线段粗细
173 )))
174 |(% colspan="1" rowspan="1" style="width:94px" %)(((
175 填充
176
177
178 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
179 默认关闭, 打开后每个点向下填充半透明的颜色到X轴,效果如下:
180
181 [[image:1729664811246-731.png||height="276" width="683"]]
182
183
184 )))
185 |(% colspan="1" rowspan="5" style="width:76.9844px" %)(((
186 横轴
187
188
189 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
190 显示轴标题
191
192
193 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
194 开启后,画布中横轴下方,将显示用户配置的横轴的数据源的标题
195
196 [[image:1737529012159-610.png]]
197 )))
198 |(% colspan="1" rowspan="1" style="width:94px" %)(((
199 轴标题名称
200
201
202 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户自定义想要的轴标题名称文案
203 |(% colspan="1" rowspan="1" style="width:94px" %)(((
204 颜色字号
205 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户自定义轴标题的颜色和字号
206 |(% colspan="1" rowspan="1" style="width:94px" %)(((
207 轴标签
208 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
209 控制是否显示轴标签的开关,如下图:
210
211 [[image:1729737350555-287.png||height="438" width="900"]]
212 )))
213 |(% colspan="1" rowspan="1" style="width:94px" %)(((
214 (轴标签)自动旋转
215 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
216 轴标签会斜45°显示,如下图
217
218 [[image:1729737429518-371.png]]
219 )))
220 |(% colspan="1" rowspan="4" style="width:76.9844px" %)(((
221 纵轴
222
223
224 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
225 显示轴标题
226
227
228 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
229 开启后,画布中纵轴左侧,将显示用户配置的纵轴的(第一个数据源)的标题
230
231 (图中:“Y轴标题”是轴标题, “桌子、椅子、窗帘”是图例)
232
233 [[image:1729737694678-922.png]]
234 )))
235 |(% colspan="1" rowspan="1" style="width:94px" %)(((
236 标题内容
237 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户自定义想要的轴标题名称文案
238 |(% colspan="1" rowspan="1" style="width:94px" %)(((
239 轴标签
240 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
241 控制Y轴轴标签是否显示的开关
242
243 [[image:1729737826799-987.png||height="434" width="369"]]
244 )))
245 |(% colspan="1" rowspan="1" style="width:94px" %)(((
246 刻度数
247 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户配置的Y轴的刻度数(注意:这里的刻度数是一个预估值,报表引擎在渲染时可能会根据实际情况改变最终呈现的刻度数)
248 |(% colspan="1" rowspan="1" style="width:52px" %)(((
249
250 )))|(% colspan="1" rowspan="3" style="width:76.9844px" %)(((
251 图例
252
253
254 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
255 显示图例
256 )))|(% colspan="1" rowspan="1" style="width:1272px" %)(((
257 默认开启, 关闭后则不显示图例
258
259 [[image:1729737941885-204.png||height="506" width="842"]]
260 )))
261 |(% colspan="1" rowspan="1" style="width:52px" %)(((
262
263 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
264 图例位置
265 )))|(% colspan="1" rowspan="1" style="width:1272px" %)图例默认出现在画布的左上角,同时支持用户设置图例在画布中的位置
266 |(% colspan="1" rowspan="1" style="width:52px" %)(((
267
268 )))|(% colspan="1" rowspan="1" style="width:94px" %)(((
269 颜色字号
270 )))|(% colspan="1" rowspan="1" style="width:1272px" %)支持用户根据需要自行调整图例的文字颜色和字体大小