Class: SmartChart::MultipleDataSetChart

Inherits:
BaseChart
  • Object
show all
Includes:
Axes, GridLines
Defined in:
lib/smart_chart/multiple_data_set_chart.rb

Direct Known Subclasses

Bar, Line, Radar, Scatter

Instance Attribute Summary

Attributes inherited from BaseChart

#background, #data, #height, #legend, #margins, #orientation, #style, #width

Class Method Summary collapse

Methods included from Axes

auto_label_interval, included

Methods included from GridLines

included

Methods inherited from BaseChart

#initialize, #to_html, #to_query_string, #to_url, #valid?, #validate!

Constructor Details

This class inherits a constructor from SmartChart::BaseChart

Class Method Details

.line_styles(thickness = 1) ⇒ Object

Hash mapping line style names to two-element arrays. This is a class method so exceptions can access it to print a list of valid style names.



10
11
12
13
14
15
16
17
18
# File 'lib/smart_chart/multiple_data_set_chart.rb', line 10

def self.line_styles(thickness = 1)
  {
    :solid  => [thickness * 1, thickness * 0],
    :dotted => [thickness * 1, thickness * 2],
    :short  => [thickness * 2, thickness * 4],
    :dashed => [thickness * 4, thickness * 4],
    :long   => [thickness * 6, thickness * 4]
  }
end