diff options
| author | patorash <[email protected]> | 2013-09-27 01:12:18 +0900 |
|---|---|---|
| committer | patorash <[email protected]> | 2013-09-27 01:12:18 +0900 |
| commit | 2454f8120b6af255ed95c523a6893f002b2e956a (patch) | |
| tree | ab63ea8535e7f25f11d7e36d9f99929f653e4138 /test | |
| parent | 168fcb8406d80f863d5d1b50a38e585580f89acf (diff) | |
| download | caxlsx-2454f8120b6af255ed95c523a6893f002b2e956a.tar.gz caxlsx-2454f8120b6af255ed95c523a6893f002b2e956a.zip | |
smooth line for line chart
Diffstat (limited to 'test')
| -rw-r--r-- | test/drawing/tc_line_chart.rb | 1 | ||||
| -rw-r--r-- | test/drawing/tc_line_series.rb | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/test/drawing/tc_line_chart.rb b/test/drawing/tc_line_chart.rb index a14f75dc..0783edae 100644 --- a/test/drawing/tc_line_chart.rb +++ b/test/drawing/tc_line_chart.rb @@ -7,7 +7,6 @@ class TestLineChart < Test::Unit::TestCase ws = @p.workbook.add_worksheet @row = ws.add_row ["one", 1, Time.now] @chart = ws.add_chart Axlsx::LineChart, :title => "fishery" - @chart.smooth = true end def teardown diff --git a/test/drawing/tc_line_series.rb b/test/drawing/tc_line_series.rb index 866553c3..3d023a12 100644 --- a/test/drawing/tc_line_series.rb +++ b/test/drawing/tc_line_series.rb @@ -6,7 +6,7 @@ class TestLineSeries < Test::Unit::TestCase p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" chart = @ws.add_chart Axlsx::Line3DChart, :title => "fishery" - @series = chart.add_series :data=>[0,1,2], :labels=>["zero", "one", "two"], :title=>"bob", :color => "#FF0000", :show_marker => true + @series = chart.add_series :data=>[0,1,2], :labels=>["zero", "one", "two"], :title=>"bob", :color => "#FF0000", :show_marker => true, :smooth => true end def test_initialize @@ -20,11 +20,19 @@ class TestLineSeries < Test::Unit::TestCase assert_equal(true, @series.show_marker) @series.show_marker = false assert_equal(false, @series.show_marker) - end + end + + def test_smooth + assert_equal(true, @series.smooth) + @series.smooth = false + assert_equal(false, @series.smooth) + end + def test_to_xml_string doc = Nokogiri::XML(@series.to_xml_string) assert(doc.xpath("//srgbClr[@val='#{@series.color}']")) assert(doc.xpath("//marker")) + assert(doc.xpath("//smooth")) end #TODO serialization testing end |
