2013-06-04 34 views
1

我使用Ruby on Rails和HighCharts:无法看到在鹊桥HighCharts标签

因此,这里是打印屏幕,我看到我的设置时highchart:

enter image description here

下面是代码:

@chart = LazyHighCharts::HighChart.new('pie') do |f| 
    f.chart({:defaultSeriesType=>"pie" , :margin=> [50, 200, 60, 170]}) 
    series = { 
      :type => 'pie', 
      :name => 'Browser share', 
      :data => [['say', 100],['may', 500]] 
    } 
    f.series(series) 
    f.options[:title][:text] = "Total spend on services" 
    f.legend(:layout=> 'vertical',:style=> {:left=> 'auto', :bottom=> 'auto',:right=> '50px',:top=> '100px'}) 
    f.plot_options(:pie=>{ 
    :allowPointSelect=>true, 
    :cursor=>"pointer" , 
    :dataLabels=>{ 
     :enabled=>true, 
     :color=>"white", 
     :style=>{ 
     :font=>"13px Trebuchet MS, Verdana, sans-serif" 
     } 
    } 
    }) 
end 

一切都很好,除了我没有看到的馅饼标签......似乎有下面的图表,一个小串,但标签未初始化ialized。

任何人都知道如何解决这个问题?

回答

2

是否因为您将它设置为白色?

:color=>"white",