File "chart-language.html.erb"
Full Path: /home/analogde/www/php/integrations/rubyonrails/samples/app/views/samples/chart-language.html.erb
File size: 2.52 KB
MIME-type: text/x-ruby
Charset: utf-8
<%
def getChart
chartData = {
"chart": {
"caption": "سوبرماركت هاري",
"subCaption": "الإيرادات الشهرية للعام الماضي",
"xAxisName": "الشهر",
"yAxisName": "كمية",
"numberPrefix": "$",
"theme": "fusion",
"rotateValues": "1",
"exportEnabled": "1"
},
"data": [
{
"label": "يناير",
"value": "420000"
},
{
"label": "فبراير",
"value": "810000"
},
{
"label": "مارس",
"value": "720000"
},
{
"label": "أبريل",
"value": "550000"
},
{
"label": "مايو",
"value": "910000"
},
{
"label": "يونيو",
"value": "510000"
},
{
"label": "يوليو",
"value": "680000"
},
{
"label": "أغسطس",
"value": "620000"
},
{
"label": "سبتمبر",
"value": "610000"
},
{
"label": "أكتوبر",
"value": "490000"
},
{
"label": "نوفمبر",
"value": "900000"
},
{
"label": "ديسمبر",
"value": "730000"
}
]
}
# Chart rendering
chart = Fusioncharts::Chart.new({
width: "700",
height: "400",
type: "column2d",
renderAt: "chartContainer",
dataSource: chartData
})
end
%>
<h3>Different language example</h3>
<div id="chartContainer"></div>
<%= getChart.render() %>
<br/>
<br/>
<a href="index">Go Back</a>