---
title: Energieverbrauch
---

> [!abstract]- Übersicht Energiewerte
> ```dataview
> TABLE heizung, warmwasser
> FROM "Journal"
> WHERE warmwasser
> SORT file.name
> ```


```dataviewjs
const pages = dv.pages('"Journal"').where(p => p.warmwasser).sort(p => p.file.name)
const labels = pages.map(p => p.file.name).values
const heizung = pages.map(p => p.heizung).values
const warmwasser = pages.map(p => p.warmwasser).values
const chartData = {
    type: 'line', 
    data: {
        labels: labels,
        datasets: [
            {
                label: 'Heizung',
                data: heizung,
                backgroundColor: [
                    'rgba(255, 99, 132, 0.2)'
                ],
                borderColor: [
                    'rgba(255, 99, 132, 1)'
                ],
                borderWidth: 1
             },
             {
                label: 'Warmwasser',
                data: warmwasser,
                backgroundColor: [
                    'rgba(132, 99, 255, 0.2)'
                ],
                borderColor: [
                    'rgba(132, 99, 552, 1)'
                ],
                borderWidth: 1
             }
        ]
    },
    width: '80%',
}
window.renderChart(chartData, this.container);
```
