Class: ApexCharts::CartesianChart
- Includes:
- Annotations, Mixable, Utils::Hash
- Defined in:
- lib/apexcharts/charts/cartesian.rb
Direct Known Subclasses
AreaChart, BarChart, CandlestickChart, LineChart, ScatterChart
Instance Attribute Summary
Attributes inherited from BaseChart
Instance Method Summary collapse
-
#initialize(outer_self, data, options = {}, &block) ⇒ CartesianChart
constructor
A new instance of CartesianChart.
- #method_missing(method, *args, &block) ⇒ Object
- #more_options ⇒ Object
- #respond_to_missing?(method, *args) ⇒ Boolean
- #series_type ⇒ Object
Methods included from Utils::Hash
camelize, camelize_keys, deep_merge
Methods included from Mixable
Methods included from Annotations
#annotation, #point_annotation, #x_annotation, #y_annotation
Methods inherited from BaseChart
Constructor Details
#initialize(outer_self, data, options = {}, &block) ⇒ CartesianChart
Returns a new instance of CartesianChart.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/apexcharts/charts/cartesian.rb', line 11 def initialize(outer_self, data, ={}, &block) @outer_self = outer_self = deep_merge( camelize_keys(), camelize_keys() ) build_instance_variables if @outer_self instance_eval &block if block_given? [:annotations] = @annotations if @annotations @series = build_series(data) @options = () build_selection_range if brush? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/apexcharts/charts/cartesian.rb', line 37 def method_missing(method, *args, &block) if @outer_self.respond_to?(method, true) @outer_self.send method, *args, &block else super end end |
Instance Method Details
#more_options ⇒ Object
33 34 35 |
# File 'lib/apexcharts/charts/cartesian.rb', line 33 def {} end |
#respond_to_missing?(method, *args) ⇒ Boolean
45 46 47 |
# File 'lib/apexcharts/charts/cartesian.rb', line 45 def respond_to_missing?(method, *args) @outer_self.respond_to?(method, true) || super end |
#series_type ⇒ Object
29 30 31 |
# File 'lib/apexcharts/charts/cartesian.rb', line 29 def series_type CartesianSeries end |