Guest User

Untitled

a guest
Jul 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. def initialize(options={})
  2. # defaults
  3. @credits = {:enabled => false}
  4. @title = {:text => 'null'}
  5.  
  6. # define defaults based on chart type
  7. case @type.to_s
  8. when 'area'
  9. when 'areaspline'
  10. when 'bar'
  11. @plotOptions = {
  12. :bar => {
  13. :dataLabels => {
  14. :enabled => true,
  15. :color => 'auto'
  16. },
  17. :showInLegend => false
  18. }
  19. }
  20. when 'column'
  21. when 'line'
  22. @chart = {:defaultSeriesType => 'line'}
  23. when 'pie'
  24. @plotOptions = {
  25. :pie => {
  26. :dataLabels => {
  27. :enabled => true,
  28. :color => 'white',
  29. :style => {:font => '10pt Helvetica'}
  30. }
  31. }
  32. }
  33. when 'scatter'
  34. when 'spline'
  35. end
  36.  
  37. # set the options
  38. options.each do |attribute, value|
  39. send("#{attribute.to_s}=", value) if self.respond_to?("#{attribute}=")
  40. end
  41. end
Add Comment
Please, Sign In to add comment