Commit 8f93772c authored by Håvard Vika Røen's avatar Håvard Vika Røen
Browse files

code cleanup

parent 642477f0
......@@ -39,72 +39,6 @@ export default {
"updateOptions",
this.options
);
// let self = this;
// let right = true;
// //console.log(yaxsis)
// let yoptions = yaxis.map((yy, index) => {
// if (!yy.unit) {
// return { seriesName: yy.seriesName, show: false };
// } else {
// right = !right;
// return {
// opposite: right,
// axisTicks: {
// show: true,
// },
// axisBorder: {
// show: true,
// },
// title: {
// text: yy.unit,
// },
// seriesName: yy.name,
// min: yaxisStart,
// forceNiceScale: true,
// decimalsInFloat: 1,
// };
// }
// });
// ApexCharts.exec(
// "apexchart",
// "updateOptions",
// {
// yaxis: yoptions,
// chart: {
// events: {
// beforeZoom: function (chartContext, { xaxis }) {
// self.showSelectedMarkerDetails = false
// },
// zoomed: function (chartContext, { xaxis, yaxis }) {
// self.validateurlfrom = moment(xaxis.min).format(self.dateformat);
// self.validateurlto = moment(xaxis.max).format(self.dateformat);
// },
// markerClick: function (event, chartContext, { seriesIndex, dataPointIndex, config }) {
// self.showSelectedMarkerDetails = true;
// self.selectedDetails = moment(chartContext.data.w.config.series[seriesIndex].data[dataPointIndex][0]).format('DD-MM-YYYY HH:mm') + ' - '
// + chartContext.data.w.config.series[seriesIndex].name + ' - '
// + chartContext.data.w.config.series[seriesIndex].data[dataPointIndex][1] + ' ' + self.units[seriesIndex];
// if (self.validateurlfrom == '') {
// self.validateurlfrom = moment(chartContext.data.twoDSeriesX[0]).format(self.dateformat);
// }
// if (self.validateurlto == '') {
// self.validateurlto = moment(chartContext.data.twoDSeriesX[chartContext.data.twoDSeriesX.length - 1]).add(1, 'days').format(self.dateformat);
// }
// self.validateurl = '/qualitycontrol/validate?id=' + self.timeserieIds[seriesIndex].timeserieid + '&selfrom=' + self.validateurlfrom + '&selto=' + self.validateurlto +
// '&recordfromdate=' + moment(chartContext.data.twoDSeriesX[dataPointIndex]).format(self.dateformat + 'THH:mm:SS') +
// '&backurl=' + encodeURIComponent(self.viewerurl) + '&showData=true';
// }
// }
// }
// },
// false,
// true
// );
},
},
};
......
......@@ -112,7 +112,7 @@
<b>bar type</b>
</i>
</l-checkbox>
<l-checkbox class="mr-4" v-model="setYaxisStart">Set Y-axis startvalue</l-checkbox>
<l-checkbox class="mr-4" v-if="false" v-model="setYaxisStart">Set Y-axis startvalue</l-checkbox>
</div>
<div class="flex mt-4" v-if="setYaxisStart">
<label for="yaxisStartInput" class="flex mr-1 mt-2">Y-axis:</label>
......@@ -244,7 +244,6 @@ export default {
if (this.$route.query.ids) {
this.preselected = this.$route.query.ids.split(",");
}
console.log('presel',this.preselected);
if (this.preselected.length>0) {
var selections = this.timeseries.filter((f) => {
......@@ -285,7 +284,6 @@ export default {
if (val) {
if(!this.yaxisStart)
this.yaxisStart = 0;
console.log('yaxisstart',this.yaxisStart);
} else {
this.yaxisStart = undefined;
}
......@@ -293,10 +291,8 @@ export default {
},
methods: {
async loadInitialData() {
console.log('loadinitial');
const timeseries = await HistoricalService.timeseries();
console.log(timeseries);
let mapped = timeseries.map(t => {
return {
......@@ -406,14 +402,11 @@ export default {
onlyValidValues: this.onlyValidValues,
viewAsBar: this.viewAsBar,
};
console.log('ondownload');
if (sel.oc_id.length > 0) {
if (this.CsvFormatPivot) {
console.log('ondownload pivot', sel);
await HistoricalService.timeSeriesCsv(sel, true);
} else {
console.log('ondownload', sel);
await HistoricalService.timeSeriesCsv(sel);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment