Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Bar Chart Background/Track Color #577

Open
yatil opened this issue Jul 20, 2024 · 0 comments
Open

[FEATURE REQUEST] Bar Chart Background/Track Color #577

yatil opened this issue Jul 20, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@yatil
Copy link

yatil commented Jul 20, 2024

Feature Request

Describe the solution / feature you'd like

When plotting out a bar chart where many values can be zero, it helps glanceability to see where the tracks of the bars would be, it also helps with determining the relative value, especially when using fixed values.

Describe alternatives you've considered

My current alternative is to draw gray lines behind the bar chart. The chart is rendered on top of the drawing, so there is an illusion of having tracks there:

{
  "icon": "863",
  "autoscale": false,
  "draw": [
    { "dl": [ 9, 0,  9, 8, "#333333"] },
    { "dl": [11, 0, 11, 8, "#333333"] },
    { "dl": [13, 0, 13, 8, "#333333"] },
    { "dl": [15, 0, 15, 8, "#333333"] },
    { "dl": [17, 0, 17, 8, "#333333"] },
    { "dl": [19, 0, 19, 8, "#333333"] },
    { "dl": [21, 0, 21, 8, "#333333"] },
    { "dl": [23, 0, 23, 8, "#333333"] },
    { "dl": [25, 0, 25, 8, "#333333"] },
    { "dl": [27, 0, 27, 8, "#333333"] },
    { "dl": [29, 0, 29, 8, "#333333"] }
  ],
  "color": [73, 189, 254],
  "bar": [
    {{ (states('sensor.kmw_forecast_0_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_1_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_2_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_3_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_4_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_5_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_6_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_7_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_8_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_9_prec')  | float) | round(0, "ceil") }},
    {{ (states('sensor.kmw_forecast_10_prec') | float) | round(0, "ceil") }}
  ]
}

And while that is feasible to do with a known number of values, it gets harder otherwise. In addition, choosing the colors wisely and inverting the values for the bars would allow bar charts that are anchored to the top of the display.

Additional context

Here are screenshots without and with “tracks”:

Precipitation forecast with just one single blue pixel at the bottom right of the display
Precipitation forecast with clear lines for each bar and the last bar has just one single blue pixel at the bottom right

Thanks for your consideration of this Feature Request!

@yatil yatil added the feature request New feature or request label Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant