lib/axlsx/drawing/bubble_series.rb in caxlsx-3.3.0 vs lib/axlsx/drawing/bubble_series.rb in caxlsx-3.4.0
- old
+ new
@@ -1,15 +1,12 @@
-# encoding: UTF-8
module Axlsx
-
# A BubbleSeries defines the x/y position and bubble size of data in the chart
# @note The recommended way to manage series is to use Chart#add_series
# @see Worksheet#add_chart
# @see Chart#add_series
# @see examples/example.rb
class BubbleSeries < Series
-
# The x data for this series.
# @return [AxDataSource]
attr_reader :xData
# The y data for this series.
@@ -24,15 +21,15 @@
# Red, green, and blue is expressed as sequence of hex digits, RRGGBB. A perceptual gamma of 2.2 is used.
# @return [String]
attr_reader :color
# Creates a new BubbleSeries
- def initialize(chart, options={})
+ def initialize(chart, options = {})
@xData, @yData, @bubbleSize = nil
super(chart, options)
@xData = AxDataSource.new(:tag_name => :xVal, :data => options[:xData]) unless options[:xData].nil?
- @yData = NumDataSource.new({:tag_name => :yVal, :data => options[:yData]}) unless options[:yData].nil?
- @bubbleSize = NumDataSource.new({:tag_name => :bubbleSize, :data => options[:bubbleSize]}) unless options[:bubbleSize].nil?
+ @yData = NumDataSource.new({ :tag_name => :yVal, :data => options[:yData] }) unless options[:yData].nil?
+ @bubbleSize = NumDataSource.new({ :tag_name => :bubbleSize, :data => options[:bubbleSize] }) unless options[:bubbleSize].nil?
end
# @see color
def color=(v)
@color = v