Class: RubyvisCharts::GroupedBarTimelineChart

Inherits:
AbstractTimelineChart show all
Defined in:
lib/rubyvis_charts/grouped_bar_timeline_chart.rb

Defined Under Namespace

Modules: DefaultArguments

Constant Summary collapse

HALF_VALUE =
2

Constants inherited from AbstractTimelineChart

AbstractTimelineChart::EXTRA_WEEKEND_BARS_WIDTH, AbstractTimelineChart::TITLE_TOP_INDENT

Instance Attribute Summary collapse

Attributes inherited from AbstractTimelineChart

#custom_legend_offset, #dates, #dates_color, #dates_font, #dates_formatter, #dates_height_ratio, #layer_dates, #layer_legend, #layer_marks, #layer_numbers, #layer_timeline, #layer_title, #legend_chars, #legend_colors, #legend_font, #legend_shape, #legend_text_color, #legend_titles, #marks, #marks_color, #marks_font, #marks_formatter, #marks_height_ratio, #numbers_color, #numbers_font, #numbers_formatter, #rules_color, #rules_count, #threshold_caption, #threshold_color, #threshold_number, #threshold_width, #timeline_width_ratio, #title_color, #title_font, #title_text, #weekend_bar_color, #y_scale_max

Attributes inherited from AbstractChart

#height, #inner_box_height, #inner_box_width, #padding, #parent_layer, #values, #width

Instance Method Summary collapse

Methods inherited from AbstractTimelineChart

#dates_height, #dates_width, #legend_height, #legend_width, #marks_height, #marks_width, #numbers_height, #numbers_width, #timeline_height, #timeline_width, #title_height, #title_width

Methods inherited from AbstractChart

#render

Constructor Details

#initialize(bars_padding: DefaultArguments::BARS_PADDING, bars_colors: DefaultArguments::BARS_COLORS, **other) ⇒ GroupedBarTimelineChart

Returns a new instance of GroupedBarTimelineChart.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rubyvis_charts/grouped_bar_timeline_chart.rb', line 12

def initialize(
  bars_padding: DefaultArguments::BARS_PADDING,
  bars_colors: DefaultArguments::BARS_COLORS,
  **other
)
  super(other)

  @bars_padding = bars_padding
  @bars_colors = bars_colors

  initialize_bars!
end

Instance Attribute Details

#bars_colorsObject (readonly)

Returns the value of attribute bars_colors.



10
11
12
# File 'lib/rubyvis_charts/grouped_bar_timeline_chart.rb', line 10

def bars_colors
  @bars_colors
end

#bars_paddingObject (readonly)

Returns the value of attribute bars_padding.



10
11
12
# File 'lib/rubyvis_charts/grouped_bar_timeline_chart.rb', line 10

def bars_padding
  @bars_padding
end