Skip to content

Commit

Permalink
let's NOT use charts for a number example as numbers does not support…
Browse files Browse the repository at this point in the history
… OOXML charts yet!
  • Loading branch information
randym committed Sep 26, 2012
1 parent 51d4118 commit 99a7822
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,13 @@ related to themes, which axlsx does not implement at this time.
conveniently done just before rendering by calling Package.use_shared_strings = true prior to serialization.

```ruby
Axlsx::Package.new do |p|
p.workbook.add_worksheet(:name => "Pie Chart") do |sheet|
sheet.add_row ["Simple Pie Chart"]
%w(first second third).each { |label| sheet.add_row [label, rand(24)+1] }
sheet.add_chart(Axlsx::Pie3DChart, :start_at => [0,5], :end_at => [10, 20], :title => "example 3: Pie Chart") do |chart|
chart.add_series :data => sheet["B2:B4"], :labels => sheet["A2:A4"], :colors => ['FF0000', '00FF00', '0000FF']
end
end
p.use_shared_strings = true
p.serialize('simple.xlsx')
p = Axlsx::Package.new
p.workbook.add_worksheet(:name => "Basic Worksheet") do |sheet|
sheet.add_row ["First Column", "Second", "Third"]
sheet.add_row [1, 2, 3]
end
p.use_shared_strings = true
p.serialize('simple.xlsx')
```

- charts do not render
Expand Down

0 comments on commit 99a7822

Please sign in to comment.