Refactor
This commit is contained in:
@@ -6,7 +6,7 @@ import { Bar } from 'vue-chartjs'
|
||||
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
|
||||
|
||||
const props = defineProps<{
|
||||
data: Array<Array<{champion: Champion, lane: LaneData}>>
|
||||
data: Array<{title:string, data: Array<{lane: LaneData, champion: Champion}>}>
|
||||
}>()
|
||||
|
||||
const labels: Array<string> = []
|
||||
@@ -19,7 +19,7 @@ const datasets = []
|
||||
let count = 0
|
||||
let colorIndex = 0
|
||||
for(let tier of props.data) {
|
||||
for(let {champion: champion, lane: lane} of tier) {
|
||||
for(let {champion: champion, lane: lane} of tier.data) {
|
||||
if(count > 35) break;
|
||||
|
||||
labels.push(champion.name)
|
||||
|
||||
Reference in New Issue
Block a user