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.

How to scale the height of the bar height value=0.00 ??

See original GitHub issue

How can I scale the height of the bar. The value of 0 is too high.

min-graph-barchart

Mini Graph Card: v0.8.0

type: "custom:vertical-stack-in-card"
title: "Ertrag vs. Verbrauch"

cards:
  - type: "custom:mini-graph-card"
    entities:
      - sensor.kostal_current_watt
    hours_to_show: 54
    icon: "mdi:theme-light-dark"
    name: "Photovoltaik Ertrag"
    font_size: 80
    unit: kWh
    upper_bound: 2000
    aggregate_func: max
    group_by: hour
    show:
      icon_adaptive_color: true
      name_adaptive_color: true
      name: true
      icon: true
      state: true
      fill: fade
      points: true
      legend: bottom
      extrema: false
      labels: hover
      graph: bar
    style: |
      ha-card {
          transform: scale(0.95);
          background-size: 100% 100%;
          height: 240px;
      }
      .graph__legend {
         flex-wrap: nowrap;
      }
    color_thresholds:
      - color: "#CFD8DC"
        value: 5000
      - color: "#4CAF50"
        value: 800
      - color: "#FDD835"
        value: 600
      - color: "#64DD17"
        value: 400
      - color: "#FFF176"
        value: 300
      - color: "#FFEB3B"
        value: 200
      - color: "#FF5722"
        value: 100
      - color: "#f44336"
        value: 50
      - color: "#f44336"
        value: 0

  - type: "custom:mini-graph-card"
    entities:
      - sensor.verbrauch_gesamt
    hours_to_show: 54
    icon: "mdi:home"
    name: "Haus Verbrauch"
    font_size: 80
    unit: kWh
    upper_bound: 2000
    aggregate_func: max
    group_by: hour
    show:
      icon_adaptive_color: true
      name_adaptive_color: true
      name: true
      icon: true
      state: true
      fill: fade
      points: true
      legend: bottom
      extrema: false
      labels: hover
      graph: bar
    style: |
      ha-card {
        transform: scale(0.95);
        background-size: 100% 100%;
        height: 240px;
      }
      .graph__legend {
             flex-wrap: nowrap;
      }
    color_thresholds:
      - 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

  - type: markdown
    style: |
      ha-card {
         color: #B5B5B5;
         font-weight: 300 !important;
         font-size: 1.5em !important;
      }
    content: >
      <div>Zusammenfassung</div>

  - type: glance
    style: |
      ha-card {
          background-color: transparent;
          box-shadow: none;
      }
    entities:
      - sensor.kostal_current_kw
      - sensor.psm_totalkw
      - sensor.psm_nettokw

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
zibouscommented, Oct 22, 2019

@kalkih

solved, setting line_width: 1 and now all is o.k Thanks 👍

0reactions
zibouscommented, Oct 22, 2019

barchart

@kalkih

I’ve tried to choose a different variant of the rendering, but it looks like the “bar” graphic can not be negative. Is that correct or am I doing something wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaling height of bars to container size - Stack Overflow
A basic linear scale goes like this: var yScale = d3.scale.linear() .domain([0, d3.max( ...
Read more >
ArcGIS Pro 2.0 scale bar height - Esri Community
I would like to adjust the height or thickness of a scale bar in ArcGIS Pro 2.0. Can this be done? Solved! Go...
Read more >
Barplot() with log axis scaling and other features
Draw "height" axis grid lines *behind* the bars. ... if (min(height) <= 0) stop("log scale error: at least one 'height' value <= 0")...
Read more >
Color of bar plot depending on the bar height (pgfplot) - TeX
Does there exist any command to make the bar color depend on the bar size ? For example, the color of a bar...
Read more >
Min height for columns with value "0" - Highcharts
I'm working on a column chart with "0" values (on a scale of 0 to 100). ... bar charts) less than 3 will...
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