Class: GoogleImageCharts::LineGraph
- Defined in:
- lib/GoogleImageCharts/line-graph.rb
Constant Summary
Constants inherited from ChartBase
Instance Attribute Summary
Attributes inherited from ChartBase
#additionalChartOptions, #chartColors, #chartHeight, #chartLabels, #chartTitle, #chartWidth, #usePost
Instance Method Summary collapse
- #chartDataFlattened ⇒ Object
-
#initialize(chartOptionsHash) ⇒ LineGraph
constructor
A new instance of LineGraph.
Methods inherited from ChartBase
#chartData=, #chart_url, #get_chart, #html_img_tag, #post_chart_data, #set_chart_label_position
Constructor Details
#initialize(chartOptionsHash) ⇒ LineGraph
Returns a new instance of LineGraph.
5 6 7 8 9 10 11 12 13 |
# File 'lib/GoogleImageCharts/line-graph.rb', line 5 def initialize(chartOptionsHash) super(chartOptionsHash) @chartType = "lc" #Line chart @chartSpecificOptions += "&chds=a" # Chart Scale (automatic scaling by Google) @chartSpecificOptions += "&chxt=x,y" # Scale labels for the X and Y axis' end |
Instance Method Details
#chartDataFlattened ⇒ Object
15 16 17 18 |
# File 'lib/GoogleImageCharts/line-graph.rb', line 15 def chartDataFlattened # Line graphs are series arrays seperated by pipes @chartData.join("|") end |