Skip to content

Commit

Permalink
Merge pull request #408 from fandi-1205/master
Browse files Browse the repository at this point in the history
fix(barGrid): fix the default value of `barGap` & `barCategoryGap`
  • Loading branch information
plainheart authored Jul 16, 2024
2 parents 4aefb3e + 26fdd45 commit 85541d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions en/option/partial/barGrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ The minimum angle of bar. It could be used to avoid the following situation: the

<ExampleUIControlNumber min="0" />

## barGap(string) = ${barGapDefault|default('30%')}
## barGap(string) = ${barGapDefault|default('20%')}

The gap between bars between different series, is a percent value like `'30%'`, which means `30%` of the bar width.
<ExampleUIControlPercent default="${barGapDefault|default('20%')}"/>

The gap between bars between different series, is a percent value like `'20%'`, which means `20%` of the bar width.

Set barGap as `'-100%'` can overlap bars that belong to different series, which is useful when making a series of bar be background.

Expand All @@ -60,9 +62,9 @@ Set barGap as `'-100%'` can overlap bars that belong to different series, which
For example:
~[600x400](${galleryViewPath}doc-example/barGrid-barGap&reset=1&edit=1)

## barCategoryGap(string) = '20%'
## barCategoryGap(number|string)

The bar gap of a single series, defaults to be `20%` of the category gap, can be set as a fixed value.
The bar gap of a single series, by default, a suitable spacing is calculated based on the number of series in the bar chart. When there are more series, the spacing will be appropriately reduced, can be set as a fixed value.

{{ use: partial-barGrid-share-desc(
seriesType = ${seriesType}
Expand Down
12 changes: 6 additions & 6 deletions zh/option/partial/barGrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@

<ExampleUIControlNumber min="0" />

## barGap(string) = ${barGapDefault|default('30%')}
## barGap(string) = ${barGapDefault|default('20%')}

<ExampleUIControlPercent default="30%"/>
<ExampleUIControlPercent default="${barGapDefault|default('20%')}"/>

不同系列的柱间距离,为百分比(如 `'30%'`,表示柱子宽度的 `30%`)。
不同系列的柱间距离,为百分比(如 `'20%'`,表示柱子宽度的 `20%`)。

如果想要两个系列的柱子重叠,可以设置 barGap 为 `'-100%'`。这在用柱子做背景的时候有用。

Expand All @@ -64,11 +64,11 @@
例子:
~[600x400](${galleryViewPath}doc-example/barGrid-barGap&reset=1&edit=1)

## barCategoryGap(string) = '20%'
## barCategoryGap(number|string)

<ExampleUIControlPercent default="20%"/>
<ExampleUIControlPercent />

同一系列的柱间距离,默认为类目间距的20%,可设固定值
同一系列的柱间距离,默认情况下根据柱状图的系列数量计算得到合适的间距,系列较多时间距会适当调小,可设固定值

{{ use: partial-barGrid-share-desc(
seriesType = ${seriesType}
Expand Down

0 comments on commit 85541d7

Please sign in to comment.