Skip to content

Instantly share code, notes, and snippets.

@plutov
Created June 11, 2019 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plutov/c58bec4260aead47830a0588d4082556 to your computer and use it in GitHub Desktop.
Save plutov/c58bec4260aead47830a0588d4082556 to your computer and use it in GitHub Desktop.
wails-6
<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