-1

I am trying to pass a dynamic input to the fusion chart on a JSP page. I am actually trying to render a bar chart for which I am not sure about the number of columns. In the below snippet, in the data part, I need to pass the number of variables dynamically. Is it possible? Can someone help

                data: [
                    {

                        "label": "Inprogress",
                        "value": "<%=cummulativeInprogress%>"

                    }, 
                    {
                        "label": "Completed",
                        "value": "<%=cummulativeCompleted%>"
                    }, 
                    {
                        "label": "Aborted",
                        "value": "<%=cummulativeAborted%>"
                    }, 
                    {
                        "label": "Failed",
                        "value": "<%=cummulativeFailed%>"
                    },
                    {
                        "label": "Cancelled",
                        "value": "<%=cummulativeCancelled%>"
                    },
                    {
                        "label": "Amending",
                        "value": "<%=cummulativeAmending%>"
                    }
                ]
            }
        }).render();
    })

1 Answers1

0

You need to pass a json object to the fusioncharts engine to render the chart. Then in case you need to change the data plot, you can make another ajax call to get a new json object and refresh the chart display.

Charles Zhao
  • 158
  • 11