Sha256: 43f63f0606665d863400c3e9065be329a5b197171cc3f4f1924336eabac0c363

Contents?: true

Size: 397 Bytes

Versions: 1

Compression:

Stored size: 397 Bytes

Contents

# frozen_string_literal: true

module ChartTest
  def chart_test(fname, type, data = self::DATA, ref_file_name: nil, &_block)
    test fname, ref_file_name: ref_file_name do |wb|
      wb.add_worksheet do |ws|
        data.each { |row| ws.add_row row }

        wb.add_chart(type) do |chart|
          yield chart, ws

          ws.insert_chart 'E9', chart
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xlsxwriter-0.2.2 test/support/chart_test.rb