Browse Source

Bring back axis title

master
Nathan Bergey 6 years ago
parent
commit
a51f5dc4e1
  1. 5
      src/render.js

5
src/render.js

@ -44,7 +44,7 @@ class Chart {
} }
draw_yAxisTitle(title) { draw_yAxisTitle(title) {
const middle = (this.top - this.bottom) / 2.0
const middle = this.top + ((this.height) / 2.0)
const x = 15 const x = 15
this.canvas.append('text').attr('class', 'axis-title') this.canvas.append('text').attr('class', 'axis-title')
.attr('text-anchor', 'middle').attr('dominant-baseline', 'middle') .attr('text-anchor', 'middle').attr('dominant-baseline', 'middle')
@ -335,9 +335,6 @@ export function render_clouds(canvas, width, height, offset, data) {
.y(function(d) { return chart.yRange(d.coverage) }) .y(function(d) { return chart.yRange(d.coverage) })
.curve(d3.curveBasis) .curve(d3.curveBasis)
//chart.draw_xAxisLineTop()
chart.set_yAxisTic( 0, '0%') chart.set_yAxisTic( 0, '0%')
chart.set_yAxisTic( 50, '50%') chart.set_yAxisTic( 50, '50%')
chart.draw_xGrid( 50, 'guide') chart.draw_xGrid( 50, 'guide')

Loading…
Cancel
Save