# Comment agrandir une carte Apexchart

**URL:** <https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899>\
**Category:** Entraide Home Assistant\
**Tags:** interface-lovelace, card\
**Created:** [Janvier 24, 2025, 9:40 UTC](https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899 "2025-01-24T09:40:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![napoleon1790](https://forum.hacf.fr/user_avatar/forum.hacf.fr/napoleon1790/32/93969_2.png) [@napoleon1790](https://forum.hacf.fr/u/napoleon1790)\
**Post date:** [Janvier 24, 2025, 9:20 UTC](https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899/1 "2025-01-24T09:20:05Z")

</div>

bonjour,  
pour agrandir une carte apexchart, il faut recuperer card-mod d apres ce que j’ai compris.  
apres, la procedure serait comment… avec une carte format donut existante ?

---

<div class="post-metadata">

**Author:** ![WarC0zes](https://forum.hacf.fr/user_avatar/forum.hacf.fr/warc0zes/32/137471_2.png) [@WarC0zes](https://forum.hacf.fr/u/WarC0zes)\
**Post date:** [Janvier 24, 2025, 9:29 UTC](https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899/2 "2025-01-24T09:29:47Z")

</div>

Salut,  
Pour la hauteur et largeur, pas besoin de card\_mod. Utilise ce code

```auto
apex_config:
  chart:
    height: 220px
    width: 200px

```

edit:  
je me trompe, c’est pour le graphique. Pour la carte complète c’est:

```yaml
card_mod:
  style: |
    ha-card {
      height: 50px !important;
      width: 150px !important;
    }

```

que tu ajoute au code de apex-chart.

---

<div class="post-metadata">

**Author:** ![napoleon1790](https://forum.hacf.fr/user_avatar/forum.hacf.fr/napoleon1790/32/93969_2.png) [@napoleon1790](https://forum.hacf.fr/u/napoleon1790)\
**Post date:** [Janvier 24, 2025, 9:36 UTC](https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899/3 "2025-01-24T09:36:12Z")

</div>

merci

je copie mon code, ou je rajouterais ce texte ? je suis completement novice.

```yaml
type: custom:apexcharts-card
chart_type: donut
header:
  show: true
  title: Répartition énergétique journalière
  show_states: true
  colorize_states: true
apex_config:
  dataLabels:
    formatter: |
      EVAL:function(value) {
        return value.toFixed(0) + " %";
      }
  plotOptions:
    pie:
      donut:
        labels:
          show: true
          total:
            show: true
            label: Total
            formatter: |
              EVAL:function(w) {
                return w.globals.seriesTotals.reduce((a, b) => {return (a + b)} , 0).toFixed(1) + " kWh"
                }
series:
  - entity: sensor.consommation_ballon_thermodynamique_journaliere
    name: ballon thermodynamique
    float_precision: 1
    color: "#2ECC71"
  - entity: sensor.consommation_clim_chauffage_bureau_journaliere
    name: clim-chauffage bureau
    float_precision: 1
    color: "#3498DB"
  - entity: sensor.consommation_d_energie_electrique_journaliere_pc_bureau
    name: pc bureau
    float_precision: 1
    color: "#8E44AD"
  - entity: sensor.consommation_d_energie_journaliere_refrigerateur
    name: réfrigérateur
    float_precision: 1
    color: "#E74C3C"
  - entity: sensor.consommation_electrique_non_mesurer_du_jour
    name: consommation non suivie
    float_precision: 1
    color: "#bdb998"

```

---

<div class="post-metadata">

**Author:** ![WarC0zes](https://forum.hacf.fr/user_avatar/forum.hacf.fr/warc0zes/32/137471_2.png) [@WarC0zes](https://forum.hacf.fr/u/WarC0zes)\
**Post date:** [Janvier 24, 2025, 9:40 UTC](https://forum.hacf.fr/t/comment-agrandir-une-carte-apexchart/57899/4 "2025-01-24T09:40:07Z")

</div>

> [@WarC0zes](#):
>
> ```auto
> card_mod:
> style: |
> ha-card {
> height: 50px !important;
> width: 150px !important;
> }
> 
> ```

tu ajoutes ce code à la fin du tien. En modifiant la hauteur et largeur que tu veux.
