チャート取得APIを誰でも利用できるようにするなど
This commit is contained in:
parent
c1b47a2119
commit
b21287262e
3 changed files with 8 additions and 14 deletions
|
|
@ -44,13 +44,9 @@ export default Vue.extend({
|
|||
components: {
|
||||
XChart
|
||||
},
|
||||
props: {
|
||||
chart: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
chartType: 'local-notes',
|
||||
span: 'hour'
|
||||
};
|
||||
|
|
@ -85,6 +81,11 @@ export default Vue.extend({
|
|||
);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
(this as any).api('chart').then(chart => {
|
||||
this.chart = chart;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
notesChart(local: boolean): any {
|
||||
const data = this.stats.slice().reverse().map(x => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue