From 9d4f8ff6d2494a1d21a1acf13fc9688b31095fc0 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 12 Aug 2022 15:16:26 -0300 Subject: [PATCH 1/3] changing pld table color --- src/components/graph/graphCard/ChartCard.tsx | 2 +- .../grossAnualChart/GrossAnualChartView.ts | 4 -- src/pages/areaTest.tsx | 48 ------------------- src/pages/pld/index.tsx | 1 - src/styles/layouts/pld/PldView.ts | 4 +- 5 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 src/pages/areaTest.tsx diff --git a/src/components/graph/graphCard/ChartCard.tsx b/src/components/graph/graphCard/ChartCard.tsx index 578397c..b6d57d0 100644 --- a/src/components/graph/graphCard/ChartCard.tsx +++ b/src/components/graph/graphCard/ChartCard.tsx @@ -11,7 +11,7 @@ interface ChartCardInterface { children?: React.ReactNode } -export default function ChartCard({ title, subtitle, consumption, className, children }: ChartCardInterface) { +export default function GraphCard({ title, subtitle, consumption, className, children }: ChartCardInterface) { return (
diff --git a/src/components/graph/grossAnualChart/GrossAnualChartView.ts b/src/components/graph/grossAnualChart/GrossAnualChartView.ts index 078f017..f50b83d 100644 --- a/src/components/graph/grossAnualChart/GrossAnualChartView.ts +++ b/src/components/graph/grossAnualChart/GrossAnualChartView.ts @@ -3,10 +3,6 @@ import styled from "styled-components" export const GrossAnualChartView = styled.div` width: 90%; - div{ - /* margin-top: 10px; */ - } - @media (max-width: 900px) { min-width: 20rem } diff --git a/src/pages/areaTest.tsx b/src/pages/areaTest.tsx deleted file mode 100644 index dcd051c..0000000 --- a/src/pages/areaTest.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import Box from '@mui/material/Box'; -import FilledInput from '@mui/material/FilledInput'; -import FormControl from '@mui/material/FormControl'; -import FormHelperText from '@mui/material/FormHelperText'; -import IconButton from '@mui/material/IconButton'; -import Input from '@mui/material/Input'; -import InputAdornment from '@mui/material/InputAdornment'; -import InputLabel from '@mui/material/InputLabel'; -import OutlinedInput from '@mui/material/OutlinedInput'; -import TextField from '@mui/material/TextField'; -import Image from 'next/image' -import React from 'react' - -import BasicButton from '../components/buttons/basicButton/BasicButton' -import GradientButton from '../components/buttons/gradientButton/GradientButton' -import Graph from '../components/graph/Chart' -import LineChart from '../components/graph/LineChart' - -// import Footer from '../components/footer/footer' - -export default function areaTest() { - const [values, setValues] = React.useState({ - amount: '', - password: '', - weight: '', - weightRange: '', - showPassword: false, - }); - const handleChange = - (prop) => (event: React.ChangeEvent) => { - setValues({ ...values, [prop]: event.target.value }); - }; - const handleClickShowPassword = () => { - setValues({ - ...values, - showPassword: !values.showPassword, - }); - }; - const handleMouseDownPassword = (event: React.MouseEvent) => { - event.preventDefault(); - }; - - return ( - <> - {/*
*/} - - ) -} diff --git a/src/pages/pld/index.tsx b/src/pages/pld/index.tsx index 371e722..7055e02 100644 --- a/src/pages/pld/index.tsx +++ b/src/pages/pld/index.tsx @@ -71,7 +71,6 @@ export default function pld({tableData, userName, clientMonth}: pldInterface) { const handleChangeDate = (newValue: Date | null) => { setDate(newValue) - }; function getDataByDay() { diff --git a/src/styles/layouts/pld/PldView.ts b/src/styles/layouts/pld/PldView.ts index f2e4ffc..6bbc523 100644 --- a/src/styles/layouts/pld/PldView.ts +++ b/src/styles/layouts/pld/PldView.ts @@ -9,7 +9,7 @@ export const PldTableMinMaxView = styled.div` border-style:solid; border-width: 1px; - background-color: #EFEFEF; + background-color: #FFFFFF; margin-top: 15px; @@ -218,7 +218,7 @@ export const PldTableView = styled.div<{display?: boolean}>` border-style:solid; border-width: 1px; - background-color: #EFEFEF; + background-color: #FFFFFF; margin-top: 38px; From 8c833d4d5744a27074e6986b243e148153528958 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 12 Aug 2022 15:43:55 -0300 Subject: [PATCH 2/3] add more option to discretization --- src/pages/dashboard/index.tsx | 4 ++-- src/pages/telemetria/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index bae5f96..a4d5ddd 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -79,7 +79,7 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal <>
- Economia Acumulada:

R${lastDataBrutaMensalS}

+ Economia Acumulada:

R${lastDataBrutaMensalS}

- Economia Acumulada:

R${lastDataBrutaMensalS}

+ Economia Acumulada:

{` R$${lastDataBrutaMensalS}`}

5 minutos 15 minutos 1 hora - {/* 1 dia - 1 mês */} + 1 dia + 1 mês
From 1b783a6a272da75718264008b235c32f35c32582 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 12 Aug 2022 16:06:14 -0300 Subject: [PATCH 3/3] changing dashboard styles --- src/components/graph/graphCard/ChartCardView.ts | 3 ++- .../graph/grossAnualChart/GrossAnualChart.tsx | 10 +++++++--- src/pages/dashboard/index.tsx | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/graph/graphCard/ChartCardView.ts b/src/components/graph/graphCard/ChartCardView.ts index b8b39a7..351fc21 100644 --- a/src/components/graph/graphCard/ChartCardView.ts +++ b/src/components/graph/graphCard/ChartCardView.ts @@ -36,7 +36,8 @@ export const ChartCardView = styled.article` color: #254F7F; p { font-size: 20px; - text-decoration: underline; + color: #018A8A; + margin-left: 5px } } diff --git a/src/components/graph/grossAnualChart/GrossAnualChart.tsx b/src/components/graph/grossAnualChart/GrossAnualChart.tsx index 145630f..bce3b4d 100644 --- a/src/components/graph/grossAnualChart/GrossAnualChart.tsx +++ b/src/components/graph/grossAnualChart/GrossAnualChart.tsx @@ -51,7 +51,9 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, }, y: { - stacked: true, + stacked: false, + min: 0, + max: 1100, grid: { display: false }, @@ -82,14 +84,14 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, display: true, anchor: "end", - offset: !miniature? 0 : -5, + offset: !miniature? 0 : -60, align: "start", font: { weight: 'bold', size: !miniature? window.innerWidth/70 : window.innerWidth/90, }, color: (value) => { - return value.dataset.label==='Consolidada'? '#fff' : '#255488' + return value.dataset.label==='Consolidada'? '#000' : '#000' }, }, legend: { @@ -109,6 +111,8 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba labels = label } + console.log(dataProps) + const data: any = { labels, datasets: [ diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index a4d5ddd..3bbdd8c 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -79,7 +79,7 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal <>
- Economia Acumulada:

R${lastDataBrutaMensalS}

+ Economia Acumulada:

R${lastDataBrutaMensalS}