Package org.onosproject.ui.chart
Class ChartUtils
- java.lang.Object
-
- org.onosproject.ui.chart.ChartUtils
-
public final class ChartUtils extends 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.
-
-
-
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 pointcm
- the chart model- Returns:
- the node representation of a data point with series
-
-