Class: Daytona::Charts::BarChart
- Defined in:
- lib/daytona/common/charts.rb
Instance Attribute Summary collapse
-
#elements ⇒ Array<Daytona::Charts::BarData>
readonly
The bars of the chart.
Attributes inherited from Chart2D
Attributes inherited from Chart
Instance Method Summary collapse
-
#initialize(data) ⇒ BarChart
constructor
A new instance of BarChart.
- #to_h ⇒ Hash<Symbol, Object>
Constructor Details
Instance Attribute Details
#elements ⇒ Array<Daytona::Charts::BarData> (readonly)
Returns The bars of the chart.
167 168 169 |
# File 'lib/daytona/common/charts.rb', line 167 def elements @elements end |
Instance Method Details
#to_h ⇒ Hash<Symbol, Object>
177 |
# File 'lib/daytona/common/charts.rb', line 177 def to_h = super.merge(elements: elements.map(&:to_h)) |