Class: RailsCharts::CalendarChart
- Defined in:
- lib/rails_charts/calendar_chart.rb
Constant Summary
Constants inherited from BaseChart
Instance Attribute Summary collapse
-
#visual_map_options ⇒ Object
readonly
Returns the value of attribute visual_map_options.
Attributes inherited from BaseChart
#chart_id, #container_id, #data, #debug, #height, #klass, #locale, #options, #other_options, #renderer, #style, #theme, #vertical, #width
Instance Method Summary collapse
- #build_options ⇒ Object
- #defaults ⇒ Object
- #generate_series_options ⇒ Object
-
#initialize(data, options = {}) ⇒ CalendarChart
constructor
A new instance of CalendarChart.
- #type ⇒ Object
Methods inherited from BaseChart
#axises, #js_code, #option, #x_axis, #y_axis
Constructor Details
#initialize(data, options = {}) ⇒ CalendarChart
Returns a new instance of CalendarChart.
5 6 7 |
# File 'lib/rails_charts/calendar_chart.rb', line 5 def initialize(data, = {}) super(data, ) end |
Instance Attribute Details
#visual_map_options ⇒ Object (readonly)
Returns the value of attribute visual_map_options.
3 4 5 |
# File 'lib/rails_charts/calendar_chart.rb', line 3 def @visual_map_options end |
Instance Method Details
#build_options ⇒ Object
13 14 15 |
# File 'lib/rails_charts/calendar_chart.rb', line 13 def super.except(:xAxis, :yAxis) end |
#defaults ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/rails_charts/calendar_chart.rb', line 25 def defaults { tooltip: { item: { trigger: 'item', }, }, } end |
#generate_series_options ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rails_charts/calendar_chart.rb', line 17 def { type: type, coordinateSystem: 'calendar', data: data[:data] } end |
#type ⇒ Object
9 10 11 |
# File 'lib/rails_charts/calendar_chart.rb', line 9 def type 'heatmap' end |