Jackie Chan
Jackie Chan

Reputation: 2662

Can't see the labels on Pie HighCharts

I'm using Ruby on Rails and HighCharts:

So here is the print-screen that I see when setting my highchart:

enter image description here

Here is the code:

@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

All is good, apart from I don't see the labels on the pie... It seems there is a small string below the chart, however the label is not initialized.

Anyone know how to solve this issue?

Upvotes: 1

Views: 216

Answers (1)

Matt Allen
Matt Allen

Reputation: 196

Is it because you have it set to white?

:color=>"white",

Upvotes: 2

Related Questions