Skip to content

Commit

Permalink
update empty graph
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex committed Apr 23, 2020
1 parent d079842 commit 99ae884
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions src/Graph.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -298,33 +298,34 @@
.selectAll('*')
.remove();
// // size chart
// var margin = { top: 20, right: 20, bottom: 70, left: 40 },
// width = w - margin.left - margin.right,
// height = 0.75 * w - margin.top - margin.bottom;
// // parse the date time
// var parseDate = d3.timeParse('%Y%m%d');
// // set ranges
// this.x = d3.scaleBand().rangeRound([0, width]);
// this.y = d3.scaleLinear().range([height, 0]);
// // attach graphic
// var svg = d3
// .select(el)
// .append('svg')
// .attr('width', width + margin.left + margin.right)
// .attr('height', height + margin.top + margin.bottom)
// .append('g')
// .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
// // draw axes
// svg
// .append('g')
// .attr('transform', 'translate(0,' + height + ')')
// .call(d3.axisBottom(this.x).tickFormat(''));
// svg.append('g').call(d3.axisLeft(this.y).tickFormat(''));
if (w > 400) w = 400;
// size chart
var margin = { top: 20, right: 20, bottom: 70, left: 40 },
width = w - margin.left - margin.right,
height = 0.75 * w - margin.top - margin.bottom;
// parse the date time
var parseDate = d3.timeParse('%Y%m%d');
// set ranges
this.x = d3.scaleBand().rangeRound([0, width]);
this.y = d3.scaleLinear().range([height, 0]);
// attach graphic
var svg = d3
.select(el)
.append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
// draw axes
svg
.append('g')
.attr('transform', 'translate(0,' + height + ')')
.call(d3.axisBottom(this.x).tickFormat(''));
svg.append('g').call(d3.axisLeft(this.y).tickFormat(''));
}
updateChart() {}
Expand Down

0 comments on commit 99ae884

Please sign in to comment.