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.

Barchart bars are not the same width.

See original GitHub issue

Installed: BAR-CARD Version 3.1.6

Bildschirmfoto 2020-05-03 um 15 08 22

type: "custom:vertical-stack-in-card"
title: Verbrauch Erdgeschoss
cards:

  - type: "custom:bar-card"
    columns: 7
    stack: horizontal
    direction: up
    entities:
      - entity: sensor.verbrauch_buro
        name: 'Büroraum'
      - entity: sensor.verbrauch_waschraum
        name: 'Wirtschaftraum'
      - entity: sensor.verbrauch_heizung
        name: 'Heizungsraum'
      - entity: sensor.verbrauch_vorratsraum
        name: 'Vorratsraum'
      - entity: sensor.verbrauch_gang_eg
        name: 'Vorraum'
      - entity: sensor.verbrauch_garage
        name: 'Garage'
      - entity: sensor.verbrauch_zahlerschrank
        name: 'Zählerschrank'
    positions:
      icon: 'off'
      indicator: inside
      name: outside
    height: 240px
    max: 3500
    min: 0
    padding: 2px
    title_position: inside
    unit_of_measurement: Wh
    width: 100%
    line_width: 0.5
    title_style:
      font-size: 14px
      font-weight: 400
    value_style:
      font-size: 14px
      font-weight: 500
    severity:
      - color: "#CFD8DC"
        value: 0
      - color: "#4CAF50"
        value: 50
      - color: "#FDD835"
        value: 100
      - color: "#64DD17"
        value: 200
      - color: "#FFF176"
        value: 300
      - color: "#FFEB3B"
        value: 400
      - color: "#FF5722"
        value: 600
      - color: "#f44336"
        value: 800
      - color: "#f44336"
        value: 5000
    style: |
      ha-card {
        border-radius: 4px;
        transform: scale(0.95);
        background-size: 100% 100%;
        background-color: transparent;
      }
     ....

name: inside --> same barwidth but name text to long ? Bildschirmfoto 2020-05-03 um 15 28 21

QAD-Setting with CSS:

    style: |-
      ha-card {
        border-radius: 4px;
        transform: scale(0.95);
        background-size: 100% 100%;
        background-color: transparent;
      }
      bar-card-name {
       text-overflow: ellipsis;
       white-space: nowrap;
       overflow: hidden;
       width:100%;
       cursor: pointer ! important;
      }
      bar-card-card	{
        min-width:10%;  
      }

Do I have to change anything in the settings?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tomlutcommented, May 9, 2020

I think this is a similar issue. I was about to ask if the name field could be shortened to the chart width with ellipses (like the button card below) to prevent it pushing the bar charts off the card:

IMG_0564

Rather than the bar chart assuming the width of the name.

0reactions
tomlutcommented, May 12, 2020

Would it help if we were able to specify the column width as a percentage of the card width rather than a number that seems to calculate an absolute width in px?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bars in matplotlib bar chart are not the same width?
The width of the bars of the chart are not even. I tried setting a specific width, but that didn't work. Is there...
Read more >
The bars on my bar graph aren't of even widths. - Mr. Excel
That's my graph of some random numbers sorted. It's a screen shot of a 50% Zoom and the X axis is ~424 pixels...
Read more >
3.6 Adjusting Bar Width and Spacing - R Graphics Cookbook
To make the bars narrower or wider, set width in geom_col() . The default value is 0.9; larger values make the bars wider,...
Read more >
How to adjust the Bar Chart to make bars wider in Excel?
Adjust the Bar Chart to make bar wider in Excel​​ 1. Click on any bar in the Bar Chart and right click on...
Read more >
how to do it in Excel: adjusting bar width - storytelling with data
Highlight all the bars, right-click and choose Format Data Series: how to adjust bar chart spacing.png.
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