The structure for single series 3D column chart that works:
This represents test(assessment) results for student over a period(terms 1 - 2)
xml = Builder::XmlMarkup.new(:indent=>0)
options = { ....}
xml.graph(options) do
for result in @user_results.results do
assessment_name = result.assessment.name
xml.set(:name => assessment_name, :value => result.percentage, :color=>''+get_FC_color)
end
end
My structure for a multi-series 3D column chart. Note I have changed the SWF to 3D column
multi-series chart. This obviously si not working. What am I doing wrong?
This represents the same data as above but including the variables for the category and dataset elements.
xml = Builder::XmlMarkup.new(:indent=>0)
options = { ....}
xml.graph(options) do
for result in @user_results.results do
category_name = result.assessment.term
series_name = result.assessment.subject_class.name
xml.categories(:font => "Arial", :fontSize => "11", :fontColor => "000000")
xml.category(:name => category_name)
xml.dataset(:seriesname => series_name, :color => ''+get_FC_color)
xml.set(:value => result.percentage)
end
end
Thanks
Archie

Back to top
MultiQuote
