Commit 7f4cbd1d34ea73356eb37ac681d62125a012153d

Authored by hitier
1 parent 79d621c7
Exists in rhitier-dev

Set ytitle for target.type.input

Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
web/static/js/main.js
@@ -879,7 +879,12 @@ @@ -879,7 +879,12 @@
879 this.plotWrapper.append('g').classed('x axis', true); 879 this.plotWrapper.append('g').classed('x axis', true);
880 this.plotWrapper.append('g').classed('y axis', true); 880 this.plotWrapper.append('g').classed('y axis', true);
881 this.yAxisText = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").text(this.title); 881 this.yAxisText = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").text(this.title);
882 - let y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html(); 882 + let y_title = ''
  883 + if ( this.target.config.type == 'input'){
  884 + y_title = this.target.name;
  885 + } else {
  886 + y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html();
  887 + }
883 this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)") 888 this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)")
884 .attr("dy", "1em").style("text-anchor", "middle") 889 .attr("dy", "1em").style("text-anchor", "middle")
885 .style("font-style", "oblique").text(y_title); 890 .style("font-style", "oblique").text(y_title);