Class: Highcharts::Axis::X
Instance Attribute Summary collapse
-
#skip_category_formatting ⇒ Object
readonly
Returns the value of attribute skip_category_formatting.
Attributes inherited from Base
#default, #options, #skip_quotation, #suboptions
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ X
constructor
A new instance of X.
- #to_json ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(opts = {}) ⇒ X
Returns a new instance of X.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/highcharts/axis/x.rb', line 7 def initialize(opts = {}) @default = :categories @suboptions = { events: 'Axis::Events', labels: 'Labels', plotBands: 'Axis::PlotBands', plotLines: 'Axis::PlotLines', title: 'Title' } # Check to see if we want to skip automatic formatting of categories. @skip_category_formatting = true if opts.delete(:skip_category_formatting) super end |
Instance Attribute Details
#skip_category_formatting ⇒ Object (readonly)
Returns the value of attribute skip_category_formatting.
5 6 7 |
# File 'lib/highcharts/axis/x.rb', line 5 def skip_category_formatting @skip_category_formatting end |
Instance Method Details
#to_json ⇒ Object
21 22 23 24 25 |
# File 'lib/highcharts/axis/x.rb', line 21 def to_json @options[:categories] = [:categories].collect {|c| format_category(c)} if [:categories].present? && !skip_category_formatting automate_tick_interval if [:tickInterval] == :auto || [:tickInterval].blank? super end |