Class: GoogleImageCharts::PieChart
- Defined in:
- lib/GoogleImageCharts/pie-chart.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) ⇒ PieChart
constructor
A new instance of PieChart.
Methods inherited from ChartBase
#chartData=, #chart_url, #get_chart, #html_img_tag, #post_chart_data, #set_chart_label_position
Constructor Details
#initialize(chartOptionsHash) ⇒ PieChart
Returns a new instance of PieChart.
6 7 8 9 10 11 12 13 |
# File 'lib/GoogleImageCharts/pie-chart.rb', line 6 def initialize(chartOptionsHash) super(chartOptionsHash) @chartType = "p" # Pie chart @chartSpecificOptions << "&chds=a" # Chart Scale (automatic scaling by Google) end |
Instance Method Details
#chartDataFlattened ⇒ Object
15 16 17 18 |
# File 'lib/GoogleImageCharts/pie-chart.rb', line 15 def chartDataFlattened # Pie Charts are simple data numbers seperated by commas @chartData.join(",") end |