diff --git a/src/components/graph/Chart.tsx b/src/components/graph/Chart.tsx index c4c8017..fcb137d 100644 --- a/src/components/graph/Chart.tsx +++ b/src/components/graph/Chart.tsx @@ -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'); + }, } ], } diff --git a/src/components/graph/LineBarChart2.tsx b/src/components/graph/LineBarChart2.tsx index 76cd1fd..53df601 100644 --- a/src/components/graph/LineBarChart2.tsx +++ b/src/components/graph/LineBarChart2.tsx @@ -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: [], } ], diff --git a/src/components/graph/graphCard/ChartCardView.ts b/src/components/graph/graphCard/ChartCardView.ts index 752ebdb..0a9af85 100644 --- a/src/components/graph/graphCard/ChartCardView.ts +++ b/src/components/graph/graphCard/ChartCardView.ts @@ -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 { diff --git a/src/pages/administrative/general.tsx b/src/pages/administrative/general.tsx index 9442afa..f3149d5 100644 --- a/src/pages/administrative/general.tsx +++ b/src/pages/administrative/general.tsx @@ -78,8 +78,9 @@ export default function index({userName, initialText}: any) { Não cadastrado! -
- +
+ +
handleRegisterAboutUs()}/>
@@ -88,7 +89,7 @@ export default function index({userName, initialText}: any) { editorRef.current = editor} onEditorChange={(newText) => setText(newText)} - initialValue={initialText[0].about} + initialValue={initialText[0]?.about} init={{ height: 500, width: '100%', diff --git a/src/pages/estimatedCost/index.tsx b/src/pages/estimatedCost/index.tsx index 129618b..8965cdf 100644 --- a/src/pages/estimatedCost/index.tsx +++ b/src/pages/estimatedCost/index.tsx @@ -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) {
diff --git a/src/styles/layouts/general/GeneralView.tsx b/src/styles/layouts/general/GeneralView.tsx index 2c32b08..dd99e75 100644 --- a/src/styles/layouts/general/GeneralView.tsx +++ b/src/styles/layouts/general/GeneralView.tsx @@ -8,4 +8,6 @@ export const GeneralView = styled.main` flex-direction: column; width: 100%; + + margin: 0; `