2013-06-04 35 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",