Sha256: 1626dbead65e1ad0bfbf42713293368c6e762049e5f707602f3ccd454cef2261
Contents?: true
Size: 828 Bytes
Versions: 1
Compression:
Stored size: 828 Bytes
Contents
# frozen_string_literal: true require_relative './xlsx_func_testcase' class TestChartDoughnut < XlsxWriterTestCase DATA = [[2, 60], [4, 30], [6, 10]].freeze test 'chart_doughnut02' do |wb| wb.add_worksheet do |ws| DATA.each { |row| ws.add_row row } wb.add_chart(XlsxWriter::Workbook::Chart::DOUGHNUT) do |chart| chart.add_series '=Sheet1!$A$1:$A$3', '=Sheet1!$B$1:$B$3' chart.hole_size = 10 ws.insert_chart('E9', chart) end end end test 'chart_doughnut04' do |wb| wb.add_worksheet do |ws| DATA.each { |row| ws.add_row row } wb.add_chart(XlsxWriter::Workbook::Chart::DOUGHNUT) do |chart| chart.add_series '=Sheet1!$A$1:$A$3', '=Sheet1!$B$1:$B$3' chart.rotation = 30 ws.insert_chart('E9', chart) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xlsxwriter-0.2.2 | test/test_chart_doughnut.rb |