{"id":13588747,"url":"https://github.com/RomRider/apexcharts-card","last_synced_at":"2025-04-08T06:32:35.221Z","repository":{"id":37936401,"uuid":"331701152","full_name":"RomRider/apexcharts-card","owner":"RomRider","description":"📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant","archived":false,"fork":false,"pushed_at":"2025-01-26T08:51:22.000Z","size":1640,"stargazers_count":1359,"open_issues_count":83,"forks_count":100,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-06T00:02:16.722Z","etag":null,"topics":["apexcharts","home-assistant","iot","lovelace"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RomRider.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-21T17:23:45.000Z","updated_at":"2025-04-05T02:45:58.000Z","dependencies_parsed_at":"2023-02-10T09:31:34.081Z","dependency_job_id":"d301f84d-12d4-4f6c-885d-1c9baeaf65d6","html_url":"https://github.com/RomRider/apexcharts-card","commit_stats":{"total_commits":368,"total_committers":10,"mean_commits":36.8,"dds":0.3505434782608695,"last_synced_commit":"6601972333b0f697704c31686922e8ff65da1020"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomRider%2Fapexcharts-card","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomRider%2Fapexcharts-card/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomRider%2Fapexcharts-card/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RomRider%2Fapexcharts-card/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RomRider","download_url":"https://codeload.github.com/RomRider/apexcharts-card/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792150,"owners_count":20996878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apexcharts","home-assistant","iot","lovelace"],"created_at":"2024-08-01T15:06:53.897Z","updated_at":"2025-04-08T06:32:35.189Z","avatar_url":"https://github.com/RomRider.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Dashboard Cards"],"sub_categories":["📈 Charts \u0026 graphs"],"readme":"[![License](https://img.shields.io/github/license/RomRider/apexcharts-card.svg)](LICENSE)\n[![HACS Supported](https://img.shields.io/badge/HACS-Supported-green.svg)](https://github.com/custom-components/hacs)\n![Downloads](https://img.shields.io/github/downloads/RomRider/apexcharts-card/total)\n![GitHub Activity](https://img.shields.io/github/commit-activity/y/RomRider/apexcharts-card.svg?label=commits)\n[![Stable](https://img.shields.io/github/release/RomRider/apexcharts-card.svg)](https://github.com/RomRider/apexcharts-card/releases/latest)\n[![Beta](https://img.shields.io/github/package-json/v/RomRider/apexcharts-card/dev?label=release%40dev)](https://github.com/RomRider/apexcharts-card/releases)\n[![Community Forum](https://img.shields.io/badge/community-forum-brightgreen.svg)](https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877)\n\n# ApexCharts Card by [@RomRider](https://github.com/RomRider) \u003c!-- omit in toc --\u003e\n\n![Header](https://github.com/RomRider/apexcharts-card/raw/master/docs/Header.png)\n\nThis is higly customizable graph card for [Home-Assistant](https://www.home-assistant.io)'s Lovelace UI.\u003cbr/\u003e\n\nIt is based on [ApexCharts.js](https://apexcharts.com) and offers most of the features of the library.\n\nIt is also inspired by the great [`mini-graph-card`](https://github.com/kalkih/mini-graph-card) by [@kalkih](https://github.com/kalkih)\n\n\nHowever, some things might be broken :grin:\n\n## Table of Content \u003c!-- omit in toc --\u003e\n\n- [Installation](#installation)\n  - [HACS (recommended)](#hacs-recommended)\n  - [Manual install](#manual-install)\n  - [CLI install](#cli-install)\n  - [Add resource reference](#add-resource-reference)\n- [Data processing steps](#data-processing-steps)\n- [Using the card](#using-the-card)\n  - [Main Options](#main-options)\n  - [`series` Options](#series-options)\n  - [series' `show` Options](#series-show-options)\n  - [`header_actions` or `title_actions` options](#header_actions-or-title_actions-options)\n  - [`*_action` options](#_action-options)\n  - [`confirmation` options](#confirmation-options)\n  - [`statistics` options](#statistics-options)\n  - [Main `show` Options](#main-show-options)\n  - [`header` Options](#header-options)\n  - [`now` Options](#now-options)\n  - [`group_by` Options](#group_by-options)\n  - [`func` Options](#func-options)\n  - [`chart_type` Options](#chart_type-options)\n  - [`span` Options](#span-options)\n  - [`transform` Option](#transform-option)\n  - [`data_generator` Option](#data_generator-option)\n  - [`yaxis` Options. Multi-Y axis](#yaxis-options-multi-y-axis)\n    - [Min/Max Format](#minmax-format)\n    - [Examples](#examples)\n  - [Apex Charts Options Example](#apex-charts-options-example)\n  - [Layouts](#layouts)\n  - [Configuration Templates](#configuration-templates)\n    - [General](#general)\n    - [`all_series_config` options](#all_series_config-options)\n- [Experimental features](#experimental-features)\n  - [Configuration options](#configuration-options)\n  - [`color_threshold` experimental feature](#color_threshold-experimental-feature)\n  - [`hidden_by_default` experimental feature](#hidden_by_default-experimental-feature)\n  - [`brush` experimental feature](#brush-experimental-feature)\n- [Known issues](#known-issues)\n- [Roadmap](#roadmap)\n- [Examples](#examples-1)\n  - [Simple graph](#simple-graph)\n  - [Multiple Types of Graphs](#multiple-types-of-graphs)\n  - [Aggregating data](#aggregating-data)\n  - [Compare data from today with yesterday](#compare-data-from-today-with-yesterday)\n  - [Change the line thickness](#change-the-line-thickness)\n  - [Use apexcharts-card with auto-entities](#use-apexcharts-card-with-auto-entities)\n  - [Change the height of the graph](#change-the-height-of-the-graph)\n\n## Installation\n\n### HACS (recommended)\n\nThis card is available in [HACS](https://hacs.xyz/) (Home Assistant Community Store).\n\u003csmall\u003e_HACS is a third party community store and is not included in Home Assistant out of the box._\u003c/small\u003e\n\n### Manual install\n\n1. Download and copy `apexcharts-card.js` from the [latest release](https://github.com/RomRider/apexcharts-card/releases/latest) into your `config/www` directory.\n\n2. Add the resource reference as decribed below.\n\n### CLI install\n\n1. Move into your `config/www` directory.\n\n2. Grab `apexcharts-card.js`:\n\n```\n$ wget https://github.com/RomRider/apexcharts-card/releases/download/v2.1.2/apexcharts-card.js\n```\n\n3. Add the resource reference as decribed below.\n\n### Add resource reference\n\nIf you configure Lovelace via YAML, add a reference to `apexcharts-card.js` inside your `configuration.yaml`:\n\n```yaml\nresources:\n  - url: /local/apexcharts-card.js?v=2.1.2\n    type: module\n```\n\nElse, if you prefer the graphical editor, use the menu to add the resource:\n\n1. Make sure, advanced mode is enabled in your user profile (click on your user name to get there)\n2. Navigate to Configuration -\u003e Lovelace Dashboards -\u003e Resources Tab. Hit orange (+) icon\n3. Enter URL `/local/apexcharts-card.js` and select type \"JavaScript Module\".\n4. Restart Home Assistant.\n\n## Data processing steps\n\nThis diagrams shows how your data goes through all the steps allowed by this card:\n\n![data_processing_steps](docs/data_processing_chart.png)\n\n## Using the card\n\n### Main Options\n\n:warning: Since this card is in its debuts, you should expect breaking changes moving forward. :warning:\n\nThe card stricly validates all the options available (but not for the `apex_config` object). If there is an error in your configuration, it will tell you where and display a red error card.\n\n\n:white_check_mark: **means required**.\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| :white_check_mark: `type` | string | | v1.0.0 | `custom:apexcharts-card` |\n| :white_check_mark: `series` | array | | v1.0.0 | See [series](#series-options) |\n| `config_templates` | array | | v1.6.0 | Define a configuration once and reuse it multiple times. See [config_templates](#configuration-templates) |\n| `color_list` | array | | v1.6.0 | Define the array of colors applied to the series. Will be overriden by each serie's color if defined. Usefull for `config_templates` mainly. |\n| `all_series_config` | object | | v1.6.0 | If something is defined here it will apply this config to all the series. It accepts the same options as a serie minus `entity`. It is useful to avoid repetition but the same thing can be achieve in each serie individually. See [series](#series-options) and [all_series_config](#all_series_config-options) for an example |\n| `chart_type` | string | `line` | v1.4.0 | See [chart_type](#chart_type-options) |\n| `update_interval` | string | | v1.1.0 | By default the card updates on every state change. Setting this overrides the behaviour. Valid values are any time string, eg: `1h`, `12min`, `1d`, `1h25`, `10sec`, ... |\n| `update_delay` | string | `1500ms` | v1.4.0 | If the chart doesn't display the last state but the one before, you'll want to increase this value, don't go over `10s`, it's not necessary. You'll also want to increase this value if you are using `attribute` in the `series`. Valid values are any time strings. This is because of how Home-Assistant works with history, see [here](https://www.home-assistant.io/integrations/recorder/#commit_interval) |\n| `graph_span` | string | `24h` | v1.1.0 | The span of the graph as a time interval. Valid values are any time string, eg: `1h`, `12min`, `1d`, `1h25`, `10sec`, ... |\n| `span` | object | | v1.2.0 | See [span](#span-options) |\n| `show` | object | | v1.0.0 | See [show](#main-show-options) |\n| `hours_12` | boolean | | v1.8.0 | If undefined, it will follow Home-Assistant's user time format. If `true`, it will force time to be displayed in 12h format. If `false` it will force the time to be displayed in 24h format. |\n| `cache` | boolean | `true` | v1.0.0 | Use in-browser data caching to reduce the load on Home Assistant's server |\n| `stacked` | boolean | `false` | v1.0.0 | Enable if you want the data to be stacked on the graph |\n| `layout` | string | | v1.0.0 | See [layouts](#layouts) |\n| `header` | object | | v1.0.0 | See [header](#header-options) |\n| `now` | object | | v1.5.0 | See [now](#now-options) |\n| ~~`y_axis_precision`~~ | ~~number~~ | ~~`1`~~ | ~~v1.2.0~~ | **DEPRECATED since v1.10.0** ~~The float precision used to display numbers on the Y axis. Only works if `yaxis` is undefined.~~ |\n| `yaxis` | array | | v1.9.0 | See [yaxis](#yaxis-options-multi-y-axis) |\n| `apex_config`| object | | v1.0.0 | Apexcharts API 1:1 mapping. You call see all the options [here](https://apexcharts.com/docs/installation/) --\u003e `Options (Reference)` in the Menu. See [Apex Charts](#apex-charts-options-example) |\n| `experimental` | object | | v1.6.0 | See [experimental](#experimental-features) |\n| `locale` | string | | v1.7.0 | Default is to inherit from Home-Assistant's user configuration. This overrides it and forces the locale. Eg: `en`, or `fr`. Reverts to `en` if locale is unknown. |\n| `brush` | object | | v1.8.0 | See [brush](#brush-experimental-feature) |\n\n\n\n### `series` Options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| :white_check_mark: `entity` | string | | v1.0.0 | The `entity_id` of the sensor to display |\n| `attribute` | string | | v1.4.0 | Instead of retrieving the state, it will retrieve an `attribute` of the entity. Make sure you increase `update_delay` if the chart doesn't reflect the last value of the attribute |\n| `name` | string | | v1.0.0 | Override the name of the entity |\n| `stack_group` | string | | v2.1.0 | When `stacked` is `true`, groups the different series with the name `stack_group` together. Only works for `type: column`. All series' names need to be be unique because of a bug in apexcharts.js |\n| `color` | string | | v1.1.0 | Color of the serie. Supported formats: `yellow`, `#aabbcc`, `rgb(128, 128, 128)` or `var(--css-color-variable)` |\n| `opacity` | number | `0.7` for `area`\u003cbr/\u003eelse `1` | v1.6.0 | The opacity of the line or filled area, between `0` and `1` |\n| `stroke_width` | number | `5` | v1.6.0 | Change the width of the line. Only works for `area` and `line` |\n| `stroke_dash` | number | `0` | v2.1.0 | Creates a dashed line. The higher the number, the bigger the dash. |\n| `type` | string | `line` | v1.0.0 | `line`, `area` or `column` are supported for now |\n| `curve` | string | `smooth` | v1.0.0 | `smooth` (nice curve),  `straight` (direct line between points) or `stepline` (flat line until next point then straight up or down), `monotoneCubic` (create a monotone cubic spline) |\n| ~~`extend_to_end`~~ | ~~boolean~~ | ~~`true`~~ | ~~v1.0.0~~ | **DEPRECATED since v2.0.0** ~~If the last data is older than the end time displayed on the graph, setting to true will extend the value until the end of the timeline. Only works for `line` and `area` types.~~ |\n| `extend_to` | boolean or string | `end` | v2.0.0 | If value is `end`, it will extend the line/area to the end of the chart. With `now`, it will extend it to the current time (usefull for chart showing current and future data). If `false` it will not do anything. Only available for `line` and `area` types. |\n| `unit` | string | | v1.0.0 | Override the unit of the sensor |\n| `float_precision` | number | `1` | v1.2.0 | The precision used to display data in the legend and the tooltip. It doesn't impact how the data is displayed on the graph |\n| `fill_raw` | string | `'null'` | v1.5.0 | If there is any missing value in the history, `last` will replace them with the last non-empty state, `zero` will fill missing values with `0`, `'null'` will fill missing values with `null`. This is applied before `group_by` options |\n| `group_by` | object | | v1.0.0 | See [group_by](#group_by-options) |\n| `invert` | boolean | `false` | v1.2.0 | Negates the data (`1` -\u003e `-1`). Usefull to display opposites values like network in (standard)/out (inverted) |\n| `transform` | string | | v1.5.0 | Transform your raw data in any way you like. See [transform](#transform-option) |\n| `data_generator` | string | | v1.2.0 | See [data_generator](#data_generator-option) |\n| `statistics` | object | | v2.0.0 | Use HA statistical data (long-term). See [statistics](#statistics-options) |\n| `offset` | string | | v1.3.0 | This is different from the main `offset` parameter. This is at the series level. It is only usefull if you want to display data from for eg. yesterday on top of the data from today for the same sensor and compare the data. The time displayed in the tooltip will be wrong as will the x axis information. Valid values are any negative time string, eg: `-1h`, `-12min`, `-1d`, `-1h25`, `-10sec`, ... `month` (365.25 days / 12) and `year` (365.25 days) as unit will generate inconsistent result, you should use days instead. |\n| `time_delta` | string | | v2.0.0 | This applies a time delta to all the datapoints of your chart **after** fetching them. You can cumulate it with `offset`. Valid values are any time strings starting with `+` or `-`, eg: `-30min`, `+2h`, `-2d`, ... |\n| `min` | number | `0` | v1.4.0 | Only used when `chart_type = radialBar`, see [chart_type](#chart_type-options). Used to convert the value into a percentage. Minimum value of the sensor |\n| `max` | number | `100` | v1.4.0 | Only used when `chart_type = radialBar`, see [chart_type](#chart_type-options). Used to convert the value into a percentage. Maximum value of the sensor |\n| `color_threshold` | object | | v1.6.0 | See [experimental](#experimental-features) |\n| `yaxis_id` | string | | v1.9.0 | The identification name of the y-axis which this serie should be associated to. See [yaxis](#yaxis-options-multi-y-axis) |\n| `show` | object | | v1.3.0 | See [serie's show options](#series-show-options) |\n| `header_actions` | object | | v1.10.0 | See [header_actions](#header_actions-or-title_actions-options) |\n\n### series' `show` Options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `legend_value` | boolean | `true` | v1.3.0 | Show/Hide the state in the legend. Will still display the name |\n| `as_duration` | string | | v1.3.0 | Will pretty print the states as durations. Doesn't affect the graph, only the tooltip/legend/header display. You provide the source unit of your sensor. Valid values are `millisecond`, `second`, `minute`, `hour`, `day`, `week`, `month`, `year`.\u003cbr/\u003eEg: if the state is `345` and `as_duration` is set to `minute` then it would display `5h 45m` |\n| `in_header` | boolean or string | `true` | v1.4.0 | If `show_states` is enabled, this would show/hide this specific serie in the header. If set to `raw` (introduced in v1.7.0), it would display the latest raw state of the entity in the header bypassing any grouping/transformation done by the card. If the graph spans into the future (using `data_generator`): `before_now` would display the value just before the current time and `after_now` would display the value just after the current time (Introduced in v1.8.0) |\n| `name_in_header` | boolean | `true` | v1.8.0 | Only valid if `in_header: true`. If `false`, it will hide the name of the serie under the its state in the header |\n| `header_color_threshold` | boolean | `false` | v1.7.0 | If `true` and `color_threshold` experimental mode is enabled, it will colorize the header's state based on the threshold (ignoring opacity). |\n| `in_chart` | boolean | `true` | v1.4.0 | If `false`, hides the serie from the chart |\n| `datalabels` | boolean or string | `false` | v1.5.0 | If `true` will show the value of each point for this serie directly in the chart. Don't use it if you have a lot of points displayed, it will be a mess. If you set it to `total` (introduced in v1.7.0), it will display the stacked total value (only works when `stacked: true`). If you set it to `percent`, it will display the percentage of the serie instead of the value in the case of a `pie` or `donut` chart. |\n| `hidden_by_default` | boolean | `false` | v1.6.0 | See [experimental](#hidden_by_default-experimental-feature) |\n| `extremas` | boolean or string | `false` | v1.7.0 | If `true`, will show the min and the max of the serie in the chart.  If the value is `time`, it will display also the time of the min/max value on top of the value. From v2.0.0, `min` or `max` will display the min or the max only and `min+time` or `max+time` will display the time of the min or the max. Displaying the time doesn't work with `stacked: true`. |\n| `in_brush` | boolean | `false` | v1.8.0 | See [brush](#brush-experimental-feature) |\n| `offset_in_name` | boolean | `true` | v1.8.0 | If `true`, appends the offset information to the name of the serie. If `false`, it doesn't |\n\n### `header_actions` or `title_actions` options\n\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `tap_action` | object | | v1.10.0 | Action to perform on tap. See [action options](#_action-options) |\n| `hold_action` | object | | v1.10.0 | Action to perform on hold. See [action options](#_action-options) |\n| `double_tap_action` | object | | v1.10.0 | Action to perform on double tap. See [action options](#_action-options) |\n\n### `*_action` options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `action` | string | `more-info` | v1.10.0 | Action to perform. Valid values are: `more-info`, `toggle`, `call-service`, `none`, `navigate`, `url` |\n| `entity` | string | | v1.10.0 | Only valid for `more-info`. Overrides the `more-info` target entity. Default is to use the serie's entity |\n| `navigation_path` | string | | v1.10.0 | Path to navigate to (e.g. `/lovelace/0/`) when action is `navigate` |\n| `url_path` | string | | v1.10.0 | URL to open on click when action is `url`. The URL will open in a new tab |\n| `service` | string | | v1.10.0 | Any valid Home-Assistant service |\n| `service_data` | object | | v1.10.0 | Service data to include (e.g. `entity_id: media_player.bedroom`) when `action` defined as `call-service` |\n| `confirmation` | object | | v1.10.0 |Display a confirmation popup. See [confirmation](#confirmation-options) |\n\nExample:\n```yaml\ntype: custom:apexcharts-card\nseries:\n  - entity: sensor.indoor_temperature\n    header_actions:\n      tap_action:\n        action: call-service\n        service: climate.turn_on\n        service_data:\n          entity_id: climate.heater\n```\n\n### `confirmation` options\n\nThis will popup a dialog box before running the action.\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `text` | string | | v1.10.0 | This text will be displayed in the popup |\n| `exemptions` | array | | v1.10.0 | Any user declared in this list will not see the confirmation dialog. Format `user: USER_ID` |\n\nExample:\n\n```yaml\ntype: custom:apexcharts-card\nseries:\n  - entity: sensor.indoor_temperature\n    header_actions:\n      tap_action:\n        action: call-service\n        service: script.toggle_climate\n        service_data:\n          entity: climate.heater\n        confirmation:\n          text: Are you sure?\n          exemptions:\n            - user: befc8496799848bda1824f2a8111e30a\n```\n\n### `statistics` options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `type` | string | `mean` | v2.0.0 | Type of long term statistic to pull. Can be one of `min`, `max`, `mean`, `sum` `state` or `change` |\n| `period` | string | `hour` | v2.0.0 | Period of statistics to pull. Can be one of `5minute`, `hour`, `day`, `week` or `month` |\n| `align` | string | `middle` | v2.0.0 | Align the data points to the `start`, `end` or `middle` of the period of the statistics |\n\n### Main `show` Options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `loading` | boolean | `true` | v1.0.0 | Displays a spinning icon while the data is loading/updating |\n| `last_updated` | boolean | `false` | v1.10.0 | Show the last time the chart was updated on the bottom right |\n\n### `header` Options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `show` | boolean | `false` | v1.0.0 | Show or hide the header |\n| `title` | string | | v1.1.0 | The title of the chart you want to display |\n| `title_actions` | object | v2.0.0 | Actions to perform while tapping the title of the chart. See [title_actions](#header_actions-or-title_actions-options) |\n| `floating` | boolean | `false` | v1.0.0 | Makes the header float above the graph. Positionning will be supported later |\n| `show_states` | boolean | `false` | v1.1.0 | Show or hide the states in the header |\n| `colorize_states` | boolean | `false` | v1.1.0 | Colorize the states based on the color of the serie |\n| `standard_format` | boolean | `false` | v1.8.0 | Display the title using the standard Home-Assistant card format |\n| `disable_actions` | boolean | `false` | v1.10.0 | If `true`, disable all header actions |\n\n### `now` Options\n\nThe position of the marker will only update when the card updates (state change or `update_interval`).\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `show` | boolean | `false` | v1.5.0 | Shows a vertical marker for the current time on the graph. Only useful if displaying data from the future |\n| `color` | string | `var(--primary-color)` | v1.5.0 | Color of the marker. The color of the text is computed automatically. |\n| `label` | string | | v1.5.0 | Text to display on the label. No label if not defined |\n\n![now_marker](docs/now-marker.png)\n\n### `group_by` Options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `func` | string | `raw` | v1.0.0 | See [func](#func-options) |\n| `duration` | string | `1h` | v1.0.0 | If `func` is **not** `raw` only. It builds buckets of states over `duration` period of time. Doesn't work for months. Eg of valid values: `2h`, `1d`, `10s`, `25min`, `1h30`, ... |\n| `fill` | string | `last` | v1.0.0 | If `func` is **not** `raw` only. If there is any missing value in the buckets of history data (grouped by duration), `last` will replace them with the last non-empty state, `zero` will fill missing values with `0`, `'null'` will fill missing values with `null` |\n| `start_with_last` | boolean | `false` | v1.8.0 | If `true`, each bucket of data will start with the last value from the previous bucket of data. Mostly useful only with `func: diff` |\n\n### `func` Options\n\n| Name | Since | Description |\n| ---- | :---: | ----------- |\n| `raw` | v1.0.0 | Displays all the state history as known by Home Assistant |\n| `avg` | v1.0.0 | Will return the average of all the states in each bucket |\n| `min` | v1.0.0 | Will return the smallest state of each bucket |\n| `max` | v1.0.0 | Will return the biggest state of each bucket |\n| `last` | v1.0.0 | Will return the last state of each bucket |\n| `first` | v1.0.0 | Will return the first state of each bucket |\n| `sum` | v1.0.0 | Will return the sum of all the states in each bucket |\n| `median` | v1.0.0 | Will return the median of all the states in each bucket |\n| `delta` | v1.0.0 | Will return the delta between the biggest and smallest state in each bucket |\n| `diff` | v1.4.0 | Will return the difference between the last and the first entry in the bucket |\n\n### `chart_type` Options\n\n| Name | Since | Description |\n| ---- | :---: | ----------- |\n| `line` | v1.0.0 | This is the default and will show a timeline. It is compatible with `series.type` = `column`, `line` and `area` |\n| `scatter` | v1.4.0 | Displays a cloud of points without a line between the values |\n| `pie` | v1.4.0 | This will display a pie chart with the last value computed of each sensor |\n| `donut` | v1.4.0 | This will display a donut chart with the last value computed of each sensor, same as pie but with a hole in the center |\n| `radialBar` | v1.4.0 | This will display a radial bar chart with the last value computed of each sensor. The value is represented in percentage only. It is required to provide `min` and `max` for each series displayed as it requires to convert the value into percentage. The default value for `min` is `0` and for `max` it is `100`. This graph works well if you want to display sensors natively in percentages |\n\n![Charts Type](docs/charts_type.png)\n\n### `span` Options\n\n| Name | Since | Description |\n| ---- | :---: | ----------- |\n| `start` | v1.2.0 | Display the graph from the begining of the `minute`, `day`, `hour`, `week`, `month`, `year`, `isoWeek`. `isoWeek` is the start of the week according to ISO 8601 |\n| `end` | v1.2.0 | Display the graph from the end of the `minute`, `day`, `hour`, `week`, `month`, `year`, `isoWeek`. `isoWeek` is the end of the week according to ISO 8601 |\n| `offset` | v1.2.0 | Offset the graph by an amount of time. To offset in the past, start with `-`. Eg. of valid values: `-1day`, `-12h`, `12h`, `30min`, ... `month` (365.25 days / 12) and `year` (365.25 days) as unit will generate inconsistent result, you should use days instead. |\n\nSpan enables you to:\n* Offset the graph by an amount of time\n* `start`: Display the graph from the begining of the `minute`, `day`, `hour`, `week`, `month`, `year`. In this case, `graph_span` should be in most cases `\u003c=` to 1 unit of the unit defined in start.\n* `end`: Display the graph from the end of the `minute`, `day`, `hour`, `week`, `month`, `year`\n* Combined with `group_by` in a serie, the group will begin at the tick of the `start` unit (+/- `offset` if defined)\n* Only one of `start` or `end` is supported at the same time\n\n```yaml\ngraph_span: If start is defined, it should be \u003c= to 1 unit of the one defined in `start`\nspan:\n  start: minute, day, hour, week, month or year\n  end: minute, day, hour, week, month or year\n  offset: To offset in the past, prefix with `-` Timerange like 1day, 12h, 10min, -12h, -1d, ...\n```\n\nEg:\n* Display 24h from the start of the current day (00:00 -\u003e 23:59)\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 24h\n  span:\n    start: day\n  ```\n* Display 24h from the start of the previous day (00:00 -\u003e 23:59, -1 day)\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 24h\n  span:\n    start: day\n    offset: -1d\n  ```\n* Display 12h between 06:00 and 18:00 of the current day\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 12h\n  span:\n    start: day\n    offset: +6h\n  ```\n* Display the last 7 days, the end of the graph is the end of the current day\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 7d\n  span:\n    end: day\n  ```\n\n### `transform` Option\n\nWith transform, you can modify raw data comming from Home-Assistant's history using a javascript function.\n\nSome of the things you can do:\n* Transform any state into a number (for eg. for binary_sensors)\n* Apply a different scale to your data (eg: divide by 1024 to convert bits into Kbits)\n* Do anything that javascript allows with the value\n\nYour javascript code will receive:\n* `x`: a state or a value of the attribute if you defined one (it can be a `string`, `null` or a `number` depending on the entity type you've assigned)\n* `hass`: the full `hass` object (`hass.states['other.entity']` to get the state object of another entity for eg.)\n* `entity`: the full state object of the entity from the history entry currently being transformed\n\nAnd should return a `number`, a `float` or `null`.\n\nSome examples:\n* Convert `binary_sensor` to numbers (`1` is `on`, `0` is `off`)\n  ```yaml\n  type: custom:apexcharts-card\n  update_delay: 3s\n  update_interval: 1min\n  series:\n    - entity: binary_sensor.heating\n      transform: \"return x === 'on' ? 1 : 0;\"\n  ```\n\n* Scale a sensor:\n  ```yaml\n  type: custom:apexcharts-card\n  update_delay: 3s\n  update_interval: 1min\n  series:\n    - entity: sensor.bandwidth\n      transform: \"return x / 1024;\"\n  ```\n\n### `data_generator` Option\n\nBefore we start, to learn javascript, google is your friend or ask for help on the [forum](https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877) :slightly_smiling_face:\n\n`data_generator` is an advanced feature. It enables you to build your own data out of the last state of a sensor. It completely bypasses the history retrieval and caching mecanism.\n\nYou'll need to write a javascript function which returns a `[timestamp, value][]`:\n* `timestamp` is the timestamp of the data in ms\n* `value` is the value of the data as a number or a float, make sure you parse it if it's a string.\n\nInside your javascript code, you'll have access to those variables:\n* `entity`: the entity object\n* `start` (Date object): the start Date object of the graph currently displayed\n* `end` (Date object): the end Date object of the graph currently displayed\n* `hass`: the complete `hass` object\n* `moment`: the [Moment.JS](https://momentjs.com/) object to help you manipulate time and dates\n\nLet's take this example:\n* My sensor (`sensor.test`) has this state as its last state:\n  ```yaml\n  FirstPeak: High\n  PeakTimes:\n    - '2021-01-27 03:43:00'\n    - '2021-01-27 10:24:00'\n    - '2021-01-27 16:02:00'\n    - '2021-01-27 22:38:00'\n    - '2021-01-28 04:21:00'\n    - '2021-01-28 11:06:00'\n    - '2021-01-28 16:40:00'\n    - '2021-01-28 23:18:00'\n    - '2021-01-29 05:00:00'\n    - '2021-01-29 11:45:00'\n    - '2021-01-29 17:19:00'\n    - '2021-01-29 23:58:00'\n    - '2021-01-30 05:39:00'\n    - '2021-01-30 12:25:00'\n    - '2021-01-30 17:59:00'\n  PeakHeights:\n    - 4.99\n    - 1.41\n    - 4.96\n    - 1.33\n    - 5.22\n    - 1.19\n    - 5.15\n    - 1.14\n    - 5.42\n    - 1.01\n    - 5.3\n    - 0.99\n    - 5.57\n    - 0.87\n    - 5.39\n  unit_of_measurement: m\n  friendly_name: Tides\n  ```\n* This is data in the future, but I want to display them so I need to build them myself using `data_generator`:\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 4d # I have 4 days worth of data in the future in the attributes\n  span:\n    start: hour # I want to display from the start of the current hours 4 days into the future\n  series:\n    - entity: sensor.test\n      data_generator: | # This is what builds the data\n        return entity.attributes.PeakTimes.map((peak, index) =\u003e {\n          return [new Date(peak).getTime(), entity.attributes.PeakHeights[index]];\n        });\n  ```\n  The result of this function call would be something like: \u003cbr/\u003e\n  `[[1611718980000, 4.99], [1611743040000, 1.41], [1611763320000, 4.96], ...]`\n\n* And this is all you need :tada:\n\n### `yaxis` Options. Multi-Y axis\n\n:warning: If this option is used, you can't define `yaxis` in the main `apex_config` option as it will be overriden.\n\nYou can have as many y-axis as there are series defined in your configuration or less.\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n|`id` | string | | v1.9.0 | **Required** if you define multiple yaxis. The identification name of the yaxis used to map it to a serie. Needs to be unique. |\n| `show` | boolean | `true` | v1.9.0 | Whether to show or not the axis on the chart |\n| `opposite` | boolean | `false` | v1.9.0 | If `true`, the axis will be shown on the right side of the chart |\n| `min` | `auto`, number or string | `auto` | v1.9.0 | If undefined or `auto`, the `min` of the yaxis will be automatically calculated based on the min value of all the series associated to this axis. See [below](#minmax-format) for other formats. |\n| `max` | `auto`, number or string | `auto` | v1.9.0 | If undefined or `auto`, the `min` of the yaxis will be automatically calculated based on the max value of all the series associated to this axis. See [below](#minmax-format) for other formats. |\n| `decimals` | number | `1` | v1.10.0 | Number of decimals to show on this y-axis |\n| `apex_config` | object | | v1.9.0 | Any configuration from https://apexcharts.com/docs/options/yaxis/, except `min`, `max`, `show` and `opposite` |\n| `align_to` | number | | v1.10.0 | Aligns the yaxis extremas to the closest multiple of `align_to`. Only valid if `min` or `max` are not fixed values. |\n\n#### Min/Max Format\n\n`min` and `max` support multiple types of format:\n* not set or `auto` (this is the default): if it is set to `auto`, the min or max will be automatically calculated\n* any number: if a number is set, the min or max will be fixed on the y-axis\n* `~90`: if the format is `~` followed by a number, the min or max will be defined as a soft bounds\n  * `min: ~90` and the min of the data in the series is `120`: the y-axis min value will be `90`\n  * `min: ~90` and the min of the data in the series is `60`: the y-axis min value will be `60`\n* `'|+20|'` or `'|-20|'`: This will add/remove the value between `| |` from the min/max\n  * `min: '|-20|'`: The min of the data in the series is `32`, the y-axis min will be `12` (= `32 - 20`)\n  * `max: '|+10|'`: The max of the data in the series is `32`, the y-axis max will be `42` (= `32 + 10`)\n\n#### Examples\n\n* Simple example with one y-axis:\n\n  ```yaml\n  type: custom:apexcharts-card\n  header:\n    show: true\n    title: Max Soft Bounds + Min Fixed Bound\n  graph_span: 20min\n  series:\n    - entity: sensor.random0_100\n  yaxis: # only 1 yaxis, no need for id or yaxis_id\n    - min: 0\n      # if the sensor doesn't go above 50, the max of the axis will be 50\n      # else the max will be the maximum value of the sensor\n      max: ~50\n      decimals: 0\n      apex_config:\n        tickAmount: 4\n  ```\n\n* In this example, we have 2 sensors:\n  * `sensor.random0_100`: goes from `0` to `100`\n  * `sensor.random_0_1000`: goes from `0` to `1000`\n\n  The `min` and `max` of both y-axis are auto calculated based on the spread of the data associated with each axis.\n\n  ![multi_y_axis](docs/multi_y_axis.png)\n\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 20min\n  yaxis:\n    - id: first # identification name of the first y-axis\n      decimals: 0\n      apex_config:\n        tickAmount: 4\n    - id: second # identification name of the second y-axis\n      opposite: true # make it show on the right side\n      decimals: 0\n      apex_config:\n        tickAmount: 4\n  all_series_config:\n    stroke_width: 2\n  series:\n    - entity: sensor.random0_100\n      yaxis_id: first # this serie will be associated to the 'id: first' axis.\n    - entity: sensor.random_0_1000\n      yaxis_id: second # this serie will be associated to the 'id: second' axis.\n    - entity: sensor.random0_100\n      yaxis_id: first # this serie will be associated to the 'id: first' axis.\n      transform: 'return Number(x) + 30;' # We make it go fom 30 to 130\n    - entity: sensor.random0_100\n      yaxis_id: first # this serie will be associated to the 'id: first' axis.\n      transform: 'return Number(x) - 30;' # We make it go from -30 to 70\n  ```\n\n### Apex Charts Options Example\n\nThis is how you could change some options from ApexCharts as described on the [`Options (Reference)` menu entry](https://apexcharts.com/docs/installation/).\n\nHundreds of options are available and it is not possible to describe them all here so check over there and ask on the [forum](https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877) if you need help with using them.\n\n* :warning: Some options might not work in the context of this card.\n* :warning: Everything which is available through the default config of this card shouldn't be defined in `apex_config`. If you do, it might break.\n\n```yaml\ntype: custom:apexcharts-card\nseries:\n  - ...\napex_config:\n  dataLabels:\n    enabled: true\n    dropShadow:\n      enabled: true\n```\n\nSome options in ApexCharts can take a javascript function as an argument. To make this possible, you'll have to prefix your function with `EVAL:`.\n\n:warning: While using this `EVAL:` feature, there is no safeguard so use at your own risk.\n\nHere is an example:\n\n```yaml\napex_config:\n  yaxis:\n    labels:\n      formatter: |\n        EVAL:function(value) {\n          return \"42\";\n        }\n```\n\n### Layouts\n\nFor now, only `minimal` is supported: It will remove the grid, the axis and display the legend at the top. But you can use the `apex_config` to do whatever you want.\n\n* `minimal`\n\n  ![minimal](docs/minimal.png)\n\nFor code junkies, you'll find the default options I use in [`src/apex-layouts.ts`](src/apex-layouts.ts)\n\n### Configuration Templates\n\n#### General\n\n- Define your config template in the main lovelace configuration and then use it in your cards. This will avoid a lot of repetitions! It's basically YAML anchors, but without using YAML anchors and is very useful if you split your config in multiple files 😄\n- You can overload any parameter with a new one\n- Arrays will be merged by matching the index\n- You can also inherit another template from within a template.\n- You can inherit multiple templates at once by making it an array. In this case, the templates will be merged together with the current configuration in the order they are defined. This happens recursively.\n\n  ```yaml\n  type: custom:apexcharts-card\n  config_templates:\n    - template1\n    - template2\n  # or\n  type: custom:apexcharts-card\n  config_templates: template1\n  ```\n\nThe card templates will be applied in the order they are defined: `template2` will be merged with `template1` and then the local config will be merged with the result. You can still chain templates together (ie. define template in a apexcharts-card template. It will follow the path recursively).\n\nMake sure which type of lovelace dashboard you are using before changing the main lovelace configuration:\n  * **`managed`** changes are managed by lovelace UI - add the template configuration to configuration in raw editor\n      * go to your dashboard\n      * click three dots and `Edit dashboard` button\n      * click three dots again and click `Raw configuration editor` button\n  * **`yaml`** - add template configuration to your dashboard file (`ui-lovelace.yaml` for eg.)\n\n**Note:** Templates have to be defined in all dashboards, they are not shared.\n\nTo give you an idea where to put those (in your dashboard file/RAW editor):\n```yaml\napexcharts_card_templates:\n  default:\n    color_list: ['red', 'green', 'blue']\n\n  bandwidth_chart:\n    graph_span: 24h\n    config_templates: default\n    header:\n      show: true\n      show_states: true\n      colorize_states: true\n    all_series_config:\n      stroke_width: 2\n      opacity: 0.3\n      type: area\n\nviews:\n  - title: Main\n    panel: true\n    cards:\n      [...]\n```\n\nAnd then where you define your card, you can consume those templates, and/or overload it:\n\n```yaml\n- type: custom:apexcharts-card\n  config_templates: bandwidth_chart\n  header:\n    title: WAN Bandwidth\n  series:\n    - entity: sensor.wan_download\n    - entity: sensor.wan_upload\n      invert: true\n```\n\nIn the end, this would produce the same result as but it's shorter and you can reuse that template elsewhere:\n```yaml\n- type: custom:apexcharts-card\n  graph_span: 24h\n  header:\n    title: WAN Bandwidth\n    show: true\n    show_states: true\n    colorize_states: true\n  all_series_config:\n    stroke_width: 2\n    opacity: 0.3\n    type: area\n  color_list: ['red', 'green', 'blue']\n  series:\n    - entity: sensor.wan_download\n    - entity: sensor.wan_upload\n      invert: true\n```\n\n#### `all_series_config` options\n\nThis will allow you to apply some settings to all the series avoiding repetition. It's just syntaxic sugar and doesn't add more features.\n\nEg:\n```yaml\n- type: custom:apexcharts-card\n  graph_span: 24h\n  all_series_config:\n    stroke_width: 2\n    type: area\n    transform: return x / 1024;\n    unit: Mb/s\n  series:\n    - entity: sensor.wan_download\n    - entity: sensor.wan_upload\n      invert: true\n```\n\nGenerates the same result as repeating the configuration in each series:\n```yaml\n- type: custom:apexcharts-card\n  graph_span: 24h\n  series:\n    - entity: sensor.wan_download\n      stroke_width: 2\n      type: area\n      transform: return x / 1024;\n      unit: Mb/s\n    - entity: sensor.wan_upload\n      invert: true\n      stroke_width: 2\n      type: area\n      transform: return x / 1024;\n      unit: Mb/s\n```\n\n## Experimental features\n\n:warning: You enter the danger zone :warning:\n\n### Configuration options\n\n| Name | Type | Default | Since | Description |\n| ---- | :--: | :-----: | :---: | ----------- |\n| `color_threshold` | boolean | `false` | v1.6.0 | Will enable the color threshold feature. See [color_threshold](#color_threshold-experimental-feature) |\n| `disable_config_validation` | boolean | `false` | v1.6.0 | If `true`, will disable the config validation. Useful if you have cards adding parameters to this one. Use at your own risk. |\n| `hidden_by_default` | boolean | `false` | v1.6.0 | Will allow you to use the `hidden_by_default` option. See [hidden_by_default](#hidden_by_default-experimental-feature) |\n| `brush` | boolean | `false` | v1.8.0 | Will display a brush which allows you to select a portion time to display on the main chart. See [brush](#brush-experimental-feature) |\n\n### `color_threshold` experimental feature\n\n`color_threshold` is an experimental feature for now since enabling it will break some other default features.\n\nIf enabled, it might:\n* display the wrong serie color in the tooltip in some cases (series with datapoints not aligned mostly)\n* display thin columns instead of the standard size\n* completely render `apex_config.fill` options unusable, and if you do, it will break the card\n\nNow that you are warned, it works with:\n* `chart_type`: `radialBar`, `line`, `pie`, `donut`\n* `series`'s `type`: `column`, `area`, `line`\n\nSome notes:\n* For `series`'s `type: column`, the full bar will be of the color defined. Gradient is not possible\n* For `series`'s `type: area`:\n  * only the filled area will be displayed with the gradient. It is not possible to do so for the line.\n  * It works better with `stroke_width: 1` or `stroke_width: 0`\n* If using `invert: true`, the values in `color_threshold` should stay the same as with `invert: false`.\n\n\nAnd this is how to use it:\n```yaml\ntype: custom:apexcharts-card\nexperimental:\n  color_threshold: true\nseries:\n  - entity: sensor.temperature\n    color_threshold:\n      - value: -10\n        # color can be a color name, rgb(r, g, b), '#0000ff' or var(--color-variable)\n        # default is: the default color of the serie\n        color: blue\n        # optional opacity, value from 0 to 1.\n        # only for line and area\n        # Default is 1 for 'type: line' and 0.7 for `type: area`\n        opacity: 1\n      - value: 0\n        color: cyan\n      - value: 15\n        color: green\n      - value: 25\n        color: orange\n```\n\n![color_threshold](docs/color_threshold.png)\n\n### `hidden_by_default` experimental feature\n\nEnabling this experimental feature might/will break the auto-scaling and auto-column width feature. Don't open an issue for that. It only works if all the series have a unique name.\n\nThis option is useful if you want to hide a serie from the chart by default when it's loaded as if you had clicked on the legend to disable this serie.\n\nThis is how to use it:\n```yaml\ntype: custom:apexcharts-card\nexperimental:\n  hidden_by_default: true\nseries:\n  - entity: sensor.temperature\n    show:\n      hidden_by_default: true\n  - entity: sensor.temperature_office\n```\n\n### `brush` experimental feature\n\n`brush` will allow you to display a small chart on the bottom of the card to select a time frame to display on the main chart.\n\n![brush_image](docs/brush.png)\n\nThings to know:\n* You might have some glitches if you are using colums in either the top or the bottom of the chart. There's nothing I can do about it.\n* All the features from normal series can be applied to the brush series\n* You can configure the bottom chart the way you want with another specific `apex_config` also\n* It might be compute heavy and slow with a lot of history data points\n* It is recommended to not show too much data on the bottom chart for the sake of lisibility\n\nHere is how to use it (this represents the chart above):\n```yaml\ntype: custom:apexcharts-card\nexperimental:\n  color_threshold: true\n  brush: true # This is required\ngraph_span: 2h # This will represent the span of the brush\nbrush:\n  # selection_span: optional\n  # defines the default selected span in the brush\n  # Defaults to 1/4 of the `graph_span`\n  selection_span: 10m\n  # apex_config: optional\n  apex_config:\n    # Any ApexCharts settings you want to apply to the brush\n    # Same as the standard apex_config\nseries:\n  - entity: sensor.random0_100\n    color: blue\n    type: area\n    stroke_width: 1\n    color_threshold:\n      - value: 0\n        color: red\n      - value: 50\n        color: yellow\n      - value: 100\n        color: green\n  - entity: sensor.random0_100\n    color: blue\n    stroke_width: 1\n    float_precision: 0\n    show:\n      # in_brush: set it to true and the serie will show up in the brush\n      in_brush: true\n      # add this also if you want your serie to only show up in the brush\n      in_chart: false\n```\n\n## Known issues\n\n* Sometimes, if `smoothing` is used alongside `area` and there is missing data in the chart, the background will be glitchy. See [apexcharts.js/#2180](https://github.com/apexcharts/apexcharts.js/issues/2180)\n* `binary_sensor` is not yet supported.\n* Bars will span left and right of the data point. Not so great if you use `func` to aggregate your data. See [apexcharts.js/#1688](https://github.com/apexcharts/apexcharts.js/issues/1688)\n\n## Roadmap\n\nNot ordered by priority:\n\n* [X] ~~Support more types of charts (pie, radial, polar area at least)~~\n* [X] ~~Support for `binary_sensors`~~\n* [X] ~~Support for aggregating data with exact boundaries (ex: aggregating data with `1h` could aggregate from `2:00:00am` to `2:59:59am` then `3:00:00am` to `3:59:59` exactly, etc...)~~\n* [X] ~~Display the graph from start of day, week, month, ... with support for \"up to now\" or until the \"end of the period\"~~\n* [ ] Support for any number of Y-axis\n* [ ] Support for logarithmic\n* [X] ~~Support for state mapping for non-numerical state sensors~~\n* [X] ~~Support for simple color threshold (easier to understand/write than the ones provided natively by ApexCharts)~~\n* [X] ~~Support for graph configuration templates à la [`button-card`](https://github.com/custom-cards/button-card/blob/master/README.md#configuration-templates)~~\n\n## Examples\n\n### Simple graph\n\n```yaml\ntype: custom:apexcharts-card\nseries:\n  - entity: sensor.temperature\n```\n\n### Multiple Types of Graphs\n\n![multi-graph](docs/multi-graph.png)\n\n```yaml\ntype: custom:apexcharts-card\ngraph_span: 6h\nheader:\n  show: false\nseries:\n  - entity: sensor.humidity\n    type: line\n    name: Outside Humidity\n    group_by:\n      func: avg\n      duration: 30min\n  - entity: sensor.random0_100\n    type: column\n    name: Office Humidity\n    group_by:\n      func: avg\n      duration: 30min\n```\n\n### Aggregating data\n\n![aggregating_data](docs/aggregate_func.png)\n\n```yaml\ntype: custom:apexcharts-card\ngraph_span: 1h\nheader:\n  show: false\nseries:\n  - entity: sensor.random0_100\n    name: AVG\n    curve: smooth\n    type: line\n    group_by:\n      duration: 10min\n      func: avg\n  - entity: sensor.random0_100\n    curve: smooth\n    name: MIN\n    type: line\n    group_by:\n      duration: 10min\n      func: min\n  - entity: sensor.random0_100\n    curve: smooth\n    name: MAX\n    type: line\n    group_by:\n      duration: 10min\n      func: max\n  - entity: sensor.random0_100\n    curve: smooth\n    name: LAST\n    type: line\n    group_by:\n      duration: 10min\n      func: last\n  - entity: sensor.random0_100\n    curve: smooth\n    name: FIRST\n    type: line\n    group_by:\n      duration: 10min\n      func: first\n```\n\n### Compare data from today with yesterday\n\n```yaml\ntype: custom:apexcharts-card\ngraph_span: 1d\nspan:\n  start: day\nheader:\n  show: false\nseries:\n  # data from today\n  - entity: sensor.temperature\n  # data from yesterday offsetted to be displayed today\n  - entity: sensor.temperature\n    offset: -1d\n```\n\n### Change the line thickness\n\n* Change all lines thickness\n\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 1d\n  all_series_config:\n    stroke_width: 2\n  series:\n    - entity: sensor.temperature\n    - entity: sensor.humidity\n  ```\n\n* Selective line thickness modification\n\n  ```yaml\n  type: custom:apexcharts-card\n  graph_span: 1d\n  series:\n    - entity: sensor.temperature\n      stroke_width: 2\n    - entity: sensor.humidity\n      stroke_width: 6\n  ```\n\n### Use apexcharts-card with auto-entities\n\nThis requires the [auto-entities card](https://github.com/thomasloven/lovelace-auto-entities)\n\n```yaml\ntype: custom:auto-entities\nfilter:\n  include:\n    - entity_id: sensor.temperature*\n      options:\n        entity: this.entity_id\ncard:\n  type: custom:apexcharts-card\n```\n\n### Change the height of the graph\n\nThis is described in the ApexCharts.js documentation [here](https://apexcharts.com/docs/options/chart/height/) where you can find way more options.\n\n```yaml\ntype: custom:apexchart-card\napex_config:\n  chart:\n    height: 250px\nseries:\n  - entity: sensor.temperature\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRomRider%2Fapexcharts-card","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRomRider%2Fapexcharts-card","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRomRider%2Fapexcharts-card/lists"}