fixing more changes
This commit is contained in:
parent
fea40d3c4e
commit
cecfd26402
@ -89,19 +89,19 @@ export default function Chart({ title, data1, data2, label, subtitle, dataset1,
|
||||
datasets: [
|
||||
{
|
||||
label: dataset1? dataset1 : '2021',
|
||||
data: data1.map(value => value.custo_unit),
|
||||
backgroundColor: '#C2d5fb'
|
||||
// backgroundColor: (value, ctx) => {
|
||||
// return data1[value.dataIndex]?.dad_estimado == false ? '#255488' : draw('diagonal-right-left', '#C2d5fb');
|
||||
// },
|
||||
data: data1.map(value => value.custo_unit>0? value.custo_unit : ''),
|
||||
// backgroundColor: '#255488'
|
||||
backgroundColor: (value, ctx) => {
|
||||
return data1[value.dataIndex]?.dad_estimado == false ? '#255488' : draw('diagonal-right-left', '#C2d5fb');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: dataset2? dataset2 : '2022',
|
||||
data: data2.map(value => value.custo_unit),
|
||||
backgroundColor: '#C2d5fb'
|
||||
// backgroundColor: (value, ctx) => {
|
||||
// return data2[value.dataIndex]?.dad_estimado == false ? '#255488' : draw('diagonal-right-left', '#C2d5fb');
|
||||
// },
|
||||
data: data2.map(value => value.custo_unit>0? value.custo_unit : null),
|
||||
// backgroundColor: '#C2d5fb'
|
||||
backgroundColor: (value, ctx) => {
|
||||
return data2[value.dataIndex]?.dad_estimado == false ? '#C2d5fb' : draw('diagonal-right-left', '#C2d5fb');
|
||||
},
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ export function LineBarChart2({ title, subtitle, data1, data2, data3, label, red
|
||||
},
|
||||
{
|
||||
type: 'bar' as const,
|
||||
label: dataset3? dataset3 : 'Dataset 2',
|
||||
label: dataset3? dataset3 : 'Dataset 3',
|
||||
// backgroundColor: '#255488',
|
||||
backgroundColor: (value, ctx) => {
|
||||
return hashurado? data1[value.dataIndex]?.dad_estimado == false? '#255488' : pattern.draw('diagonal', '#255488') : '#255488'
|
||||
@ -163,7 +163,7 @@ export function LineBarChart2({ title, subtitle, data1, data2, data3, label, red
|
||||
{
|
||||
type: 'line',
|
||||
label: 'Estimado',
|
||||
backgroundColor: pattern.draw('diagonal-right-left', '#C2d5fb'),
|
||||
backgroundColor: '#C2d5fb',
|
||||
data: [],
|
||||
}
|
||||
],
|
||||
|
||||
@ -8,7 +8,7 @@ export const ChartCardView = styled.article`
|
||||
flex-direction: column;
|
||||
|
||||
width: 100%;
|
||||
height: fit-content;
|
||||
max-height: 2rem;
|
||||
|
||||
background: #F8F8F8;
|
||||
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
|
||||
@ -24,7 +24,7 @@ export const ChartCardView = styled.article`
|
||||
|
||||
background-color: black;
|
||||
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@ -78,8 +78,9 @@ export default function index({userName, initialText}: any) {
|
||||
Não cadastrado!
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
<Header name={userName} admin/>
|
||||
<PageTitle title='Sobre nós' subtitle='Alterar texto de sobre nós'/>
|
||||
<Header name={userName} admin>
|
||||
<PageTitle title='Sobre nós' subtitle='Alterar texto de sobre nós'/>
|
||||
</Header>
|
||||
<div style={{width: '100%', display: 'flex', justifyContent: 'flex-start', alignItems: 'flex-start', marginTop: '30px', marginBottom: '10px'}}>
|
||||
<BasicButton title='Salvar Texto' onClick={() => handleRegisterAboutUs()}/>
|
||||
</div>
|
||||
@ -88,7 +89,7 @@ export default function index({userName, initialText}: any) {
|
||||
<Editor
|
||||
onInit={(evt, editor) => editorRef.current = editor}
|
||||
onEditorChange={(newText) => setText(newText)}
|
||||
initialValue={initialText[0].about}
|
||||
initialValue={initialText[0]?.about}
|
||||
init={{
|
||||
height: 500,
|
||||
width: '100%',
|
||||
|
||||
@ -3,8 +3,6 @@ import Head from 'next/head'
|
||||
import { parseCookies } from 'nookies'
|
||||
import React from 'react'
|
||||
|
||||
import Chart from '../../components/graph/Chart'
|
||||
import { LineBarChart } from '../../components/graph/LineBarChart'
|
||||
import { LineBarChart2 } from '../../components/graph/LineBarChart2'
|
||||
import Header from '../../components/header/Header'
|
||||
import PageTitle from '../../components/pageTitle/PageTitle'
|
||||
@ -23,7 +21,7 @@ export default function EstimatedCost({graphData, userName}: any) {
|
||||
</Header>
|
||||
<section>
|
||||
<LineBarChart2 data1={graphData} data2={graphData} data3={graphData}
|
||||
dataset1="Economia (R$)" dataset2='Cativo' dataset3='Livre'
|
||||
dataset1="Economia (R$)" dataset2='Est. Cativo' dataset3='Est. Livre'
|
||||
label={ConsumoEstimado.label} title='' subtitle='' barLabel hashurado />
|
||||
</section>
|
||||
</EstimatedCostView>
|
||||
|
||||
@ -8,4 +8,6 @@ export const GeneralView = styled.main`
|
||||
flex-direction: column;
|
||||
|
||||
width: 100%;
|
||||
|
||||
margin: 0;
|
||||
`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user