You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -142,6 +143,7 @@ The card stricly validates all the options available (but not for the `apex_conf
142
143
| `apex_config`| object | | v1.0.0 | Apexcharts API 1:1 mapping. You call see all the options [here](https://apexcharts.com/docs/installation/) --> `Options (Reference)` in the Menu. See [Apex Charts](#apex-charts-options-example) |
| `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. |
@@ -182,6 +184,7 @@ The card stricly validates all the options available (but not for the `apex_conf
182
184
| `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`) |
| `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. This feature doesn't work with `stacked: true`. |
@@ -580,6 +583,7 @@ Generates the same result as repeating the configuration in each series:
580
583
| `color_threshold` | boolean | `false` | v1.6.0 | Will enable the color threshold feature. See [color_threshold](#color_threshold-experimental-feature) |
581
584
| `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. |
582
585
| `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) |
586
+
| `brush` | boolean | `false` | NEXT_VERSION | Will display a brush which allows you to select a portion time to display on the main chart. See [brush](#brush-experimental-feature) |
583
587
584
588
### `color_threshold` experimental feature
585
589
@@ -646,6 +650,58 @@ series:
646
650
- entity: sensor.temperature_office
647
651
```
648
652
653
+
### `brush` experimental feature
654
+
655
+
`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.
656
+
657
+

658
+
659
+
Things to know:
660
+
* 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.
661
+
* All the features from normal series can be applied to the brush series
662
+
* You can configure the bottom chart the way you want with another specific `apex_config` also
663
+
* It might be compute heavy and slow with a lot of history data points
664
+
* It is recommended to not show too much data on the bottom chart for the sake of lisibility
665
+
666
+
Here is how to use it (this represents the chart above):
667
+
```yaml
668
+
type: custom:apexcharts-card
669
+
experimental:
670
+
color_threshold: true
671
+
brush: true # This is required
672
+
graph_span: 2h # This will represent the span of the brush
673
+
brush:
674
+
# selection_span: optional
675
+
# defines the default selected span in the brush
676
+
# Defaults to 1/4 of the `graph_span`
677
+
selection_span: 10m
678
+
# apex_config: optional
679
+
apex_config:
680
+
# Any ApexCharts settings you want to apply to the brush
681
+
# Same as the standard apex_config
682
+
series:
683
+
- entity: sensor.random0_100
684
+
color: blue
685
+
type: area
686
+
stroke_width: 1
687
+
color_threshold:
688
+
- value: 0
689
+
color: red
690
+
- value: 50
691
+
color: yellow
692
+
- value: 100
693
+
color: green
694
+
- entity: sensor.random0_100
695
+
color: blue
696
+
stroke_width: 1
697
+
float_precision: 0
698
+
show:
699
+
# in_brush: set it to true and the serie will show up in the brush
700
+
in_brush: true
701
+
# add this also if you want your serie to only show up in the brush
702
+
in_chart: false
703
+
```
704
+
649
705
## Known issues
650
706
651
707
* 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)
0 commit comments