Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def initialize(options={})
- # defaults
- @credits = {:enabled => false}
- @title = {:text => 'null'}
- # define defaults based on chart type
- case @type.to_s
- when 'area'
- when 'areaspline'
- when 'bar'
- @plotOptions = {
- :bar => {
- :dataLabels => {
- :enabled => true,
- :color => 'auto'
- },
- :showInLegend => false
- }
- }
- when 'column'
- when 'line'
- @chart = {:defaultSeriesType => 'line'}
- when 'pie'
- @plotOptions = {
- :pie => {
- :dataLabels => {
- :enabled => true,
- :color => 'white',
- :style => {:font => '10pt Helvetica'}
- }
- }
- }
- when 'scatter'
- when 'spline'
- end
- # set the options
- options.each do |attribute, value|
- send("#{attribute.to_s}=", value) if self.respond_to?("#{attribute}=")
- end
- end
Add Comment
Please, Sign In to add comment