Class PiecewiseLineVisualSet
java.lang.Object
com.amalgamasimulation.visualsets.VisualSet<Pair<Double,Double>>
com.amalgamasimulation.visualsets.AbstractLineVisualSet<Pair<Double,Double>>
com.amalgamasimulation.visualsets.LineVisualSet<Pair<Double,Double>>
com.amalgamasimulation.visualsets.PiecewiseLineVisualSet
- All Implemented Interfaces:
IClipboardTextPropertyOwner<Double>,ILegendNodePropertiesOwner,IMinMaxValuePropertyOwner,IPiecewiseVisualSet,IUpdatePolicyPropertyOwner,IAbstractChartVisualSet,ILineChartVisualSet
public class PiecewiseLineVisualSet
extends LineVisualSet<Pair<Double,Double>>
implements IPiecewiseVisualSet
Visual set for drawing line plots with points based on PiecewiseFunction.
Optionally draws the plot as a stack diagram.
Uses a discretization method to reduce the amount of data displayed on the
chart to improve drawing performance. The discretization settings are the
same as in PiecewisePolylineVisualSet.
The current arguments range displayed on the chart is always used to determine the sampling factor.
The PiecewiseFunction.InterpolationType defines the values of the
discretized points, the LineVisualSet.InterpolationType defines the
way the points are connected:
LineVisualSet.InterpolationType.LINEARthe points are connected with straight lines. Step changes of the PiecewiseFunction are drawn as (visually) vertical lines.LineVisualSet.InterpolationType.STEPthe value of each point is held until the next point, the value after a step change is used. If the function was discretized withPiecewiseFunction.InterpolationType.PEAK, each discretization step holds the peak value found within this step.
Only UpdatePolicy.DYNAMIC is supported.
- Author:
- Andrey Malykhanov
-
Nested Class Summary
Nested classes/interfaces inherited from class com.amalgamasimulation.visualsets.LineVisualSet
LineVisualSet.InterpolationType, LineVisualSet.LineDrawingPolicy, LineVisualSet.LineVisualElementNested classes/interfaces inherited from class com.amalgamasimulation.visualsets.AbstractLineVisualSet
AbstractLineVisualSet.AbstractLineVisualElement, AbstractLineVisualSet.Extrapolation, AbstractLineVisualSet.PointsAndLinesStyleNested classes/interfaces inherited from class com.amalgamasimulation.visualsets.VisualSet
VisualSet.ContextMenuHandler<T>, VisualSet.UpdatePolicy, VisualSet.VisualElement -
Field Summary
FieldsModifier and TypeFieldDescriptionProvider of the data elements displayed instead of the discretized PiecewiseFunction, null by defaultprotected Supplier<PiecewiseFunction> protected PiecewiseFunction.InterpolationTypeprotected PiecewiseVisualSetRangePolicyprotected static final doubleThe argument shift (in pixels) of the point preceding a step change, used to draw the step change as a vertical line with the LINEAR interpolation typeFields inherited from class com.amalgamasimulation.visualsets.LineVisualSet
clipboardTextExtractor, includeWhenCopyingToClipboard, interpolationType, lineDrawingPolicy, stackFillColor, stackVisibleFields inherited from class com.amalgamasimulation.visualsets.AbstractLineVisualSet
extrapolation, legendTextProvider, lineColor, lineStyle, lineWidth, maxValueProvider, pointsAndLinesStyle, pointSize, valueExtractor, valueMultiplier, valueShiftFields inherited from class com.amalgamasimulation.visualsets.VisualSet
argumentExtractor, contentsToBeginArguments, contentsToEndArguments, contentsToVisualElements, contextMenuHandlers, dataElementsProvider, listeners, maxArgument, maxValueCache, minArgument, minValueCache, mouseEnterHandlers, mouseExitHandlers, mousePressedHandlers, mouseTransparent, name, needsUpdate, oldContentsList, tooltipTextExtractor, updatePolicy, visibilityChangeHandlers, visualElementsList -
Constructor Summary
ConstructorsConstructorDescriptionPiecewiseLineVisualSet(String name, Supplier<PiecewiseFunction> piecewiseFunctionExtractor, Supplier<Pair<Double, Double>> displayedRangeExtractor, Supplier<Double> axisLengthInPixelsExtractor) Constructs a PiecewiseLineVisualSet with given name, piecewiseFunction extractor and discretization rule extractors. -
Method Summary
Modifier and TypeMethodDescriptionaddContextMenuHandler(VisualSet.ContextMenuHandler<Pair<Double, Double>> contextMenuHandler) Adds the action to be executed every time a context menu for given data element is called.addMouseEnterHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Adds the action to be executed every time mouse enters to any visual element borders.addMouseExitHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Adds the action to be executed every time the mouse exits the previously entered element's bounds.addMousePressedHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Adds the action to be executed every time a mouse button is pressed.addVisibilityChangeHandler(Consumer<VisibilityChangeDescriptor<? extends IAbstractChartVisualSet>> visibilityChangeHandler) Adds the action to be executed every time the visibility of this VisualSet is changed.doubleReturns an actual plot X-axis length in pixels.Returns the list of visual set contents.doubleReturns a current argument shown on plot.getDisplayedPlotPoints(DoubleConsumer appliedDiscretizationFactorConsumer) Returns a current displayed range on plot.getLinearContents(List<Pair<Double, Double>> plotPoints) Converts the PiecewiseFunction plot points to the data elements for the LINEAR interpolation type.intReturns the minimum pixels per plot point for discretization.Returns data elements list provider.Returns the InterpolationType e.g.Returns the PiecewiseVisualSetRangePolicy for discretization.getPlotPointsWithDiscretizationGrid(List<Pair<Double, Double>> plotPoints, double discretizationFactor) Restores the discretization grid points omitted by the PiecewiseFunction plot points (the plot points of the collinear segments are merged), so that every discretization step is represented by its own point.protected doublegetStepContents(List<Pair<Double, Double>> plotPoints, boolean peakDiscretized) Converts the PiecewiseFunction plot points to the data elements for the STEP interpolation type: a single point per argument, its value is held until the next argument.Return the currentVisualSet.UpdatePolicy.booleanReturns the necessity rule for discretization.setAxisLengthInPixelsExtractor(Supplier<Double> axisLengthInPixelsExtractor) Sets a function that specifies the rule for extracting an actual plot X-axis length in pixels.setClipboardText(Function<Double, String> clipboardTextExtractor) Sets the conversion method from values of each plot data element into text that will be copied to clipboard.setCurrentArgumentExtractor(Supplier<Double> currentArgumentExtractor) Sets a function that specifies the rule for extracting a current argument shown on plot.voidsetDataElementsOverrideProvider(Function<DoubleConsumer, List<Pair<Double, Double>>> dataElementsOverrideProvider) Sets a provider of the data elements (plot points) displayed instead of the discretized PiecewiseFunction, or null to display the discretized PiecewiseFunction.setDiscretizeIfNecessaryExtractor(Supplier<Boolean> discretizeIfNecessaryExtractor) Sets a function that specifies the necessity rule for discretization.setDisplayedRangeExtractor(Supplier<Pair<Double, Double>> displayedRangeExtractor) Sets a function that specifies the rule for extracting a current displayed range on plot.setExtrapolation(AbstractLineVisualSet.Extrapolation extrapolation) Sets the of the plot i.e.setIncludeWhenCopyingToClipboard(Supplier<Boolean> includeWhenCopyingToClipboard) Sets the supplier of the property includeWhenCopyingToClipboard.setInterpolationType(LineVisualSet.InterpolationType interpolationType) Sets the newLineVisualSet.InterpolationTypei.e.setLegendText(Supplier<String> legendTextProvider) Sets the legend label text represents this visual set.setLineColor(Color color) Sets the line color of the plot.setLineDrawingPolicy(LineVisualSet.LineDrawingPolicy lineDrawingPolicy) Sets the newLineVisualSet.LineDrawingPolicyi.e.setLineStyle(LineStyle lineStyle) Sets theLineStyleof the plot i.e.setLineWidth(double width) Sets the width of the line, in pixels.voidsetMaxArgument(double maxArgument) setMaxValue(Supplier<Double> maxValueProvider) Sets the supplier of max value.voidsetMinArgument(double minArgument) setMinPixelsPerPlotPointExtractor(Supplier<Integer> minPixelsPerPlotPointExtractor) Sets a function that specifies the minimum pixels per plot point for discretization.setMouseTransparent(boolean mouseTransparent) Sets the value of the property mouseTransparent.setPiecewiseFunctionExtractor(Supplier<PiecewiseFunction> piecewiseFunctionExtractor) Sets data elements list provider.setPiecewiseFunctionInterpolationType(PiecewiseFunction.InterpolationType piecewiseFunctionInterpolationType) Sets the InterpolationType e.g.setPiecewiseVisualSetRangePolicy(PiecewiseVisualSetRangePolicy piecewiseVisualSetRangePolicy) Sets anPiecewiseVisualSetRangePolicyfor the IPiecewiseVisualSet displayed on the chart.setPointsAndLinesStyle(AbstractLineVisualSet.PointsAndLinesStyle pointsAndLinesStyle) Sets theAbstractLineVisualSet.PointsAndLinesStyleof the plot i.e.setPointSize(double pointSize) Sets the diameter of the point, in pixels.setStackFillColor(Color stackFillColor) Sets the color of a stack visual element.setStackVisible(boolean stackVisible) Sets the visibility of a stack visual element.Adds tooltip text to display when the mouse is hovered over a visual element representing given data element.setUpdatePolicy(VisualSet.UpdatePolicy updatePolicy) Sets the newVisualSet.UpdatePolicyi.e.protected voidMethods inherited from class com.amalgamasimulation.visualsets.LineVisualSet
createVisualElement, getClipboardText, getInterpolationType, getLegendColor, getLineDrawingPolicy, getStackFillColor, getVisualElements, isIncludeWhenCopyingToClipboard, isStackVisibleMethods inherited from class com.amalgamasimulation.visualsets.AbstractLineVisualSet
getExtrapolation, getLegendText, getLineColor, getLineStyle, getLineWidth, getMaxValue, getMinValue, getPointsAndLinesStyle, getPointSize, getValue, getValueMultiplier, getValueShift, withValueMultiplier, withValueShiftMethods inherited from class com.amalgamasimulation.visualsets.VisualSet
addVisualElement, addVisualElement, addVisualSetChangeHandler, clearDependencies, getArgument, getContextMenuHandlers, getDataElements, getInjectionIndex, getMaxArgument, getMinArgument, getMouseEnterHandlers, getMouseExitHandlers, getMousePressedHandlers, getName, getTooltipText, getVisibilityChangeHandlers, getVisibleVisualElementIndex, getVisibleVisualElementsCount, isMouseTransparent, isNeedsUpdate, recalculateVisualElements, removeContextMenuHandler, removeMouseEnterHandler, removeMouseExitHandler, removeMousePressedHandler, removeVisibilityChangeHandler, removeVisualElement, removeVisualSetChangeHandler, sortVisualElements, toString, update, updateMinMaxArgumentsValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.amalgamasimulation.visualsets.types.IAbstractChartVisualSet
addVisualSetChangeHandler, getMaxArgument, getMinArgument, getName, getVisibilityChangeHandlers, getVisibleVisualElementsCount, isMouseTransparent, removeVisibilityChangeHandler, removeVisualSetChangeHandlerMethods inherited from interface com.amalgamasimulation.visualsets.IPiecewiseVisualSet
getDiscretizationFactor, getDiscretizedDataElements, getDiscretizedDataElements, getDiscretizedFunction, getDisplayedInterval, getMaxArgument, getPlotPoints, getRequiredDiscretizationFactor, invalidatePiecewiseMinMaxArguments
-
Field Details
-
STEP_CHANGE_SHIFT_IN_PIXELS
protected static final double STEP_CHANGE_SHIFT_IN_PIXELSThe argument shift (in pixels) of the point preceding a step change, used to draw the step change as a vertical line with the LINEAR interpolation type- See Also:
-
piecewiseVisualSetRangePolicy
-
piecewiseFunctionInterpolationType
-
piecewiseFunctionExtractor
-
displayedRangeExtractor
-
axisLengthInPixelsExtractor
-
discretizeIfNecessaryExtractor
-
minPixelsPerPlotPointExtractor
-
currentArgumentExtractor
-
dataElementsOverrideProvider
Provider of the data elements displayed instead of the discretized PiecewiseFunction, null by default
-
-
Constructor Details
-
PiecewiseLineVisualSet
public PiecewiseLineVisualSet(String name, Supplier<PiecewiseFunction> piecewiseFunctionExtractor, Supplier<Pair<Double, Double>> displayedRangeExtractor, Supplier<Double> axisLengthInPixelsExtractor) Constructs a PiecewiseLineVisualSet with given name, piecewiseFunction extractor and discretization rule extractors.The extrapolation is disabled by default, as the data is already extended to the current argument (see
setCurrentArgumentExtractor(Supplier)).- Parameters:
name- visual set name is used to sort and name the visual sets on the chartpiecewiseFunctionExtractor- data elements list provider. The provider is invalidated every time the chart is being redrawndisplayedRangeExtractor- a function that specifies the rule for extracting a current displayed range on plotaxisLengthInPixelsExtractor- a function that specifies the rule for extracting an actual plot X-axis length in pixels
-
-
Method Details
-
setDataElementsOverrideProvider
public void setDataElementsOverrideProvider(Function<DoubleConsumer, List<Pair<Double, Double>>> dataElementsOverrideProvider) Sets a provider of the data elements (plot points) displayed instead of the discretized PiecewiseFunction, or null to display the discretized PiecewiseFunction. The provider accepts the consumer of the applied discretization factor (step), which must be called only if the data elements are discretized.Is used by the visual set container to display the visual set as a part of a stack.
- Parameters:
dataElementsOverrideProvider- the data elements provider or null
-
getDisplayedPlotPoints
protected List<Pair<Double,Double>> getDisplayedPlotPoints(DoubleConsumer appliedDiscretizationFactorConsumer) -
setPiecewiseFunctionExtractor
public PiecewiseLineVisualSet setPiecewiseFunctionExtractor(Supplier<PiecewiseFunction> piecewiseFunctionExtractor) Description copied from interface:IPiecewiseVisualSetSets data elements list provider. The provider is invalidated every time the chart is being redrawn.- Specified by:
setPiecewiseFunctionExtractorin interfaceIPiecewiseVisualSet- Parameters:
piecewiseFunctionExtractor- data elements list provider- Returns:
- reference to this object
-
setPiecewiseVisualSetRangePolicy
public PiecewiseLineVisualSet setPiecewiseVisualSetRangePolicy(PiecewiseVisualSetRangePolicy piecewiseVisualSetRangePolicy) Description copied from interface:IPiecewiseVisualSetSets anPiecewiseVisualSetRangePolicyfor the IPiecewiseVisualSet displayed on the chart.- Specified by:
setPiecewiseVisualSetRangePolicyin interfaceIPiecewiseVisualSet- Parameters:
piecewiseVisualSetRangePolicy- anPiecewiseVisualSetRangePolicyfor the IPiecewiseVisualSet displayed on the chart.- Returns:
- reference to this object
-
setDiscretizeIfNecessaryExtractor
public PiecewiseLineVisualSet setDiscretizeIfNecessaryExtractor(Supplier<Boolean> discretizeIfNecessaryExtractor) Description copied from interface:IPiecewiseVisualSetSets a function that specifies the necessity rule for discretization.- Specified by:
setDiscretizeIfNecessaryExtractorin interfaceIPiecewiseVisualSet- Parameters:
discretizeIfNecessaryExtractor- a function that specifies the necessity rule for discretization- Returns:
- reference to this object
-
setMinPixelsPerPlotPointExtractor
public PiecewiseLineVisualSet setMinPixelsPerPlotPointExtractor(Supplier<Integer> minPixelsPerPlotPointExtractor) Description copied from interface:IPiecewiseVisualSetSets a function that specifies the minimum pixels per plot point for discretization.- Specified by:
setMinPixelsPerPlotPointExtractorin interfaceIPiecewiseVisualSet- Parameters:
minPixelsPerPlotPointExtractor- a function that specifies the minimum pixels per plot point for discretization- Returns:
- reference to this object
-
setDisplayedRangeExtractor
public PiecewiseLineVisualSet setDisplayedRangeExtractor(Supplier<Pair<Double, Double>> displayedRangeExtractor) Description copied from interface:IPiecewiseVisualSetSets a function that specifies the rule for extracting a current displayed range on plot.- Specified by:
setDisplayedRangeExtractorin interfaceIPiecewiseVisualSet- Parameters:
displayedRangeExtractor- a function that specifies the rule for extracting a current displayed range on plot- Returns:
- reference to this object
-
setAxisLengthInPixelsExtractor
public PiecewiseLineVisualSet setAxisLengthInPixelsExtractor(Supplier<Double> axisLengthInPixelsExtractor) Description copied from interface:IPiecewiseVisualSetSets a function that specifies the rule for extracting an actual plot X-axis length in pixels.- Specified by:
setAxisLengthInPixelsExtractorin interfaceIPiecewiseVisualSet- Parameters:
axisLengthInPixelsExtractor- a function that specifies the rule for extracting an actual plot X-axis length in pixels- Returns:
- reference to this object
-
setPiecewiseFunctionInterpolationType
public PiecewiseLineVisualSet setPiecewiseFunctionInterpolationType(PiecewiseFunction.InterpolationType piecewiseFunctionInterpolationType) Description copied from interface:IPiecewiseVisualSetSets the InterpolationType e.g. the interpolation method between PiecewiseFunction grid points. InterpolationType.PEAK used by default.- Specified by:
setPiecewiseFunctionInterpolationTypein interfaceIPiecewiseVisualSet- Parameters:
piecewiseFunctionInterpolationType- the interpolation method between PiecewiseFunction grid points.- Returns:
- reference to this object
-
setCurrentArgumentExtractor
public PiecewiseLineVisualSet setCurrentArgumentExtractor(Supplier<Double> currentArgumentExtractor) Description copied from interface:IPiecewiseVisualSetSets a function that specifies the rule for extracting a current argument shown on plot.- Specified by:
setCurrentArgumentExtractorin interfaceIPiecewiseVisualSet- Parameters:
currentArgumentExtractor- a function that specifies the rule for extracting a current argument shown on plot- Returns:
- reference to this object
-
getCurrentArgument
public double getCurrentArgument()Description copied from interface:IPiecewiseVisualSetReturns a current argument shown on plot.- Specified by:
getCurrentArgumentin interfaceIPiecewiseVisualSet- Returns:
- a current argument shown on plot
-
getPiecewiseFunction
Description copied from interface:IPiecewiseVisualSetReturns data elements list provider.- Specified by:
getPiecewiseFunctionin interfaceIPiecewiseVisualSet- Returns:
- data elements list provider.
-
getPiecewiseVisualSetRangePolicy
Description copied from interface:IPiecewiseVisualSetReturns the PiecewiseVisualSetRangePolicy for discretization.- Specified by:
getPiecewiseVisualSetRangePolicyin interfaceIPiecewiseVisualSet- Returns:
- the PiecewiseVisualSetRangePolicy for discretization
-
isDiscretizeIfNecessary
public boolean isDiscretizeIfNecessary()Description copied from interface:IPiecewiseVisualSetReturns the necessity rule for discretization.- Specified by:
isDiscretizeIfNecessaryin interfaceIPiecewiseVisualSet- Returns:
- the necessity rule for discretization
-
getMinPixelsPerPlotPoint
public int getMinPixelsPerPlotPoint()Description copied from interface:IPiecewiseVisualSetReturns the minimum pixels per plot point for discretization.- Specified by:
getMinPixelsPerPlotPointin interfaceIPiecewiseVisualSet- Returns:
- the minimum pixels per plot point for discretization
-
getDisplayedRange
Description copied from interface:IPiecewiseVisualSetReturns a current displayed range on plot.- Specified by:
getDisplayedRangein interfaceIPiecewiseVisualSet- Returns:
- a current displayed range on plot
-
getAxisLengthInPixels
public double getAxisLengthInPixels()Description copied from interface:IPiecewiseVisualSetReturns an actual plot X-axis length in pixels.- Specified by:
getAxisLengthInPixelsin interfaceIPiecewiseVisualSet- Returns:
- an actual plot X-axis length in pixels
-
getPiecewiseFunctionInterpolationType
Description copied from interface:IPiecewiseVisualSetReturns the InterpolationType e.g. the interpolation method between PiecewiseFunction grid points.- Specified by:
getPiecewiseFunctionInterpolationTypein interfaceIPiecewiseVisualSet- Returns:
- the InterpolationType e.g. the interpolation method between PiecewiseFunction grid points.
-
updateMinMaxArguments
protected void updateMinMaxArguments()- Overrides:
updateMinMaxArgumentsin classVisualSet<Pair<Double,Double>>
-
setMinArgument
public void setMinArgument(double minArgument) - Specified by:
setMinArgumentin interfaceIPiecewiseVisualSet
-
setMaxArgument
public void setMaxArgument(double maxArgument) - Specified by:
setMaxArgumentin interfaceIPiecewiseVisualSet
-
getContents
Description copied from interface:IAbstractChartVisualSetReturns the list of visual set contents.- Specified by:
getContentsin interfaceIAbstractChartVisualSet- Overrides:
getContentsin classLineVisualSet<Pair<Double,Double>> - Returns:
- the list of visual set contents
-
getPlotPointsWithDiscretizationGrid
protected List<Pair<Double,Double>> getPlotPointsWithDiscretizationGrid(List<Pair<Double, Double>> plotPoints, double discretizationFactor) Restores the discretization grid points omitted by the PiecewiseFunction plot points (the plot points of the collinear segments are merged), so that every discretization step is represented by its own point. -
getStepContents
protected List<Pair<Double,Double>> getStepContents(List<Pair<Double, Double>> plotPoints, boolean peakDiscretized) Converts the PiecewiseFunction plot points to the data elements for the STEP interpolation type: a single point per argument, its value is held until the next argument. The value after the step change at the argument is used, or, for the PEAK discretization, the value before the step change at the next argument, i.e. the peak value of the discretization step. -
getLinearContents
Converts the PiecewiseFunction plot points to the data elements for the LINEAR interpolation type. The point preceding a step change is shifted to the left by a fraction of a pixel, so that the step change is drawn as a vertical line while the arguments remain strictly increasing. -
getStepChangeArgumentShift
protected double getStepChangeArgumentShift() -
setUpdatePolicy
Description copied from interface:IAbstractChartVisualSetSets the newVisualSet.UpdatePolicyi.e. the VisualSet update control rule.- Specified by:
setUpdatePolicyin interfaceIAbstractChartVisualSet- Specified by:
setUpdatePolicyin interfaceIUpdatePolicyPropertyOwner- Overrides:
setUpdatePolicyin classLineVisualSet<Pair<Double,Double>> - Parameters:
updatePolicy- newVisualSet.UpdatePolicyi.e. the VisualSet update control rule- Returns:
- reference to this object
-
getUpdatePolicy
Description copied from interface:IAbstractChartVisualSetReturn the currentVisualSet.UpdatePolicy.- Specified by:
getUpdatePolicyin interfaceIAbstractChartVisualSet- Specified by:
getUpdatePolicyin interfaceIUpdatePolicyPropertyOwner- Overrides:
getUpdatePolicyin classVisualSet<Pair<Double,Double>> - Returns:
- the current
VisualSet.UpdatePolicy
-
setLineDrawingPolicy
public PiecewiseLineVisualSet setLineDrawingPolicy(LineVisualSet.LineDrawingPolicy lineDrawingPolicy) Description copied from class:LineVisualSetSets the newLineVisualSet.LineDrawingPolicyi.e. the way to draw the elements of the plot.- Overrides:
setLineDrawingPolicyin classLineVisualSet<Pair<Double,Double>> - Parameters:
lineDrawingPolicy- newLineVisualSet.LineDrawingPolicyi.e. the way to draw the elements of the plot- Returns:
- reference to this object
-
setInterpolationType
public PiecewiseLineVisualSet setInterpolationType(LineVisualSet.InterpolationType interpolationType) Description copied from class:LineVisualSetSets the newLineVisualSet.InterpolationTypei.e. the interpolation type of the data for a given plot.- Overrides:
setInterpolationTypein classLineVisualSet<Pair<Double,Double>> - Parameters:
interpolationType- newLineVisualSet.InterpolationTypei.e. the interpolation type of the data for a given plot- Returns:
- reference to this object
-
setStackVisible
Description copied from class:LineVisualSetSets the visibility of a stack visual element. The stack is an element that fills the space between the plot and the zero Y-axis grid line.- Overrides:
setStackVisiblein classLineVisualSet<Pair<Double,Double>> - Parameters:
stackVisible- new visibility of a stack visual element- Returns:
- reference to this object
-
setStackFillColor
Description copied from class:LineVisualSetSets the color of a stack visual element. The stack is an element that fills the space between the plot and the zero Y-axis grid line.- Overrides:
setStackFillColorin classLineVisualSet<Pair<Double,Double>> - Parameters:
stackFillColor- new color of a stack visual element- Returns:
- reference to this object
-
setExtrapolation
Description copied from class:AbstractLineVisualSetSets the of the plot i.e. mode of extending a line to the maximum argument among all visual sets or to the current argument along the horizontal axis. Applicable only forAbstractLineVisualSet.- Overrides:
setExtrapolationin classLineVisualSet<Pair<Double,Double>> - Parameters:
extrapolation- theAbstractLineVisualSet.Extrapolationof the plot- Returns:
- reference to this object
-
setClipboardText
Description copied from interface:IClipboardTextPropertyOwnerSets the conversion method from values of each plot data element into text that will be copied to clipboard.- Specified by:
setClipboardTextin interfaceIClipboardTextPropertyOwner<Double>- Overrides:
setClipboardTextin classLineVisualSet<Pair<Double,Double>> - Parameters:
clipboardTextExtractor- an extractor that converts the value of each plot data element into text that will be copied to the clipboard- Returns:
- reference to this object
-
setLineColor
Description copied from class:AbstractLineVisualSetSets the line color of the plot. Transparent and semi-transparent colors are allowed.- Overrides:
setLineColorin classLineVisualSet<Pair<Double,Double>> - Parameters:
color- the line color of the plot- Returns:
- reference to this object
-
setTooltipText
public PiecewiseLineVisualSet setTooltipText(Function<Pair<Double, Double>, String> tooltipTextExtractor) Description copied from class:VisualSetAdds tooltip text to display when the mouse is hovered over a visual element representing given data element.- Overrides:
setTooltipTextin classLineVisualSet<Pair<Double,Double>> - Parameters:
tooltipTextExtractor- a function that specifies the rule for extracting a tooltip text from a data element- Returns:
- reference to this object
-
setLineWidth
Description copied from class:AbstractLineVisualSetSets the width of the line, in pixels.- Overrides:
setLineWidthin classLineVisualSet<Pair<Double,Double>> - Parameters:
width- the width of the line, in pixels- Returns:
- reference to this object
-
setPointSize
Description copied from class:AbstractLineVisualSetSets the diameter of the point, in pixels.- Overrides:
setPointSizein classLineVisualSet<Pair<Double,Double>> - Parameters:
pointSize- the diameter of the point, in pixels- Returns:
- reference to this object
-
setLegendText
Description copied from interface:ILegendNodePropertiesOwnerSets the legend label text represents this visual set.- Specified by:
setLegendTextin interfaceILegendNodePropertiesOwner- Overrides:
setLegendTextin classLineVisualSet<Pair<Double,Double>> - Parameters:
legendTextProvider- the legend label text represents this visual set- Returns:
- reference to this object
-
setPointsAndLinesStyle
public PiecewiseLineVisualSet setPointsAndLinesStyle(AbstractLineVisualSet.PointsAndLinesStyle pointsAndLinesStyle) Description copied from class:AbstractLineVisualSetSets theAbstractLineVisualSet.PointsAndLinesStyleof the plot i.e. the methodology of drawing the visual elements for data elements.- Overrides:
setPointsAndLinesStylein classLineVisualSet<Pair<Double,Double>> - Parameters:
pointsAndLinesStyle- theAbstractLineVisualSet.PointsAndLinesStyleof the plot i.e. the methodology of drawing the visual elements for data elements- Returns:
- reference to this object
-
setIncludeWhenCopyingToClipboard
public PiecewiseLineVisualSet setIncludeWhenCopyingToClipboard(Supplier<Boolean> includeWhenCopyingToClipboard) Description copied from interface:IClipboardTextPropertyOwnerSets the supplier of the property includeWhenCopyingToClipboard. If true, this VisualSet is included when chart's data is copying to clipboard.- Specified by:
setIncludeWhenCopyingToClipboardin interfaceIClipboardTextPropertyOwner<Double>- Overrides:
setIncludeWhenCopyingToClipboardin classLineVisualSet<Pair<Double,Double>> - Parameters:
includeWhenCopyingToClipboard- new supplier of property includeWhenCopyingToClipboard- Returns:
- reference to this object
-
setLineStyle
Description copied from class:AbstractLineVisualSetSets theLineStyleof the plot i.e. the methodology of drawing the lines for data elements.- Overrides:
setLineStylein classLineVisualSet<Pair<Double,Double>> - Parameters:
lineStyle- theLineStyleof the plot i.e. the methodology of drawing the lines for data elements- Returns:
- reference to this object
-
setMaxValue
Description copied from class:AbstractLineVisualSetSets the supplier of max value. This value allows to set some "natural" max value of the data being displayed It will be used when scaling the Y-axis of the chart.- Overrides:
setMaxValuein classLineVisualSet<Pair<Double,Double>> - Parameters:
maxValueProvider- the supplier of max value- Returns:
- reference to this object
-
addContextMenuHandler
public PiecewiseLineVisualSet addContextMenuHandler(VisualSet.ContextMenuHandler<Pair<Double, Double>> contextMenuHandler) Description copied from class:VisualSetAdds the action to be executed every time a context menu for given data element is called.- Overrides:
addContextMenuHandlerin classLineVisualSet<Pair<Double,Double>> - Parameters:
contextMenuHandler- context menu call action- Returns:
- reference to this object
-
addMouseEnterHandler
public PiecewiseLineVisualSet addMouseEnterHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time mouse enters to any visual element borders.- Overrides:
addMouseEnterHandlerin classLineVisualSet<Pair<Double,Double>> - Parameters:
handler- new mouse enter action- Returns:
- reference to this object
-
addMouseExitHandler
public PiecewiseLineVisualSet addMouseExitHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time the mouse exits the previously entered element's bounds.- Overrides:
addMouseExitHandlerin classLineVisualSet<Pair<Double,Double>> - Parameters:
handler- new mouse exit action- Returns:
- reference to this object
-
addMousePressedHandler
public PiecewiseLineVisualSet addMousePressedHandler(BiConsumer<Pair<Double, Double>, MouseEvent> handler) Description copied from class:VisualSetAdds the action to be executed every time a mouse button is pressed.- Overrides:
addMousePressedHandlerin classLineVisualSet<Pair<Double,Double>> - Parameters:
handler- new mouse button pressed action- Returns:
- reference to this object
-
addVisibilityChangeHandler
public PiecewiseLineVisualSet addVisibilityChangeHandler(Consumer<VisibilityChangeDescriptor<? extends IAbstractChartVisualSet>> visibilityChangeHandler) Description copied from interface:IAbstractChartVisualSetAdds the action to be executed every time the visibility of this VisualSet is changed.- Specified by:
addVisibilityChangeHandlerin interfaceIAbstractChartVisualSet- Overrides:
addVisibilityChangeHandlerin classLineVisualSet<Pair<Double,Double>> - Parameters:
visibilityChangeHandler- visibility change action- Returns:
- reference to this object
-
setMouseTransparent
Description copied from interface:IAbstractChartVisualSetSets the value of the property mouseTransparent. If true, this VisualSet is completely transparent to mouse events. When choosing target for mouse event, VisualSets with mouseTransparent set to true won't be taken into account.- Specified by:
setMouseTransparentin interfaceIAbstractChartVisualSet- Overrides:
setMouseTransparentin classLineVisualSet<Pair<Double,Double>> - Parameters:
mouseTransparent- new value of property mouseTransparent- Returns:
- reference to this object
-