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.

Grouped Vertical Bar Chart not working with particular series of data

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report

Current behavior Bar Vertical 2d Graph ( Grouped Vertical Bar Chart ) is not populating

Expected behavior Bar Vertical 2d Graph ( Grouped Vertical Bar Chart ) should be populated

Reproduction of the problem Bar Vertical 2d Graph ( Grouped Vertical Bar Chart ) is not populating with the following data

[{"name":"201701","series":[{"name":"Post-Control","value":13740},{"name":"Post-Test","value":12348},{"name":"Pre-Control","value":13598},{"name":"Pre-Test","value":12334}]},{"name":"201702","series":[{"name":"Post-Control","value":15558},{"name":"Post-Test","value":9298},{"name":"Pre-Control","value":15409},{"name":"Pre-Test","value":9278}]},{"name":"201703","series":[{"name":"Post-Control","value":14365},{"name":"Post-Test","value":11337},{"name":"Pre-Control","value":14193},{"name":"Pre-Test","value":11320}]},{"name":"201704","series":[{"name":"Post-Control","value":12889},{"name":"Post-Test","value":13535},{"name":"Pre-Control","value":12701},{"name":"Pre-Test","value":13507}]},{"name":"201705","series":[{"name":"Post-Control","value":12277},{"name":"Post-Test","value":13809},{"name":"Pre-Control","value":12072},{"name":"Pre-Test","value":13779}]},{"name":"201706","series":[{"name":"Post-Control","value":16076},{"name":"Post-Test","value":9332},{"name":"Pre-Control","value":15821},{"name":"Pre-Test","value":9301}]},{"name":"201707","series":[{"name":"Post-Control","value":17734},{"name":"Post-Test","value":7578},{"name":"Pre-Control","value":17453},{"name":"Pre-Test","value":7558}]},{"name":"201708","series":[{"name":"Post-Control","value":19068},{"name":"Post-Test","value":5618},{"name":"Pre-Control","value":18807},{"name":"Pre-Test","value":5601}]},{"name":"201709","series":[{"name":"Post-Control","value":12675},{"name":"Post-Test","value":10356},{"name":"Pre-Control","value":12494},{"name":"Pre-Test","value":10324}]},{"name":"201710","series":[{"name":"Post-Control","value":16788},{"name":"Post-Test","value":6516},{"name":"Pre-Control","value":16550},{"name":"Pre-Test","value":6497}]},{"name":"201711","series":[{"name":"Post-Control","value":17328},{"name":"Post-Test","value":5819},{"name":"Pre-Control","value":17119},{"name":"Pre-Test","value":5806}]},{"name":"201712","series":[{"name":"Post-Control","value":18003},{"name":"Post-Test","value":5674},{"name":"Pre-Control","value":17802},{"name":"Pre-Test","value":5665}]},{"name":"201713","series":[{"name":"Post-Control","value":19696},{"name":"Post-Test","value":3438},{"name":"Pre-Control","value":19535},{"name":"Pre-Test","value":3436}]}];

It was working in 3.0.4.

Reproduced this issue on official site -> https://swimlane.gitbooks.io/ngx-charts/content/charts/bar-vertical-2d.html by changing data.

Please tell us about your environment: MAC - 10.12.4 , npm - 3.10.10

  • ngx-charts version: 5.1.2

  • Angular version: 4.0.3

  • Language: [all | TypeScript 2.2.2 | ES6/7 | ES5]

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
gopinathshivacommented, May 5, 2017

Seems the default value of groupPadding (16px) and barPadding (8px) was the culprit for the given view of 400 * 220.

Reducing the groupPadding and barPadding solved the issue.

Closing the issue

0reactions
vijaykantacommented, May 22, 2019

Yes, solved it pretty much for me. I was wondering why the lines were so thin, but then I took your suggestion and started with 0 for both parameters, and locked to the ones I was comfortable with. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Complete Guide to Grouped Bar Charts | Tutorial by Chartio
A grouped bar chart allows for values to be compared on levels of two different categorical variables. Use this guide to learn how...
Read more >
Grouped Bar Chart in Excel - How to Create? (10 Steps)
1. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.0.1u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ... 2. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.0.1.5u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ... 3. u003cbr/u003eu003cimg alt=u0022Grouped-Bar-Chart-Example-1.2.0u0022 src=u0022https://www.wallstreetmojo.com/wp-content/uploads/2019/08/Grouped-Bar-Chart ...
Read more >
Creating a Grouped Bar Chart - Excel - eduCBA
1. Right-click on the chart; it will open the window for formatting. Select the 'Format Data Series Option' by selecting the chart.
Read more >
Change the plotting order of categories, values, or data series
Reverse the plotting order of data series in a 3-D chart ... To change the plotting order of values, click the vertical (value)...
Read more >
Creation of a Grouped Bar Chart | Tableau Software
To create a grouped bar chart or side-by-side chart, ensure that the desired pill is set to Continuous so that the continuous field...
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