【问题标题】:Can't see the labels on Pie HighCharts在 Pie HighCharts 上看不到标签
【发布时间】:2013-06-04 02:33:02
【问题描述】:

我正在使用 Ruby on Rails 和 HighCharts:

这是我在设置高图时看到的打印屏幕:

代码如下:

@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

一切都很好,除了我没有看到饼图上的标签...图表下方似乎有一个小字符串,但是标签没有初始化。

有人知道如何解决这个问题吗?

【问题讨论】:

    标签: ruby-on-rails highcharts


    【解决方案1】:

    是因为你把它设置为白色吗?

    :color=>"white",
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-18
      • 1970-01-01
      • 2017-12-04
      • 2015-05-09
      • 1970-01-01
      相关资源
      最近更新 更多