question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

barpadding before first bar and after last bar not set

See original GitHub issue

**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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
DHoffmcommented, Apr 9, 2018

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

0reactions
github-actions[bot]commented, Jun 17, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar chart - Bar padding and alignment - Stack Overflow
I have a stacked percent bar chart that shows 3 bars. ... For some reason, the bars have a lot of space among...
Read more >
Making a bar chart — Scott Murray — alignedleft
Instead of an x of zero, we'll assign a dynamic value that corresponds to i , or each value's position in the data...
Read more >
Documentation: DevExtreme - JavaScript Chart Bar Series
barPadding. Controls the padding and consequently the width of all bars in a series using relative units. Ignored if the barWidth property is...
Read more >
3.6 Adjusting Bar Width and Spacing - R Graphics Cookbook
You want to adjust the width of bars and the spacing between them. 3.6.2 Solution. To make the bars narrower or wider, set...
Read more >
React Data Grid: Sparklines - Bar Customisation - AG Grid
The following Bar Sparkline Options can be used to customise Bar Sparklines: ... sets the padding on the outer edge of the first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found