github RomRider/apexcharts-card v1.9.0

latest releases: v2.0.4, v2.0.4-dev.1, v2.0.3...
2 years ago

1.9.0 (2021-05-24)

Information

  • 🎉 You can now have as many y-axis as there are series defined in your configuration, or less and it supports auto-scaling 🎉 So you can now easily group some series together on an y-axis, and some other on other y-axis.

    min and max support multiple types of format:

    • not set or auto (this is the default): if it is set to auto, the min or max will be automatically calculated
    • any number: if a number is set, the min or max will be fixed on the y-axis
    • ~90: if the format is ~ followed by a number, the min or max will be defined as a soft bounds
      • min: ~90 and the min of the data in the series is 120: the y-axis min value will be 90
      • min: ~90 and the min of the data in the series is 60: the y-axis min value will be 60
    • '|+20|' or '|-20|': This will add/remove the value between | | from the min/max
      • min: '|-20|': The min of the data in the series is 32, the y-axis min will be 12 (= 32 - 20)
      • max: '|+10|': The max of the data in the series is 32, the y-axis max will be 42 (= 32 + 10)

    Example:

    type: custom:apexcharts-card
    graph_span: 20min
    yaxis:
      - id: first # identification name of the first y-axis
        apex_config:
          tickAmount: 4
      - id: second # identification name of the second y-axis
        opposite: true # make it show on the right side
        apex_config:
          tickAmount: 4
    all_series_config:
      stroke_width: 2
    series:
      - entity: sensor.random0_100
        yaxis_id: first # this serie will be associated to the 'id: first' axis.
      - entity: sensor.random_0_1000
        yaxis_id: second # this serie will be associated to the 'id: second' axis.
      - entity: sensor.random0_100
        yaxis_id: first # this serie will be associated to the 'id: first' axis.
        transform: 'return Number(x) + 30;' # We make it go fom 30 to 130
      - entity: sensor.random0_100
        yaxis_id: first # this serie will be associated to the 'id: first' axis.
        transform: 'return Number(x) - 30;' # We make it go from -30 to 70

Features

  • make datagenerator async (#157) (b9049fc)
  • Native multi y-axis support with auto-scale (#160) (e08aa14), closes #158
  • soft bounds and extended bounds for yaxis min/max (#161) (c57278b)
  • apex_config: Support for functions in apex_config (cebc03b), closes #81

Bug Fixes

  • always get all state changes, not only significant ones (3b2f9c8)
  • graph might be wrong when using attributes if value was 0 (e200323)
  • Support for custom views config parameters (view_layout) (76a8023)
  • yaxis would always start at 0 (50ef9e4), closes #158
  • group_by: group_by reporting erronerous values for the first bucket of data (8303b84), closes #110
  • group_by: When group_by was used with lines, the end of the chart was showing an empty slot (display bug only) (0163f9e)

Don't miss a new apexcharts-card release

NewReleases is sending notifications on new releases.