Merge branch 'telemetry' into 'dev'
Telemetry See merge request kluppsoftware/smart-energia-web!132
This commit is contained in:
commit
a52d35a326
@ -11,7 +11,7 @@ interface ChartCardInterface {
|
|||||||
children?: React.ReactNode
|
children?: React.ReactNode
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ChartCard({ title, subtitle, consumption, className, children }: ChartCardInterface) {
|
export default function GraphCard({ title, subtitle, consumption, className, children }: ChartCardInterface) {
|
||||||
return (
|
return (
|
||||||
<ChartCardView className={className} >
|
<ChartCardView className={className} >
|
||||||
<div className='content' >
|
<div className='content' >
|
||||||
|
|||||||
@ -36,7 +36,8 @@ export const ChartCardView = styled.article`
|
|||||||
color: #254F7F;
|
color: #254F7F;
|
||||||
p {
|
p {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-decoration: underline;
|
color: #018A8A;
|
||||||
|
margin-left: 5px
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,9 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
stacked: true,
|
stacked: false,
|
||||||
|
min: 0,
|
||||||
|
max: 1100,
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
},
|
},
|
||||||
@ -82,14 +84,14 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
|
|||||||
},
|
},
|
||||||
display: true,
|
display: true,
|
||||||
anchor: "end",
|
anchor: "end",
|
||||||
offset: !miniature? 0 : -5,
|
offset: !miniature? 0 : -60,
|
||||||
align: "start",
|
align: "start",
|
||||||
font: {
|
font: {
|
||||||
weight: 'bold',
|
weight: 'bold',
|
||||||
size: !miniature? window.innerWidth/70 : window.innerWidth/90,
|
size: !miniature? window.innerWidth/70 : window.innerWidth/90,
|
||||||
},
|
},
|
||||||
color: (value) => {
|
color: (value) => {
|
||||||
return value.dataset.label==='Consolidada'? '#fff' : '#255488'
|
return value.dataset.label==='Consolidada'? '#000' : '#000'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
@ -109,6 +111,8 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
|
|||||||
labels = label
|
labels = label
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(dataProps)
|
||||||
|
|
||||||
const data: any = {
|
const data: any = {
|
||||||
labels,
|
labels,
|
||||||
datasets: [
|
datasets: [
|
||||||
|
|||||||
@ -3,10 +3,6 @@ import styled from "styled-components"
|
|||||||
export const GrossAnualChartView = styled.div`
|
export const GrossAnualChartView = styled.div`
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|
||||||
div{
|
|
||||||
/* margin-top: 10px; */
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
min-width: 20rem
|
min-width: 20rem
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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<HTMLInputElement>) => {
|
|
||||||
setValues({ ...values, [prop]: event.target.value });
|
|
||||||
};
|
|
||||||
const handleClickShowPassword = () => {
|
|
||||||
setValues({
|
|
||||||
...values,
|
|
||||||
showPassword: !values.showPassword,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const handleMouseDownPassword = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
||||||
event.preventDefault();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <Footer /> */}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@ -87,7 +87,7 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal
|
|||||||
</GraphCard>
|
</GraphCard>
|
||||||
|
|
||||||
<GraphCard title='Economia Mensal' subtitle='Economia Bruta Estimada e Acumulada Mensal - Valores em R$ x mil'>
|
<GraphCard title='Economia Mensal' subtitle='Economia Bruta Estimada e Acumulada Mensal - Valores em R$ x mil'>
|
||||||
<b>Economia Acumulada: <p>R${lastDataBrutaMensalS}</p></b>
|
<b>Economia Acumulada:<p>{` R$${lastDataBrutaMensalS}`}</p></b>
|
||||||
<GrossMensalChart title='' subtitle=''
|
<GrossMensalChart title='' subtitle=''
|
||||||
data1={grossMensalGraph}
|
data1={grossMensalGraph}
|
||||||
data2={grossMensalGraph}
|
data2={grossMensalGraph}
|
||||||
|
|||||||
@ -71,7 +71,6 @@ export default function pld({tableData, userName, clientMonth}: pldInterface) {
|
|||||||
|
|
||||||
const handleChangeDate = (newValue: Date | null) => {
|
const handleChangeDate = (newValue: Date | null) => {
|
||||||
setDate(newValue)
|
setDate(newValue)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function getDataByDay() {
|
function getDataByDay() {
|
||||||
|
|||||||
@ -310,8 +310,8 @@ export default function Telemetria({userName, clients}: any) {
|
|||||||
<MenuItem value="5_min">5 minutos</MenuItem>
|
<MenuItem value="5_min">5 minutos</MenuItem>
|
||||||
<MenuItem value="15_min">15 minutos</MenuItem>
|
<MenuItem value="15_min">15 minutos</MenuItem>
|
||||||
<MenuItem value="1_hora">1 hora</MenuItem>
|
<MenuItem value="1_hora">1 hora</MenuItem>
|
||||||
{/* <MenuItem value="1_dia">1 dia</MenuItem>
|
<MenuItem value="1_dia">1 dia</MenuItem>
|
||||||
<MenuItem value="1_mes">1 mês</MenuItem> */}
|
<MenuItem value="1_mes">1 mês</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export const PldTableMinMaxView = styled.div`
|
|||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
|
|
||||||
background-color: #EFEFEF;
|
background-color: #FFFFFF;
|
||||||
|
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ export const PldTableView = styled.div<{display?: boolean}>`
|
|||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
|
|
||||||
background-color: #EFEFEF;
|
background-color: #FFFFFF;
|
||||||
|
|
||||||
margin-top: 38px;
|
margin-top: 38px;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user