summaryrefslogtreecommitdiff
path: root/app/bits/static/graph.js
blob: 0503b996bf83a4c65839350c5df624cb05aeca73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const ctx = document.getElementById('graph-display').getContext('2d');
const graph = new Chart(ctx, {
    type: 'line',
    data: {
        labels: [],
        datasets: [{
            label: 'Balance',
            data: [],
            borderColor: 'rgba(153, 102, 255, 1)',
            fill: false,
        },
            {
                label: 'Trendline',
                data: [],
                borderColor: 'rgba(153, 102, 255, .5)',
                borderDash: [5],
                pointRadius: 0,
                fill: false,
            }]
    },
    options: {
        scales: {
            y: {
                beginAtZero: true
            }
        },
        scaleLabel: "<%=value%>%",
        plugins: {
            legend: {
                display: false
            }
        }
    }
});