<%
    def getChart
        chartData = {

        "chart": {
          "caption": "Recommended Portfolio Split",
          "subCaption": "For a net-worth of $1M",
          "showValues": "1",
          "showPercentInTooltip": "0",
          "numberPrefix": "$",
          "enableMultiSlicing": "1",
          "theme": "fusion"
        },
        "data": [{
          "label": "Equity",
          "value": "300000"
        }, {
          "label": "Debt",
          "value": "230000"
        }, {
          "label": "Bullion",
          "value": "180000"
        }, {
          "label": "Real-estate",
          "value": "270000"
        }, {
          "label": "Insurance",
          "value": "20000"
        }]
      }   

        # Chart rendering 
        chart = Fusioncharts::Chart.new({
                width: "600",
                height: "400",
                type: "pie3d",
                renderAt: "chartContainer",
                dataSource: chartData
            })
    end
%>

<h3>Pie 3D Chart</h3>
<div id="chartContainer"></div>
<%=getChart.render() %>
<br/>
<br/>
<a href="index">Go Back</a>