Я хочу составить график 3 лучших каналов недели.
У меня был список вроде
list= [
//mon
[{"channel_name":"NY","channel_number":1,"VALUE":39,"num":1},{"channel_name":"PA","channel_number":10,"VALUE":39,"num":2},{"channel_name":"PA","channel_number":2,"VALUE":32,"num":3}],
//tue
[{"channel_name":"NY","channel_number":10,"VALUE":39,"num":1},{"channel_name":"NY","channel_number":1,"VALUE":36,"num":2},{"channel_name":"NC","channel_number":15,"VALUE":30,"num":3}],
//wen
[{"channel_name":"NC","channel_number":1,"VALUE":43,"num":1},{"channel_name":"NY","channel_number":10,"VALUE":35,"num":2},{"channel_name":"NY","channel_number":2,"VALUE":27,"num":3}],
//thu
[{"channel_name":"LA","channel_number":11,"VALUE":44,"num":1},{"channel_name":"NY","channel_number":10,"VALUE":34,"num":2},{"channel_name":"NY","channel_number":7,"VALUE":27,"num":3}],
//fri
[{"channel_name":"NY","channel_number":10,"VALUE":36,"num":1},{"channel_name":"FL","channel_number":1,"VALUE":29,"num":2},{"channel_name":"FL","channel_number":2,"VALUE":28,"num":3}],
//sat
[{"channel_name":"LA","channel_number":11,"VALUE":39,"num":1},{"channel_name":"NY","channel_number":10,"VALUE":32,"num":2},{"channel_name":"NY","channel_number":1,"VALUE":28,"num":3}],
//sun
[{"channel_name":"SC","channel_number":1,"VALUE":30,"num":1},{"channel_name":"NY","channel_number":10,"VALUE":27,"num":2},{"channel_name":"NY","channel_number":15,"VALUE":22,"num":3}]]
Значение будет использоваться для оси Y, num означает ранжирование по значению.
Я хочу показать такую столбчатую диаграмму в React.
Это то, что большинство диаграмм используют для применения значений.
['Year', 'Sales', 'Expenses', 'Profit'],
['2014', 1000, 400, 200],
['2015', 1170, 460, 250],
['2016', 660, 1120, 300],
['2017', 1030, 540, 350]
Но здесь возникла проблема.
Значения в моем списке сложно обозначить указанным выше способом.
Потому что в моем списке channel_name и channel_number каждый день разные. Это не фиксировано, как Net Profit, Revenue, FreeCashflow на изображении выше.
Как мне пометить каждое различное значение на диаграмме ??
Доступен ли какой-либо полезный модуль или есть хороший способ?