Sha256: 03dbcbf7bafb848e210d364d7d54962581e41ab826357c5f0c3d6471ee9ab472

Contents?: true

Size: 1.15 KB

Versions: 9

Compression:

Stored size: 1.15 KB

Contents

require 'axlsx'

module Rubyxls
  module Builders
    class ChartBuilder

      attr_reader :type
      attr_reader :start_at
      attr_reader :end_at
      attr_reader :title
      attr_reader :rot_x
      attr_reader :rot_y
      attr_reader :show_legend
      attr_reader :bar_dir
      attr_reader :cat_axis_title
      attr_reader :val_axis_title
      attr_reader :cat_axis_gridlines
      attr_reader :val_axis_gridlines
      attr_reader :series

      def initialize(**opts)
        @type = opts.fetch(:type, Axlsx::Bar3DChart)
        @start_at = opts.fetch(:start_at, "A1")
        @end_at = opts.fetch(:end_at, "A1")
        @title = opts.fetch(:title, " ")
        @rot_x = opts.fetch(:rot_x, 30)
        @rot_y = opts.fetch(:rot_y, 20)
        @show_legend = opts.fetch(:show_legend, false)
        @bar_dir = opts.fetch(:bar_dir, :col)
        @cat_axis_title = opts.fetch(:cat_axis_title, " ")
        @val_axis_title = opts.fetch(:val_axis_title, " ")
        @cat_axis_gridlines = opts.fetch(:cat_axis_gridlines, false)
        @val_axis_gridlines = opts.fetch(:val_axis_gridlines, false)
        @series = opts.fetch(:series, [])
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubyxls-1.2.1 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.2.0 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.1.0 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.5 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.4 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.3 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.2 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.1 lib/rubyxls/builders/chart_builder.rb
rubyxls-1.0.0 lib/rubyxls/builders/chart_builder.rb