Skip to content

Commit

Permalink
Fix minor bug in pricechart display
Browse files Browse the repository at this point in the history
  • Loading branch information
cshagen committed Jan 2, 2025
1 parent abcf539 commit 1ba4c07
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 38 deletions.
24 changes: 0 additions & 24 deletions packages/modules/web_themes/colors/source/.eslintrc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ const xScale = computed(() => {
.domain(xdomain)
})
const yDomain = computed(() => {
let yd = extent(plotdata.value, (d) => d[1]) as [number, number]
yd[0] = Math.floor(yd[0]) - 1
yd[1] = Math.floor(yd[1]) + 1
let yd = [0, 0]
if (plotdata.value.length > 0) {
yd = extent(plotdata.value, (d) => d[1]) as [number, number]
yd[0] = Math.floor(yd[0]) - 1
yd[1] = Math.floor(yd[1]) + 1
}
return yd
})
const yScale = computed(() => {
Expand Down Expand Up @@ -130,7 +133,7 @@ const yAxisGenerator = computed(() => {
return (
axisLeft<number>(yScale.value)
//.ticks(yDomain.value[1] - yDomain.value[0])
.ticks(15)
.ticks(yDomain.value[1] - yDomain.value[0])
.tickSize(0)
.tickSizeInner(-(width - margin.right - margin.left))
.tickFormat((d) => d.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,14 @@ const xAxisGenerator = computed(() => {
})
const yAxisGenerator = computed(() => {
return axisLeft<number>(yScale.value)
.ticks(6)
.ticks(yDomain.value[1] - yDomain.value[0])
.tickSizeInner(-(width - margin.right - margin.left))
.tickFormat((d) => d.toString())
})
const draw = computed(() => {
if (needsUpdate.value == true) {
dummy = !dummy
}
const svg = select('g#' + chartId.value)
svg.selectAll('*').remove()
const bargroups = svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
:options="shortListOptions"
/>
</ConfigItem>

</div>
<div class="settingscolumn">
<ConfigItem
Expand Down Expand Up @@ -186,7 +185,7 @@
>
<SwitchInput v-model="globalConfig.alternativeEnergy" />
</ConfigItem>
<ConfigItem
<ConfigItem
:fullwidth="true"
title="Preistabelle anzeigen"
icon="fa-car"
Expand Down Expand Up @@ -226,7 +225,7 @@
unit="ct"
/>
</ConfigItem>

<ConfigItem
:fullwidth="true"
title="IFrame-Support für Einstellungen (Experimentell)"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/modules/web_themes/colors/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<link rel="apple-touch-icon" sizes="60x60" href="/openWB/web/img/favicons/apple-touch-icon-60x60.png">
<link rel="manifest" href="/openWB/web/manifest.json">
<title>openWB</title>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-Bfmq2pf1.js"></script>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-Bpw8XWwo.js"></script>
<link rel="modulepreload" crossorigin href="/openWB/web/themes/colors/assets/vendor-CyQtMzsz.js">
<link rel="stylesheet" crossorigin href="/openWB/web/themes/colors/assets/index-CAyRdrFn.css">
<link rel="stylesheet" crossorigin href="/openWB/web/themes/colors/assets/index-BPb-wTT5.css">
</head>

<body>
Expand Down

0 comments on commit 1ba4c07

Please sign in to comment.