Interface OnlineCalculatable.DataCoordinateMarker
- Enclosing interface:
OnlineCalculatable
public static interface OnlineCalculatable.DataCoordinateMarker
Marker bound to data coordinates. Useful for, say, bars.
-
Method Summary
Modifier and TypeMethodDescriptiondoublegetMaxY()Similar togetMinY(), but for the upper edge.doublegetMinY()Y coordinate of the lower edge.doubleValue used for the widget/linemakeMarker(Function<Double, Integer> yDataCoordinateToPixelFunction) Creates a visual representation of the marker.
-
Method Details
-
getMinY
double getMinY()Y coordinate of the lower edge. Used to adjust the range of bottom panel. Doesn't have to be strictly equal to the actual icons edge coordinate, since it's only used for range adjustments. If you are OK with part of the icon being out of range, you can specify only the critical part boundaries. -
getMaxY
double getMaxY()Similar togetMinY(), but for the upper edge. -
getValueY
double getValueY()Value used for the widget/line -
makeMarker
Creates a visual representation of the marker.- Parameters:
yDataCoordinateToPixelFunction- function that converts y data coordinate to pixel coordinate mapped to the chart pixels range. Pixel coordinates should be used to calculateOnlineCalculatable.Markerheight and pixels offset. If data coordinate is out of chart limits, it is mapped to the pixels outside the chart pixels.- Returns:
- marker that is drawn on the chart or null if no marker should be drawn.
-