数据无法在wicked_pdf的lazy_high_charts中正确呈现

时间:2019-05-06 02:28:54

标签: ruby-on-rails-4 highcharts wicked-pdf lazy-high-charts

我正在使用带有邪恶pdf的惰性高位图表以pdf打印图形。以下是我的代码

LazyHighCharts::HighChart.new('graph') do |f|
  f.title(text: "Population vs GDP For 5 Big Countries [2009]")
  f.xAxis(categories: ["United States", "Japan", "China", "Germany", "France"])
  f.series(name: "GDP in Billions", yAxis: 0, data: [14119, 5068, 4985, 3339, 2656])
  f.series(name: "Population in Millions", yAxis: 1, data: [310, 127, 1340, 81, 65])

  f.yAxis [
    {title: {text: "GDP in Billions", margin: 70} },
    {title: {text: "Population in Millions"}, opposite: true},
  ]

  f.legend(align: 'right', verticalAlign: 'top', y: 75, x: -50, layout: 'vertical')
  f.chart({defaultSeriesType: "column"})
end

,但是Graph呈现得非常小。附图片供参考 enter image description here

0 个答案:

没有答案