Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build stacked histograms using histograms

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use histograms to build stacked bar chart", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "how to use histograms to build stacked bar chart" bar!

Let's start with an example of a stacked bar chart.

The corresponding data are as follows:

Compared with a normal bar chart, the stacked bar chart is just the fourth column with multiple value, separated by commas between multiple value.

The configuration file is written as follows:

Most of the attributes are exactly the same as the regular bar chart, and it is important to pay attention to the way they are assigned. For example, fill_color, you can see that there are five colors connected by commas. Corresponds to 5 value in file.

For the fill_color and thickness attributes, the value can be either a value or multiple values concatenated by commas. Its value is one, indicating that all column properties are the same; for multiple values, connect with a comma, each column corresponds to an attribute; if the number of attributes is less than the number of value, it will cycle automatically.

In the image below, each bin has five columns, but the fill_color has only two values, and the values of the filled color automatically cycle to red,black,red, black,red.

Thiockness has a new use in stacked column charts, which can be seen as the thickness of each column border, and the greater the value, the greater the spacing between the columns in the diagram.

In the following figure, you can see that with the increase of thickness, not only the gap between the columns becomes larger, but also the corresponding filling area shrinks by one circle.

In the stacked column chart, there is a unique attribute sort_bin_values that indicates whether to adjust the height of the column according to the size of the value. The default value is no, the order of the columns is in the order specified in the file file, and the first value corresponds to the bottom column. When the value is yes, the order of the columns will be out of order, and the largest column of value is at the bottom. The schematic diagram is as follows:

In addition to filling colors, you can also set the pattern property, which can be used as follows

Pattern = vline,hline,solid,checker,solid

The effect picture is as follows:

The function of pattern is to set the pattern of fill, such as slash fill and so on.

Thank you for reading, the above is "how to use histograms to build stacked bar chart" content, after the study of this article, I believe you have a deeper understanding of how to use histograms to build stacked bar chart, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report