Change chart usage
This commit is contained in:
@@ -52,11 +52,13 @@
|
||||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
||||
import { StatResult } from '@/apiary/apiary';
|
||||
import axios from 'axios';
|
||||
import Chart from 'chart.js/auto';
|
||||
import { Chart, ArcElement, Legend, DoughnutController, Title } from 'chart.js';
|
||||
import randomColor from 'randomcolor';
|
||||
|
||||
export type StatType = 'username' | 'password' | 'ip' | 'country' | 'total';
|
||||
|
||||
Chart.register(ArcElement, Legend, DoughnutController, Title);
|
||||
|
||||
@Component
|
||||
export default class StatsPie extends Vue {
|
||||
@Prop() private statType!: StatType;
|
||||
@@ -161,7 +163,6 @@ export default class StatsPie extends Vue {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: headers,
|
||||
options: {},
|
||||
datasets: [
|
||||
{
|
||||
data: values,
|
||||
|
Reference in New Issue
Block a user