How to use the vue-chartjs.Pie.extend function in vue-chartjs

To help you get started, we’ve selected a few vue-chartjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JerryC8080 / Memeye / client / src / components / charts / V8HeapSpacePie.js View on Github external
'#5C6BC0',
                    '#FFCA28',
                    '#8D6E63',
                ],
                hoverBackgroundColor: [
                    '#7CB342',
                    '#1E88E5',
                    '#3949AB',
                    '#FFB300',
                    '#6D4C41',
                ]
            }]
    };
}

let pie = Pie.extend({
    mixins: [reactiveProp],
    props: ['options'],
    mounted() {
        this.renderChart(this.chartData, {
            title: {
                display: true,
                text: 'V8 Heap Sapce',
            },
            tooltips: {
                callbacks: {
                    label: (item, data) => {
                        let val = data.datasets[item.datasetIndex].data[item.index];
                        return Math.floor(val / 1024 * 100) / 100 + ' KB';
                    }
                }
            },
github JerryC8080 / Memeye / client / src / components / charts / OSMemoryPie.js View on Github external
datasets: [
            {
                data: [freeMem, usedMem],
                backgroundColor: [
                    "#36A2EB",
                    "#FF6384",
                ],
                hoverBackgroundColor: [
                    "#36A2EB",
                    "#FF6384",
                ]
            }]
    };
}

let pie = Pie.extend({
    mixins: [reactiveProp],
    props: ['options'],
    mounted() {
        this.renderChart(this.chartData, {
            title: {
                display: true,
                text: 'OS Memory Stat',
            },
            tooltips: {
                callbacks: {
                    label: (item, data) => {
                        let val = data.datasets[item.datasetIndex].data[item.index];
                        return Math.floor(val / 1024 / 1024 * 100) / 100 + ' MB';
                    }
                }
            },