Created
June 11, 2019 09:05
-
-
Save plutov/c58bec4260aead47830a0588d4082556 to your computer and use it in GitHub Desktop.
wails-6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<apexchart type="radialBar" :options="options" :series="series"></apexchart> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
series: [0], | |
options: { | |
labels: ['CPU Usage'] | |
} | |
}; | |
}, | |
mounted: function() { | |
wails.events.on("cpu_usage", cpu_usage => { | |
if (cpu_usage) { | |
this.series = [ cpu_usage.avg ]; | |
} | |
}); | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment