Commit fd4c583f8d87eb15e73785680f6c50c3d580a609
1 parent
c1a96762
Exists in
rhitier-dev
Add source name to y title
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
web/static/js/main.js
... | ... | @@ -419,6 +419,8 @@ |
419 | 419 | } |
420 | 420 | console.log(target['name'], id, data[id]); |
421 | 421 | if (data[id].length) { |
422 | + //console.log('-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+') | |
423 | + console.log(id, title, target, data[id], container) | |
422 | 424 | return app.time_series.push(new TimeSeries(id, title, target, data[id], app.parameters[id].active, container, { |
423 | 425 | 'started_at': app.started_at, |
424 | 426 | 'stopped_at': app.stopped_at |
... | ... | @@ -871,7 +873,10 @@ |
871 | 873 | this.plotWrapper.append('g').classed('x axis', true); |
872 | 874 | this.plotWrapper.append('g').classed('y axis', true); |
873 | 875 | this.yAxisText = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").text(this.title); |
874 | - 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); | |
876 | + let y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html(); | |
877 | + this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)") | |
878 | + .attr("dy", "1em").style("text-anchor", "middle") | |
879 | + .style("font-style", "oblique").text(y_title); | |
875 | 880 | this.focus = this.plotWrapper.append('g').style("display", "none"); |
876 | 881 | this.cursorCircle = this.focus.append("circle").attr("class", "cursor-circle").attr("r", 3); |
877 | 882 | dx = 8; | ... | ... |