Commit graph

4 commits

Author SHA1 Message Date
df52237420 Show the Strom charts per half-year
Each bill's values are spread evenly over the months of its period and
summed per calendar half-year, so a yearly July-June bill contributes
half to each of its two halves. Half-years without a bill appear as gaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:28:29 +01:00
034bc4e0f0 Add a total-costs-per-period line chart to the Strom page
A third chart below the existing pair, plotting ElectricityBill.TotalChf
per period.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-26 16:29:32 +01:00
ec0bf7d602 Split the CHF/kWh chart by Netz/PV and fix its axis scale
The price-per-kWh line only showed the blended total; add GridChfPerKwh
and PvChfPerKwh (null when there was no draw/consumption of that kind,
so the chart shows a gap instead of a misleading 0) and plot Netz, PV
and Total as separate lines.

Also fixes the y-axis: ticks used a fixed 0-decimal formatter, so
CHF/kWh values (well under 1) all rounded to "0". charts.js now takes
an optional data.axisDecimals (defaults to 0, so the Analyse page is
unaffected); the Strom page passes 2 for its CHF/kWh chart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-26 16:27:17 +01:00
7d7bd6073c Add "Strom" page for the yearly NeoVac electricity bill
A new page (/electricity) to record one electricity bill per billing
period (1 July-30 June) with a grid, add/edit dialog, and two Chart.js
charts (kWh split grid/PV per period, CHF/kWh as a line).

- ElectricityBill (Common): Grid/PV kWh and CHF, side costs, advance
  payment; computed TotalKwh, PvShare, TotalChf, Balance, ChfPerKwh.
- Stored once per mandator at {DataPath}/{mandator}/electricity.json
  instead of per year, since the billing period doesn't align with
  calendar years (new ISettingsService.GetMandatorPath(),
  BaseRepository gets a directory-aware SaveAsync overload).
- electricity.json is also editable through the JSON editor
  (RawDataRepository).
- charts.js: stackedBar/line charts can now show a unit other than
  CHF (defaults to CHF, so the Analyse page is unaffected).
- The add/edit dialog links to an annotated example (SVG, placeholder
  data) showing which value on the real NeoVac bill goes into which
  field; opens in its own dialog since the main dialog has a fixed
  height.
- Tests for the computed properties and the new repositories.

Also bumps the TargetFramework to net10.0 and updates the local
DataPath in appsettings.Development.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-25 20:30:40 +01:00