Class DrawGChartFunction


  • public class DrawGChartFunction
    extends JavaScriptFunction
    JavaScript function to draw a specified type of chart
    Author:
    Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
    • Constructor Detail

      • DrawGChartFunction

        public DrawGChartFunction​(String functionName,
                                  String chartTitle,
                                  DataTable dataTable,
                                  GChartsFactory.ChartType chartType,
                                  HTMLDiv htmlDiv)
        Parameters:
        functionName - Unique name to identify the draw chart operation
        chartTitle - The chart title
        dataTable - The data set to show in the chart
        chartType - The type of chart to draw see ChartType
        htmlDiv - The div tag used to render the chart
    • Method Detail

      • getCodeBlock

        public String getCodeBlock()
                            throws Exception
        Description copied from class: JavaScriptFunction
        Mapping the statements and parameters of the JavaScript Function
        Specified by:
        getCodeBlock in class JavaScriptFunction
        Returns:
        code block inside curly brackets {...}
        Throws:
        Exception - Throw to notify to some error when process the code block of the function, example: data malformed.