I am trying to use this gem but getting error.
Code
Prawn::Document.generate 'chart.pdf' do |pdf|
data = {
items: {
20 => 1.99,
35 => 2.29,
15 => 4.99,
55 => 0.59
}
}
pdf.chart data, type: :point, labels: [false], formats: []
end
Error:
RuntimeError: All of the items provided must be instances of Prawn::Graph::Series
from (irb):41:in `block in irb_binding'
from (irb):32
I am trying to use this gem but getting error. Code Prawn::Document.generate 'chart.pdf' do |pdf| data = { items: { 20 => 1.99, 35 => 2.29, 15 => 4.99, 55 => 0.59 } } pdf.chart data, type: :point, labels: [false], formats: [] end Error: RuntimeError: All of the items provided must be instances of Prawn::Graph::Series from (irb):41:in `block in irb_binding' from (irb):32