Skip to content

Second y-axis stops auto-scale from working (y-axis scale always starts with 0) #158

Description

@chah90

Checklist

  • I updated the card to the latest version available => tested with 1.9.0-dev.1
  • 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
As soon as I add a second y-axis, both y-axis are starting with 0. I already tested 1.9.0-dev.1 and specified a min function (see my configuration) but this doesn't work neither.

Version of the card
Version: 1.8.2 and 1.9.0-dev.1

To Reproduce
This is the configuration I used:

type: 'custom:apexcharts-card'
apex_config:
  yaxis:
    - title:
        text: Axis 1
      min: |
        EVAL:function(min) {
          return min;
        }
    - title:
        text: Axis 2
      opposite: true
      min: |
        EVAL:function(min) {
          return min;
        }
series:
  - entity: sensor.Schlafzimmer_Temperatur
    name: Temperature
  - entity: sensor.Schlafzimmer_Humidity
    name: Humidity

Screenshots
Appearance when using one y-axis (just removed the second axis from the configuration above):
one-y-axis
The axis starts at ~ 19.

When using the configuration from above with two y-axis, both y-axis starts at 0:
two-y-axis

Expected behavior
The min values of the y-axis are dynamically identified (either per default or per function as above) just as it is determined if only one y-axis is defined.

Desktop (please complete the following information):

  • Firefox 88.0.1
  • Safari 14.1
  • macOS 11.3.1

Smartphone (please complete the following information):

  • Device: Phone 12 Pro
  • OS: iOS 14.5.1
  • stock Safari browser

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions