fixing dashboard chart
This commit is contained in:
parent
265372ee4c
commit
e8716fc096
@ -67,19 +67,10 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal
|
|||||||
|
|
||||||
<GraphCard title='Indicador de Custo' subtitle='Valores em R$/ MWh'>
|
<GraphCard title='Indicador de Custo' subtitle='Valores em R$/ MWh'>
|
||||||
<Chart title='' subtitle=''
|
<Chart title='' subtitle=''
|
||||||
data1={costIndicator.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
data1={costIndicator.filter((value, index) => value.mes.slice(4, 8).includes('2021'))}
|
||||||
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
// data1={graphData}
|
||||||
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
data2={costIndicator.filter((value, index) => value.mes.slice(4, 8).includes('2022'))}
|
||||||
|
label={costIndicator.map(value => value.mes.slice(0, 3))} barLabel />
|
||||||
return 0
|
|
||||||
})}
|
|
||||||
data2={costIndicator.filter((value, index) => value.mes.slice(3, 7).includes('2022'))}
|
|
||||||
label={costIndicator.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
|
||||||
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
|
||||||
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}).map(value => value.mes)} barLabel />
|
|
||||||
</GraphCard>
|
</GraphCard>
|
||||||
</section>
|
</section>
|
||||||
</DashboardView>
|
</DashboardView>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user