Skip to content

Commit

Permalink
Improve Chart
Browse files Browse the repository at this point in the history
* remove 'OTHER' category
* show percentage instead of number of tweets
  • Loading branch information
Liu233w committed May 22, 2021
1 parent 7c741f9 commit 37dc94a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flaskapp/frontend/src/components/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {
tooltip: {
trigger: 'item',
formatter: (data) => {
return data.name + ': ' + data.value.value
return data.name + ': ' + data.percent + '%'
}
},
// legend: {
Expand Down Expand Up @@ -104,6 +104,9 @@ export default {
const res = []
for (const category in suburb) {
if (category === 'OTHER') {
continue
}
const value = suburb[category]
res.push({value, name: category})
}
Expand Down

0 comments on commit 37dc94a

Please sign in to comment.