Skip to content

Toolbar icons for zoom and pan not shown on mobile phone #904

@jmozmoz

Description

@jmozmoz

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
The zoom in/out and the pan icons in the toolbar are not shown on a mobile phone. Neither for the mobile nor the "desktop" mode using Chrome or Firefox (Android 14).

Version of the card
Version: v2.1.2

To Reproduce
This is the configuration I used:

type: custom:apexcharts-card
apex_config:
  chart:
    height: 300px
    zoom:
      enabled: true
    toolbar:
      show: true
      tools:
        zoom: true
        zoomin: true
        zoomout: true
        pan: true
        reset: true
  header:
    align: left
    strokeWidth: 0
header:
  show: true
  standard_format: true
  show_states: true
  colorize_states: true
graph_span: 1d
span:
  start: day
  offset: +0d
now:
  show: false
  label: Jetzt
yaxis:
  - id: Wh
    min: 0
    max: 1600
    align_to: 100
    apex_config:
      tickAmount: 8
  - id: "%"
    min: 0
    max: 100
    align_to: 100
    opposite: true
    apex_config:
      tickAmount: 4
  - id: header
    show: false
series:
  - entity: sensor.battery_energy
    yaxis_id: Wh
    type: line
    name: Ladestand
    show:
      legend_value: false
      in_header: false
      in_legend: true
    float_precision: 2
    extend_to: now
    color: grey
    stroke_width: 2
  - entity: sensor.state_of_charge
    yaxis_id: "%"
    type: line
    name: Ladestand %
    show:
      legend_value: false
      in_header: false
      in_legend: false

Screenshots
This is firefox on Windows:

Image

This is the mobile version in Chrome Android 14:

Image

This is the "desktop" version in Chrome Android 14:

Image

The zoom in, zoom out and reset icons are shown. They also work. Zooming is always fixed to the middle of the x-axis. When "clicking" on the missing icons, nothing is happening.

Expected behavior
Zooming into the graph by touching/sweping over a range of the graph should work like selecting it on the desktop. Also paning should work like on the desktop.

Desktop (please complete the following information):

  • Browser Firefox
  • Version 138.0

Smartphone (please complete the following information):

  • Device: Sony Xperia 10 IV
  • OS: Android 14
  • Browsers: Chrome, Firefox
  • Version Chrome: 135.0, Firefox 138.0

Additional context
Seems to apply to all apex charts with zoom in/out, pan in the toolbar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions