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

'selection' property in brush configuration is not taken into consideration #867

Open
4 tasks done
tde01065 opened this issue Feb 12, 2025 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@tde01065
Copy link

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser
  • I verified that I'm really running the lastest version in my browser console
  • I checked if there is another issue opened with the same problem

Describe the bug
I know that brush is an experimental feature, so filing a bug might seem a bit rude. Feel free to consider this a feature request instead, if that's more appropriate.
The brush selection min and max values are not changed when trying to override using apex_config. Probably due to the fact that the deep merge with apex_config is done before the selection property is set.

Version of the card
Version: 2.1.2

To Reproduce
This is the configuration I used:

- type: custom:apexcharts-card
  experimental:
    brush: true
  brush:
    apex_config:
      yaxis:
        max: 100
      chart:
        brush:
          enabled: true
        selection:
          enabled: true
          xaxis:
            min: new Date().getTime() - (2 * 60 * 60 * 1000)
            max: new Date().getTime() + (10 * 60 * 60 * 1000)
  graph_span: 48h
  span:
    start: hour
    offset: '-24h'
  yaxis:
    - id: first
      max: 100
  series:
    - entity: sensor.battery_state_of_capacity
      name: Battery level
      yaxis_id: first
      extend_to: now
      show:
        in_brush: true

Screenshots
Image

Expected behavior
Setting min and max on the brush selection propery should have an impact on the placement of the selection in the brush graph. By setting selection_span, I can move the min side of the selection but I still can't move the max side.

Desktop (please complete the following information):

  • Browser: Chrome
  • Version: 132.0.6834.160

Additional context
I also tried hardcoding the corresponding epoch times to rule out that the JavaScript function isn't compiling correctly.

@tde01065 tde01065 added the bug Something isn't working label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant