Skip to content

Commit 4bddcec

Browse files
authored
Bug/dave 402 show yaxis (#251)
* show y axis * fix missing prop * show y axis * fix zeitreihe
1 parent 1e803dd commit 4bddcec

File tree

3 files changed

+42
-27
lines changed

3 files changed

+42
-27
lines changed

frontend/src/components/messstelle/charts/SpeedDial.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ interface Props {
7373
isListenausgabe: boolean;
7474
isNotHeatmap: boolean;
7575
loadingFile: boolean;
76-
openPdfReportDialog: boolean;
76+
openPdfReportDialog?: boolean;
7777
}
7878
7979
const props = withDefaults(defineProps<Props>(), {

frontend/src/components/zaehlstelle/charts/StepLineChart.vue

+18
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ const optionsDefault = computed(() => {
132132
return value.toLocaleString();
133133
},
134134
},
135+
axisLine: {
136+
show: true,
137+
},
135138
},
136139
{
137140
type: "value",
@@ -144,6 +147,9 @@ const optionsDefault = computed(() => {
144147
return `${value.toLocaleString()} %`;
145148
},
146149
},
150+
axisLine: {
151+
show: true,
152+
},
147153
},
148154
],
149155
series: seriesEntriesChart.value,
@@ -214,6 +220,9 @@ const options2x4 = computed(() => {
214220
return value.toLocaleString();
215221
},
216222
},
223+
axisLine: {
224+
show: true,
225+
},
217226
},
218227
{
219228
type: "value",
@@ -226,6 +235,9 @@ const options2x4 = computed(() => {
226235
return `${value.toLocaleString()} %`;
227236
},
228237
},
238+
axisLine: {
239+
show: true,
240+
},
229241
},
230242
{
231243
name: "Fahrzeuge",
@@ -237,6 +249,9 @@ const options2x4 = computed(() => {
237249
return value.toLocaleString();
238250
},
239251
},
252+
axisLine: {
253+
show: true,
254+
},
240255
gridIndex: 1,
241256
},
242257
{
@@ -250,6 +265,9 @@ const options2x4 = computed(() => {
250265
return `${value.toLocaleString()} %`;
251266
},
252267
},
268+
axisLine: {
269+
show: true,
270+
},
253271
gridIndex: 1,
254272
},
255273
],

frontend/src/components/zaehlstelle/charts/ZeitreiheChart.vue

+23-26
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const xAxis = computed(() => {
136136
});
137137
138138
const options = computed(() => {
139-
const options = {
139+
return {
140140
tooltip: {
141141
trigger: "axis",
142142
formatter: function (params: any[]) {
@@ -244,39 +244,36 @@ const options = computed(() => {
244244
return value.toLocaleString();
245245
},
246246
},
247+
axisLine: {
248+
show: true,
249+
},
250+
},
251+
{
252+
type: "value",
253+
name: "in Prozent",
254+
show: showSecondYAxis.value,
255+
min: 0,
256+
max: yAxisMax.value,
257+
interval: yAxisInterval.value,
258+
axisLabel: {
259+
formatter: function (value: number) {
260+
return `${value.toLocaleString()}%`;
261+
},
262+
},
263+
axisLine: {
264+
show: true,
265+
},
247266
},
248-
// Zweite Achse wird ggf. weiter unten gesetzt
249267
],
250268
series: seriesEntriesChart.value,
251269
};
252-
253-
if (secondYAxis.value) {
254-
options.yAxis[1] = secondYAxis.value;
255-
}
256-
257-
return options;
258270
});
259271
260-
const secondYAxis = computed(() => {
261-
if (
272+
const showSecondYAxis = computed(() => {
273+
return (
262274
filterOptions.value.schwerverkehrsanteilProzent ||
263275
filterOptions.value.gueterverkehrsanteilProzent
264-
) {
265-
return {
266-
type: "value",
267-
name: "in Prozent",
268-
min: 0,
269-
max: yAxisMax.value,
270-
interval: yAxisInterval.value,
271-
axisLabel: {
272-
formatter: function (value: number) {
273-
return `${value.toLocaleString()}%`;
274-
},
275-
},
276-
};
277-
} else {
278-
return undefined;
279-
}
276+
);
280277
});
281278
282279
/**

0 commit comments

Comments
 (0)