fixing indicator chart
This commit is contained in:
parent
97dd4d51a5
commit
265372ee4c
@ -34,19 +34,10 @@ export default function CostIndicator({graphData, userName}: any) {
|
|||||||
<PageTitle title='Indicador de Custo' subtitle='Indicador de Custo - Valores em R$/MWh'/>
|
<PageTitle title='Indicador de Custo' subtitle='Indicador de Custo - Valores em R$/MWh'/>
|
||||||
<section>
|
<section>
|
||||||
<Chart title='' subtitle=''
|
<Chart title='' subtitle=''
|
||||||
data1={graphData.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
data1={graphData.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={graphData.filter((value, index) => value.mes.slice(4, 8).includes('2022'))}
|
||||||
|
label={graphData.map(value => value.mes.slice(0, 3))} barLabel />
|
||||||
return 0
|
|
||||||
})}
|
|
||||||
data2={graphData.filter((value, index) => value.mes.slice(3, 7).includes('2022'))}
|
|
||||||
label={graphData.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 />
|
|
||||||
</section>
|
</section>
|
||||||
</CostIndicatorView>
|
</CostIndicatorView>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user