pack one more y label before top one
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 18 May 2010 11:28:10 +0000 (13:28 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 18 May 2010 11:28:10 +0000 (13:28 +0200)
public/facet_graph.js

index 700593d..c57aa36 100644 (file)
@@ -38,7 +38,8 @@ var y_num_labels = Math.round( data.height / 20 ); // padding between vertical l
 var y_inc = Math.ceil( data.y_range / y_num_labels );
 
 var y_pos = data.min_y;
-while( y_pos < data.max_y - y_inc ) {
+var y_last_pos = Math.ceil( data.max_y - y_inc / 2 );
+while( y_pos < y_last_pos ) {
        data.y_labels.push( y_pos );
        y_pos += y_inc;
 }