Permalink
Browse files

a test for evenly spaced labels

  • Loading branch information...
1 parent c305823 commit 8e250a639a7910c56d31cdf92a630dd45d624a27 @markus committed Jun 9, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 spec/gchart_spec.rb
View
@@ -125,7 +125,11 @@
Gchart.line(:axis_labels => [['Jan','July','Jan','July','Jan']]).include?(Gchart.jstize('chxl=0:|Jan|July|Jan|July|Jan')).should be_true
Gchart.line(:axis_labels => [['Jan','July','Jan','July','Jan'], ['0','100'], ['A','B','C'], ['2005','2006','2007']]).include?(Gchart.jstize('chxl=0:|Jan|July|Jan|July|Jan|1:|0|100|2:|A|B|C|3:|2005|2006|2007')).should be_true
end
-
+
+ it "should have evenly spaced labels by default" do
+ Gchart.line(:data => [[nil, 500, 425], [425, 600, nil]], :axis_with_labels => ['x'], :axis_labels => [[1, 2, 3]]).should include('chxr=0,0,500|1,425,600')
+ end
+
def labeled_line(options = {})
Gchart.line({:data => @data, :axis_with_labels => 'x,y'}.merge(options))
end

0 comments on commit 8e250a6

Please sign in to comment.