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 showing bars when chart configured with big number of groups

See original GitHub issue

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

[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 For grouped vertical bar chart when when there is a lot of data - in my case around 37 groups with 3 sets - the bars disappear. Changing the view size (width) of the chart expands the size for each group but the rectangle in which the bars are drown is still small.

Expected behavior When changing the size of the chart bars should appear when the width is big enough to fit all bars.

Reproduction of the problem On demo page (https://swimlane.github.io/ngx-charts/#/ngx-charts/bar-vertical-2d) turn on real-time data. After a while bars will not be visible.

Changing the size of the chart will help initially but after a while it doesn’t matter how big the chart is bars won’t be there.

I’ve also created a plunker https://plnkr.co/edit/yPraBTyJgRkXK1zxvr8G

What is the motivation / use case for changing the behavior? It doesn’t work as I would expect it to.

Please tell us about your environment: Windows server 2012, WebStorm, NPM, .Net self hosted, Angular

  • ngx-charts version: 7.1.1

  • Angular version: 5.2.1

  • Browser: Tested/Reproduced under IE11 and Chrome 65.0.3325.181

  • Language: TypeScript 2.5.3

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
asantiago323commented, Mar 11, 2020

Is it possible to get the bar-vertical-2d chart to look like bar-vertical when using a lot of data? I wanted to group dates by month, but if some months have more data items in the series than others, it looks odd, and even setting the [barPadding] to 1 or 2 was not helping.

image

I would much rather it look like this, but with the month grouping instead of all the dates. image

1reaction
asantiago323commented, Mar 11, 2020

This is what i get if having more than 4 months, even with groupPadding altered. image

Here is some sample data: `export var multi = [ { “name”: “October”, “series”: [ { “name”: “10/1/2020”, “value”: 7300000 }, { “name”: “10/31/2020”, “value”: 8940000 } ] },

{ “name”: “November”, “series”: [ { “name”: “11/1/2020”, “value”: 7870000 }, { “name”: “11/2/2020”, “value”: 8270000 }, { “name”: “11/3/2020”, “value”: 8270000 }, { “name”: “11/4/2020”, “value”: 8270000 }, { “name”: “11/5/2020”, “value”: 8270000 }, { “name”: “11/6/2020”, “value”: 8270000 }, { “name”: “11/7/2020”, “value”: 8270000 }, { “name”: “11/8/2020”, “value”: 8270000 }, { “name”: “11/9/2020”, “value”: 8270000 }, { “name”: “11/10/2020”, “value”: 8270000 }, { “name”: “11/11/2020”, “value”: 8270000 }, { “name”: “11/12/2020”, “value”: 8270000 }, { “name”: “11/13/2020”, “value”: 8270000 }, { “name”: “11/14/2020”, “value”: 8270000 }, { “name”: “11/15/2020”, “value”: 7870000 }, { “name”: “11/16/2020”, “value”: 8270000 }, { “name”: “11/17/2020”, “value”: 8270000 }, { “name”: “11/18/2020”, “value”: 8270000 }, { “name”: “11/19/2020”, “value”: 8270000 }, { “name”: “11/20/2020”, “value”: 8270000 }, { “name”: “11/21/2020”, “value”: 8270000 }, { “name”: “11/22/2020”, “value”: 8270000 }, { “name”: “11/23/2020”, “value”: 8270000 }, { “name”: “11/24/2020”, “value”: 8270000 }, { “name”: “11/25/2020”, “value”: 8270000 }, { “name”: “11/26/2020”, “value”: 8270000 }, { “name”: “11/29/2020”, “value”: 8270000 }, { “name”: “11/30/2020”, “value”: 8270000 } ] },

{ “name”: “December”, “series”: [ { “name”: “12/26/2020”, “value”: 5000002 }, { “name”: “11/27/2020”, “value”: 5800000 }, { “name”: “12/28/2020”, “value”: 5000002 }, { “name”: “11/29/2020”, “value”: 5800000 }, { “name”: “12/30/2020”, “value”: 5000002 }, { “name”: “11/31/2020”, “value”: 5800000 } ] }, { “name”: “January”, “series”: [ { “name”: “12/26/2020”, “value”: 5000002 }, { “name”: “11/27/2020”, “value”: 5800000 }, { “name”: “12/28/2020”, “value”: 5000002 }, { “name”: “11/29/2020”, “value”: 5800000 }, { “name”: “12/30/2020”, “value”: 5000002 }, { “name”: “11/31/2020”, “value”: 5800000 } ] } ];

`

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 >
Vertical Bar Charts in the Report Builder
Vertical bar charts display data in a series of bars that run from the bottom to the top of the chart. Vertical bar...
Read more >
Google Sheets bar charts with multiple groups
Bar graphs are great when working with multiple groups of data. ... The data in the chart is grouped by campus. ... Vertical...
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 >
Stacked Bar Charts - Salesforce Help
Use a stacked bar chart when you have multiple groupings and are interested in the proportions between values in each grouping, as well...
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