use of org.jfree.chart.plot.IntervalMarker in project pinot by linkedin.
the class AnomalyGraphGenerator method createGraphMarker.
/**
* Returns either a value marker (point) or a interval marker (range) depending on provided
* inputs. By default values are gray or transparent gray.
* @param intervalStart
* @param intervalEnd
* @return
*/
private Marker createGraphMarker(Long intervalStart, Long intervalEnd, String label) {
Marker anomalyMarker;
if (intervalEnd == null || intervalStart.equals(intervalEnd)) {
// Point
anomalyMarker = new ValueMarker(intervalStart);
anomalyMarker.setPaint(Color.LIGHT_GRAY);
} else {
// Range
anomalyMarker = new IntervalMarker(intervalStart, intervalEnd);
anomalyMarker.setPaint(TRANSPARENT_GRAY);
}
anomalyMarker.setLabel(label);
LOG.info("Anomaly marker generated for: {}, {}", intervalStart, intervalEnd);
return anomalyMarker;
}
Aggregations