Hansz00 commented on a change in pull request #3:
URL:
https://github.com/apache/incubator-echarts-handbook/pull/3#discussion_r463505090
##########
File path: contents/en/application/chart-types/bar/stacked-bar.md
##########
@@ -0,0 +1,30 @@
+# Stacked Bar Chart
+
+Sometimes, we hope to not only figure series separately but also the trend of
the sum. It's a good choice to implement it by using the stacked bar chart. As
the name suggests, in the stacked bar chart, data in the same category will be
stacked up in one column. The overall height of the bar explained the change of
total.
+
+There is a simple way to implement a stacked bar chart by the ECharts. You
need to set the same string type value for a group of series in `stack`. The
series with the same `stack` value will be in the same category.
+
+<!-- embed -->
+```js
+option = {
+ xAxis: {
+ data: ['A', 'B', 'C', 'D', 'E']
+ },
+ yAxis: {},
+ series: [{
+ data: [10, 22, 28, 43, 49],
+ type: 'bar',
+ stack: 'x'
+ }, {
+ data: [5, 4, 3, 5, 10],
+ type: 'bar',
+ stack: 'x'
+ }]
+};
+```
+
+In this case, the position of the second series is based on the position of
the first series, the height increased is corresponding to the first series'
height. Therefore, from the position of the second series, you can find the
changing trend of the sum of the two.
+
+>The value of `stack` explained what series will be stacked up together.
Theoretically, the specific value of 'stack' is meaningless. However, we prefer
some suggestive strings for the convenience of reading.
+>
+>For instance, here is statics with 4 series that is about the amount of male
and female. "adult male" and "boy" need to be stacked while "adult female" and
"girl" need to be stacked. In this case, the suggestive value of `stack` is
`'male'` and `'female'`. Although meaningless string like `'a'` and `'b'` can
achieve the same effect but has worse code readability.
Review comment:
It is a typo, I'll change a way to translate this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]