Extract chart value object

This simplifies the views (slightly).
This commit is contained in:
Katrina Owen 2013-03-01 20:38:24 -05:00
parent 8b0f3e986a
commit 0aa6ea183b
7 changed files with 65 additions and 41 deletions

View file

@ -1,6 +1,6 @@
<% @swf_count ||= 0 -%>
<div class="open-flash-chart"><%= swf_tag asset_path("open-flash-chart.swf"),
:flashvars => { 'width' => width, 'height' => height, 'data' => data},
:flashvars => { 'width' => chart.width, 'height' => chart.height, 'data' => url_for(:action => chart.action)},
:parameters => { 'allowScriptAccess' => 'sameDomain', 'wmode' => 'transparent'},
:div_id => "chart_#{@swf_count+=1}",
:size => "#{width}x#{height}" %></div>
:size => chart.dimensions %></div>