1

I am using fusion charts in my jsp to present data. Here is the code I am using.

FusionCharts.ready(function(){
var summaryChart = new FusionCharts(  
{
    type: "line",
    renderAt: "chartContainer1",
    width: "500",
    height: "300",
    dataFormat: "json",
    "dataSource":  {
"chart": {
    "caption": "Total Revenues from 2008-2013",
    "numberprefix": "$",
    "bgcolor": "FFFFFF",
    "showalternatehgridcolor": "0",
    "plotbordercolor": "008ee4",
    "plotborderthickness": "3",
    "showvalues": "0",
    "divlinecolor": "CCCCCC",
    "showcanvasborder": "0",
    "tooltipbgcolor": "00396d",
    "tooltipcolor": "FFFFFF",
    "tooltipbordercolor": "00396d",
    "numdivlines": "2",
    "yaxisvaluespadding": "20",
    "anchorbgcolor": "008ee4",
    "anchorborderthickness": "0",
    "showshadow": "0",
    "anchorradius": "4",
    "chartrightmargin": "25",
    "canvasborderalpha": "0",
    "showborder": "0"
},

"data": [
    {
        "label": "2009",
        "value": "4400000",
        "color": "008ee4"
    },
    {
        "label": "2010",
        "value": "4800000",
        "color": "008ee4"
    },
    {
        "label": "2011",
        "value": "5500000",
        "color": "008ee4"
    },
    {
        "label": "2012",
        "value": "6700000",
        "color": "008ee4",
        "anchorradius": "7",
        "tooltext": "Historical high"
    },
    {
        "label": "2013",
        "value": "4200000",
        "color": "008ee4"
 }
 ]
 }
   });
 summaryChart.render();
 });

I want to add some data that has been read from the database as data to this chart. I tried using arrays inside javascipt and the stuff and still unable to do that. Please help me.

1 Answer 1

1

yes, you can do it by using fusioncharts jsp wrapper

http://www.fusioncharts.com/jsp-charts/

More details about this wrapper

http://www.fusioncharts.com/dev/using-with-server-side-languages/java/introduction.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.