push test marios
This commit is contained in:
parent
59f07cfa15
commit
22206c96c7
|
@ -57,7 +57,7 @@ public static class Aggregator
|
||||||
Console.WriteLine("-----------------------------------------------------------------------------------------------------------------");
|
Console.WriteLine("-----------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
// Wait until the next rounded hour
|
// Wait until the next rounded hour
|
||||||
//await Task.Delay(timeUntilNextDay);
|
await Task.Delay(timeUntilNextDay);
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const getChartOptions = (
|
||||||
toolbar: {
|
toolbar: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
type: 'area',
|
type: 'line',
|
||||||
height: 350,
|
height: 350,
|
||||||
zoom: {
|
zoom: {
|
||||||
autoScaleYaxis: false
|
autoScaleYaxis: false
|
||||||
|
@ -202,12 +202,15 @@ export const getChartOptions = (
|
||||||
: {
|
: {
|
||||||
chart: {
|
chart: {
|
||||||
height: 380,
|
height: 380,
|
||||||
type: 'bar',
|
|
||||||
stacked: chartInfo.unit !== '(%)' && type != 'overview'
|
stacked: chartInfo.unit !== '(%)' && type != 'overview'
|
||||||
},
|
},
|
||||||
|
stroke: {
|
||||||
|
width: [0, 0, 0, 2],
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
bar: {
|
bar: {
|
||||||
borderRadius: 10,
|
borderRadius: [10],
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
position: 'top'
|
position: 'top'
|
||||||
}
|
}
|
||||||
|
@ -232,6 +235,7 @@ export const getChartOptions = (
|
||||||
xaxis: {
|
xaxis: {
|
||||||
categories: dateList,
|
categories: dateList,
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
|
|
||||||
axisBorder: {
|
axisBorder: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,6 +41,8 @@ const computeLast7Days = (): string[] => {
|
||||||
function Overview(props: OverviewProps) {
|
function Overview(props: OverviewProps) {
|
||||||
const [dailyData, setDailyData] = useState(true);
|
const [dailyData, setDailyData] = useState(true);
|
||||||
const [weeklyData, setWeeklyData] = useState(false);
|
const [weeklyData, setWeeklyData] = useState(false);
|
||||||
|
const [weeklybalance, setWeeklyBalance] = useState([]);
|
||||||
|
const [monthlybalance, setMonthlyBalance] = useState([]);
|
||||||
const [monthlyData, setMonthlyData] = useState(false);
|
const [monthlyData, setMonthlyData] = useState(false);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [chartState, setChartState] = useState(0);
|
const [chartState, setChartState] = useState(0);
|
||||||
|
@ -154,8 +156,20 @@ function Overview(props: OverviewProps) {
|
||||||
chartData: result.chartAggregatedData,
|
chartData: result.chartAggregatedData,
|
||||||
chartOverview: result.chartOverview
|
chartOverview: result.chartOverview
|
||||||
});
|
});
|
||||||
//setChartAggregatedData(result.chartAggregatedData);
|
|
||||||
//setChartAggregatedOverview(result.chartOverview);
|
const powerDifference = [];
|
||||||
|
for (
|
||||||
|
let i = 0;
|
||||||
|
i < result.chartAggregatedData.gridImportPower.data.length;
|
||||||
|
i++
|
||||||
|
) {
|
||||||
|
powerDifference.push(
|
||||||
|
result.chartAggregatedData.gridImportPower.data[i] -
|
||||||
|
Math.abs(result.chartAggregatedData.gridExportPower.data[i])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
setWeeklyBalance(powerDifference);
|
||||||
setWeeklyDateList(computeLast7Days());
|
setWeeklyDateList(computeLast7Days());
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
})
|
})
|
||||||
|
@ -253,8 +267,22 @@ function Overview(props: OverviewProps) {
|
||||||
chartData: result.chartAggregatedData,
|
chartData: result.chartAggregatedData,
|
||||||
chartOverview: result.chartOverview
|
chartOverview: result.chartOverview
|
||||||
});
|
});
|
||||||
//setChartAggregatedData(result.chartAggregatedData);
|
|
||||||
//setChartAggregatedOverview(result.chartOverview);
|
const powerDifference = [];
|
||||||
|
|
||||||
|
for (
|
||||||
|
let i = 0;
|
||||||
|
i < result.chartAggregatedData.gridImportPower.data.length;
|
||||||
|
i++
|
||||||
|
) {
|
||||||
|
powerDifference.push(
|
||||||
|
result.chartAggregatedData.gridImportPower.data[i] -
|
||||||
|
Math.abs(result.chartAggregatedData.gridExportPower.data[i])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
setMonthlyBalance(powerDifference);
|
||||||
|
|
||||||
setMonthlyDateList(result.dateList);
|
setMonthlyDateList(result.dateList);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
})
|
})
|
||||||
|
@ -559,16 +587,19 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...dailyDataArray[chartState].chartData.gridPower,
|
...dailyDataArray[chartState].chartData.gridPower,
|
||||||
type: 'line'
|
type: 'line',
|
||||||
|
color: '#b30000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...dailyDataArray[chartState].chartData
|
...dailyDataArray[chartState].chartData
|
||||||
.pvProduction,
|
.pvProduction,
|
||||||
type: 'line'
|
type: 'line',
|
||||||
|
color: '#ff9900'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...dailyDataArray[chartState].chartData.soc,
|
...dailyDataArray[chartState].chartData.soc,
|
||||||
type: 'line'
|
type: 'line',
|
||||||
|
color: '#008FFB'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
height={420}
|
height={420}
|
||||||
|
@ -631,19 +662,28 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.gridImportPower,
|
...weeklyDataArray.chartData.gridImportPower,
|
||||||
color: '#EA3546'
|
color: '#b30000',
|
||||||
|
type: 'bar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.gridExportPower,
|
...weeklyDataArray.chartData.gridExportPower,
|
||||||
color: '#00E396'
|
color: '#ff3333',
|
||||||
|
type: 'bar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.pvProduction,
|
...weeklyDataArray.chartData.pvProduction,
|
||||||
color: '#FEB019'
|
type: 'bar',
|
||||||
|
color: '#ff9900'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Balance',
|
||||||
|
color: '#666666',
|
||||||
|
type: 'line',
|
||||||
|
data: weeklybalance
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
|
||||||
height={400}
|
height={400}
|
||||||
|
type={'bar'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -659,19 +699,28 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.gridImportPower,
|
...monthlyDataArray.chartData.gridImportPower,
|
||||||
color: '#EA3546'
|
color: '#b30000',
|
||||||
|
type: 'bar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.gridExportPower,
|
...monthlyDataArray.chartData.gridExportPower,
|
||||||
color: '#00E396'
|
color: '#ff3333',
|
||||||
|
type: 'bar'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.pvProduction,
|
...monthlyDataArray.chartData.pvProduction,
|
||||||
color: '#FEB019'
|
color: '#ff9900',
|
||||||
|
type: 'bar'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Balance',
|
||||||
|
type: 'line',
|
||||||
|
data: monthlybalance,
|
||||||
|
color: '#666666'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
|
||||||
height={400}
|
height={400}
|
||||||
|
type={'bar'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -852,8 +901,14 @@ function Overview(props: OverviewProps) {
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
{...weeklyDataArray.chartData.dcChargingPower,color: '#69d2e7'},
|
{
|
||||||
{...weeklyDataArray.chartData.dcDischargingPower,color: '#008FFB'}
|
...weeklyDataArray.chartData.dcChargingPower,
|
||||||
|
color: '#69d2e7'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...weeklyDataArray.chartData.dcDischargingPower,
|
||||||
|
color: '#008FFB'
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
height={400}
|
height={400}
|
||||||
|
@ -870,8 +925,14 @@ function Overview(props: OverviewProps) {
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
series={[
|
series={[
|
||||||
{...monthlyDataArray.chartData.dcChargingPower,color: '#69d2e7'},
|
{
|
||||||
{...monthlyDataArray.chartData.dcDischargingPower,color: '#008FFB'}
|
...monthlyDataArray.chartData.dcChargingPower,
|
||||||
|
color: '#69d2e7'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...monthlyDataArray.chartData.dcDischargingPower,
|
||||||
|
color: '#008FFB'
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
height={400}
|
height={400}
|
||||||
|
@ -956,7 +1017,7 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.pvProduction,
|
...weeklyDataArray.chartData.pvProduction,
|
||||||
color: '#FEB019'
|
color: '#ff9900'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
|
@ -976,7 +1037,7 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.pvProduction,
|
...monthlyDataArray.chartData.pvProduction,
|
||||||
color: '#FEB019'
|
color: '#ff9900'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
|
@ -1052,11 +1113,11 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.gridImportPower,
|
...weeklyDataArray.chartData.gridImportPower,
|
||||||
color: '#EA3546'
|
color: '#b30000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...weeklyDataArray.chartData.gridExportPower,
|
...weeklyDataArray.chartData.gridExportPower,
|
||||||
color: '#00E396'
|
color: '#ff3333'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
|
@ -1076,11 +1137,11 @@ function Overview(props: OverviewProps) {
|
||||||
series={[
|
series={[
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.gridImportPower,
|
...monthlyDataArray.chartData.gridImportPower,
|
||||||
color: '#EA3546'
|
color: '#b30000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...monthlyDataArray.chartData.gridExportPower,
|
...monthlyDataArray.chartData.gridExportPower,
|
||||||
color: '#00E396'
|
color: '#ff3333'
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
type="bar"
|
type="bar"
|
||||||
|
|
|
@ -275,11 +275,11 @@ export const transformInputToAggregatedData = async (
|
||||||
const chartAggregatedData: chartAggregatedDataInterface = {
|
const chartAggregatedData: chartAggregatedDataInterface = {
|
||||||
minsoc: { name: 'min SOC', data: [] },
|
minsoc: { name: 'min SOC', data: [] },
|
||||||
maxsoc: { name: 'max SOC', data: [] },
|
maxsoc: { name: 'max SOC', data: [] },
|
||||||
pvProduction: { name: 'Pv Power', data: [] },
|
pvProduction: { name: 'Pv Energy', data: [] },
|
||||||
dcChargingPower: { name: 'Charging Battery Power', data: [] },
|
dcChargingPower: { name: 'Charging Battery Energy', data: [] },
|
||||||
dcDischargingPower: { name: 'Discharging Battery Power', data: [] },
|
dcDischargingPower: { name: 'Discharging Battery Energy', data: [] },
|
||||||
gridImportPower: { name: 'Grid Import Power', data: [] },
|
gridImportPower: { name: 'Grid Import Energy', data: [] },
|
||||||
gridExportPower: { name: 'Grid Export Power', data: [] }
|
gridExportPower: { name: 'Grid Export Energy', data: [] }
|
||||||
};
|
};
|
||||||
|
|
||||||
const chartOverview: overviewInterface = {
|
const chartOverview: overviewInterface = {
|
||||||
|
|
Loading…
Reference in New Issue