Skip to content

Commit

Permalink
Do not render chart for empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhilvendhan committed Oct 17, 2017
1 parent 0353703 commit 27f458d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions og-scatter-plot.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
let d3 = Px.d3;
let me = this;
let data = this.data;
if(!data || data.length === 0) {return;}
// set the dimensions and margins of the graph
let margin = {top: 30, right: 20, bottom: 40, left: 50},
width = this.width - margin.left - margin.right,
Expand Down

0 comments on commit 27f458d

Please sign in to comment.