Sha256: fbd8bd5b0eb8b02a0610df93f39f6c76c42924fb4c4b7a5e24673dffc459580b
Contents?: true
Size: 817 Bytes
Versions: 1
Compression:
Stored size: 817 Bytes
Contents
# frozen_string_literal: true require_relative './xlsx_func_testcase' class TestChartScatter < XlsxWriterTestCase test 'chart_scatter15' do |wb| wb.add_worksheet do |ws| wb.add_chart(XlsxWriter::Workbook::Chart::SCATTER) do |chart| chart.axis_id_1 = 58_843_520 chart.axis_id_2 = 58_845_440 ws.write_string 0, 0, 'X' ws.write_string 0, 1, 'Y' ws.write_number 1, 0, 1 ws.write_number 1, 1, 10 ws.write_number 2, 0, 3 ws.write_number 2, 1, 30 chart.add_series '=Sheet1!$A$2:$A$3', '=Sheet1!$B$2:$B$3' chart.x_axis.set_name_range 'Sheet1', 0, 0 chart.x_axis.set_name_font italic: true, baseline: -1 chart.y_axis.set_name_range 'Sheet1', 0, 1 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_scatter.rb |