Ngx-charts: barpadding before first bar and after last bar not set

Created on 15 Mar 2018  路  8Comments  路  Source: swimlane/ngx-charts

**I'm submitting a:

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

When is set the barPadding parameter padding is only added between bars but not before the first and the last bar.

Expected behavior
Padding is also added before first and after last bar.

Reproduction of the problem
Use ngx-charts-bar-vertical and add [barPadding]="64"

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Tested with ngx-charts-bar-vertical

  • ngx-charts version: 7.0.1
  • Angular version: 5.x.x

  • Browser: all

  • Language: all

Need More Info Stale

Most helpful comment

The use case is to have padding before the first bar and after the last bar. It looks better in my opinion. With only few bars it looks by default a bit bulky to fix this we tried to use the barPadding setting.

The background is the following:
At this moment the only option to get the bars smaller in width is to use the barPadding but this only increases the padding between the bars.

Example:

bar-example

All 8 comments

I'm not sure I understand this. What would be the use case for that behavior?

The use case is to have padding before the first bar and after the last bar. It looks better in my opinion. With only few bars it looks by default a bit bulky to fix this we tried to use the barPadding setting.

The background is the following:
At this moment the only option to get the bars smaller in width is to use the barPadding but this only increases the padding between the bars.

Example:

bar-example

Are there any plans for this feature? It could work like groupPadding of the Grouped Vertical Barchart.

It should look like this for example
bildschirmfoto 2018-11-07 um 11 03 52

Does anyone know how to accomplish this at the moment?

I am also in favour of this feature. It looks bad when its not centred for small data set. I've tired adding empty objects in front of array and in the end but it concats both empty objects.

+1 Please give some workaround or the fix for this defect.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephanrauh picture stephanrauh  路  4Comments

jvbianchi picture jvbianchi  路  4Comments

ronybarbosa picture ronybarbosa  路  3Comments

tobigit picture tobigit  路  4Comments

NashIlli picture NashIlli  路  3Comments