Class: Daytona::Charts::PieData

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/charts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ PieData



194
195
196
197
198
199
# File 'lib/daytona/common/charts.rb', line 194

def initialize(data)
  @label = data.fetch(:label)
  @angle = data.fetch(:angle)
  @radius = data.fetch(:radius)
  @autopct = data.fetch(:autopct)
end

Instance Attribute Details

#angleFloat (readonly)



185
186
187
# File 'lib/daytona/common/charts.rb', line 185

def angle
  @angle
end

#autopctFloat (readonly)



191
192
193
# File 'lib/daytona/common/charts.rb', line 191

def autopct
  @autopct
end

#labelString (readonly)



182
183
184
# File 'lib/daytona/common/charts.rb', line 182

def label
  @label
end

#radiusFloat (readonly)



188
189
190
# File 'lib/daytona/common/charts.rb', line 188

def radius
  @radius
end

Instance Method Details

#to_hHash<Symbol, Object>



202
# File 'lib/daytona/common/charts.rb', line 202

def to_h = { label:, angle:, radius:, autopct: }