Class ChartUtils


  • public final class ChartUtils
    extends java.lang.Object
    Provides static utility methods for dealing with charts.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.fasterxml.jackson.databind.node.ObjectNode generateAnnotObjectNode​(ChartModel cm)
      Generates a JSON object node from the annotations of the given chart model.
      static com.fasterxml.jackson.databind.node.ArrayNode generateDataPointArrayNode​(ChartModel cm)
      Generates a JSON array node from the data points of the given chart model.
      static com.fasterxml.jackson.databind.JsonNode toJsonNode​(ChartModel.DataPoint dp, ChartModel cm)
      Generate a JSON node from the data point and given chart model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generateDataPointArrayNode

        public static com.fasterxml.jackson.databind.node.ArrayNode generateDataPointArrayNode​(ChartModel cm)
        Generates a JSON array node from the data points of the given chart model.
        Parameters:
        cm - the chart model
        Returns:
        the array node representation of data points
      • generateAnnotObjectNode

        public static com.fasterxml.jackson.databind.node.ObjectNode generateAnnotObjectNode​(ChartModel cm)
        Generates a JSON object node from the annotations of the given chart model.
        Parameters:
        cm - the chart model
        Returns:
        the object node representation of the annotations
      • toJsonNode

        public static com.fasterxml.jackson.databind.JsonNode toJsonNode​(ChartModel.DataPoint dp,
                                                                         ChartModel cm)
        Generate a JSON node from the data point and given chart model.
        Parameters:
        dp - the data point
        cm - the chart model
        Returns:
        the node representation of a data point with series