Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function extractValues(data: RawGraphDataItem): GraphDataItem {
: 1
const car1id = 'ev' + car1 + '-soc'
const car2id = 'ev' + car2 + '-soc'
const re_cp = /cp(\d+)-power/
const values: GraphDataItem = {}
values.date = +data.timestamp * 1000
if (+data.grid > 0) {
Expand Down Expand Up @@ -124,10 +125,18 @@ function extractValues(data: RawGraphDataItem): GraphDataItem {

values.charging = +data['charging-all']
// charge points - we only show a maximum of 10 chargepoints in the graph
for (let i = 0; i < 10; i++) {
/* for (let i = 0; i < 10; i++) {
const idx = 'cp' + i
values[idx] = +(data[idx + '-power'] ?? 0)
}
} */
Object.keys(data)
.filter(key => re_cp.test(key))
.forEach((key) => {
const found = key.match(re_cp)
if (found && found[1]) {
values['cp' + found[1]] = +(data[key] ?? 0)
}
})
values.selfUsage = values.pv - values.evuOut
if (values.selfUsage < 0) {
values.selfUsage = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const props = defineProps<{
categoriesToShow: PowerItemType[]
}>()

const cornerRadius = 20
const cornerRadius = 10
const circleGapSize = Math.PI / 40
const arcCount = computed(() => props.plotdata.length - 1)
const pieGenerator = computed(() =>
Expand All @@ -75,7 +75,7 @@ const pieGenerator = computed(() =>
const path = computed(() =>
arc<PieArcDatum<PowerItem>>()
//.innerRadius((props.radius / 6) * 5)
.innerRadius(props.radius * 0.88)
.innerRadius(props.radius * 0.87)
.outerRadius(props.radius)
.cornerRadius(cornerRadius),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Hagen */
<span class="d-none d-md-inline ms-2">Fahrzeuge</span>
</a>
<a
v-if="globalData.isBatteryConfigured"
v-if="globalData.isBatteryConfigured && batteries.size > 0"
class="nav-link"
data-bs-toggle="tab"
data-bs-target="#batterylist"
Expand Down Expand Up @@ -251,6 +251,7 @@ import { ref, computed, onMounted } from 'vue'
import { globalData } from '../assets/js/model'
import { shDevices } from '@/components/smartHome/model'
import { initConfig } from '@/assets/js/themeConfig'
import { batteries } from '@/components/batteryList/model'
import PowerMeter from '@/components/powerMeter/PowerMeter.vue'
import PowerGraph from '@/components/powerGraph/PowerGraph.vue'
import EnergyMeter from '@/components/energyMeter/EnergyMeter.vue'
Expand Down
4 changes: 2 additions & 2 deletions packages/modules/web_themes/colors/source/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileURLToPath, URL } from 'url'
import { defineConfig, splitVendorChunkPlugin } from 'vite'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill";
import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill";
Expand All @@ -14,7 +14,7 @@ export default defineConfig({
}
}
}),
splitVendorChunkPlugin(),

],
resolve: {
alias: {
Expand Down