Class CombinedChart


  • public class CombinedChart
    extends Chart
    Represents a combined chart. Multiple chart types can be combined (but there can be maximum 2 y-axis).
    • Constructor Detail

      • CombinedChart

        public CombinedChart​(java.lang.String name,
                             ChartOptions options,
                             Chart[] charts,
                             Chart[] secondaryCharts)
        Represents a combined chart. Multiple chart types can be combined (but there can be maximum 2 y-axis).
        Parameters:
        name - Name of the chart (for the tag).
        options - Options of the chart.
        charts - Charts for the first y-axis.
        secondaryCharts - Charts for the second y-axis.
    • Method Detail

      • getCharts

        public java.util.ArrayList<Chart> getCharts()
        Returns:
        Charts for the first y-axis.
      • setCharts

        public void setCharts​(java.util.ArrayList<Chart> charts)
        Parameters:
        charts - Charts for the first y-axis.
      • getSecondaryCharts

        public java.util.ArrayList<Chart> getSecondaryCharts()
        Returns:
        Charts for the second y-axis.
      • setSecondaryCharts

        public void setSecondaryCharts​(java.util.ArrayList<Chart> secondaryCharts)
        Parameters:
        secondaryCharts - Charts for the second y-axis.
      • replaceKeyRecursive

        public com.google.gson.JsonObject replaceKeyRecursive​(com.google.gson.JsonObject jsonOld,
                                                              java.lang.String oldKey,
                                                              java.lang.String newKey)
        Replaces all the occurrences of oldKey in the json with the newKey. Objects with key "options" will not be modified (y-axis stays y-axis).
        Parameters:
        jsonOld - Json to be modified.
        oldKey - Old keys to be replaced.
        newKey - New key to replace the old key.
        Returns:
        Json with the old key replaced by the new key.
      • getModifiedChartDicts

        public com.google.gson.JsonArray getModifiedChartDicts()
        Returns:
        An array of the JSONs of the charts but adapted to a multiple chart.
      • getJSON

        public com.google.gson.JsonObject getJSON()
        Specified by:
        getJSON in class RenderElement
        Returns:
        JSONObject with the tags for this element for the Cloud Office Print server.