From fd4c583f8d87eb15e73785680f6c50c3d580a609 Mon Sep 17 00:00:00 2001 From: Richard Hitier Date: Wed, 7 Dec 2022 11:38:06 +0100 Subject: [PATCH] Add source name to y title --- web/static/js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/static/js/main.js b/web/static/js/main.js index acd644a..d71770e 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -419,6 +419,8 @@ } console.log(target['name'], id, data[id]); if (data[id].length) { + //console.log('-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+') + console.log(id, title, target, data[id], container) return app.time_series.push(new TimeSeries(id, title, target, data[id], app.parameters[id].active, container, { 'started_at': app.started_at, 'stopped_at': app.stopped_at @@ -871,7 +873,10 @@ this.plotWrapper.append('g').classed('x axis', true); this.plotWrapper.append('g').classed('y axis', true); this.yAxisText = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").text(this.title); - this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").style("font-style", "oblique").text(this.target.name); + let y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html(); + this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)") + .attr("dy", "1em").style("text-anchor", "middle") + .style("font-style", "oblique").text(y_title); this.focus = this.plotWrapper.append('g').style("display", "none"); this.cursorCircle = this.focus.append("circle").attr("class", "cursor-circle").attr("r", 3); dx = 8; -- libgit2 0.21.2