Browse Source

Adjust chart size

master
Nathan Bergey 6 years ago
parent
commit
de5e1469b2
  1. 2
      src/index.js
  2. 2
      src/render.js

2
src/index.js

@ -27,7 +27,7 @@ const render = function (data) {
render_calendar(canvas, width, 20, 0, data) render_calendar(canvas, width, 20, 0, data)
render_nights(canvas, width, height - 20, 20, data) render_nights(canvas, width, height - 20, 20, data)
render_astronomy(canvas, width, 70, 20, data) render_astronomy(canvas, width, 70, 20, data)
render_temperature(canvas, width, 450, 70, data)
render_temperature(canvas, width, 350, 70, data)
} }
d3.xml(url).then(function(xmldoc) { d3.xml(url).then(function(xmldoc) {

2
src/render.js

@ -189,7 +189,7 @@ export function render_nights(canvas, width, height, offset, data) {
draw_box(sunEphem.nauticalDusk, new Date(year, month, day, 24, 0, 0), 'night') draw_box(sunEphem.nauticalDusk, new Date(year, month, day, 24, 0, 0), 'night')
nights.append('line').attr('class', 'midnight') nights.append('line').attr('class', 'midnight')
.attr('x1', xRange(midnight)).attr('y1', offset) .attr('x1', xRange(midnight)).attr('y1', offset)
.attr('x2', xRange(midnight)).attr('y2', height)
.attr('x2', xRange(midnight)).attr('y2', height + offset)
} }
} }

Loading…
Cancel
Save