Class HistoGraph
Object
UIObject
Widget
Panel
SimplePanel
FocusPanel
AbstractGraph<double[]>
HistoGraph
- All Implemented Interfaces:
HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasClickHandlers, HasContextMenuHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, MouseDownHandler, MouseMoveHandler, MouseOutHandler, MouseUpHandler, MouseWheelHandler, TouchEndHandler, TouchMoveHandler, TouchStartHandler, HasAttachHandlers, EventHandler, HasHandlers, EventListener, AcceptsOneWidget, Focusable, HasFocus, HasOneWidget, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IsWidget, RequiresResize, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents, SourcesMouseWheelEvents, Iterable<Widget>, BasicTooltipProvider, ContextMenu.Listener, ContextMenu.Provider, Tooltip.Provider
A histogram graph used to render and interact with binned data.
HistoGraph renders a histogram from a backing two-dimensional
double[][] data array. Each HistoGraph instance references a specific
row in that array (the row index) and therefore multiple HistoGraph
instances may share the same underlying data buffer but operate on different
rows. The number of bins rendered is determined by the length of the
referenced data row.
Data model and normalization
- The backing data is a
double[][]provided viasetData(double[][]). The graph uses the configuredrowto access its own bin values. - Normalization may be controlled in two mutually exclusive ways:
setNormalized(boolean)toggles normalization relative to the graph's sample count (nSamples). If enabled, values returned bygetData(int)are already normalized.setNormalized(int)setsnormIdx, a separate data row used to normalize per-bin values (per-bin denominators are read from that row). WhennormIdx >= 0normalization uses the values in the specified row and the graph will render values asdata[row][i] / data[normIdx][i].
setNormalized(boolean)withtrueclears a previously setnormIdxand vice versa — these modes conflict. nSamplestracks the total number of added samples;addData(int)andaddData(double)increment this counter (and update normalization row whennormIdx >= 0).
Bins, range and dynamic resizing
- The graph maps an x-coordinate to a bin via
x2bin(double)and maps bin indices back to an x-coordinate (bin center) withbin2x(int). - Several behaviors assume the number of bins (
nBins) is even:doubleMinRange()anddoubleMaxRange()fold and shift bin contents when the numeric x-range must be doubled. These methods require thatnBinsis even; this is a precondition for correct range-doubling. addData(double)will automatically expand the numeric x-range when a value falls outside the currentstyle.xMin..style.xMaxrange by repeatedly calling the range-doubling helpers until the value fits. The number of bins remains constant during these range changes.
Rendering and autoscaling
- The
paint(boolean)method draws the histogram bars using the currentstyle(colors, frame, axis ranges). Ifstyle.autoscaleYis enabled the graph will adaptstyle.yMinandstyle.yMaxautomatically based on the observed data values or the configured normalization row. - When autoscaling normalized data the graph uses a fixed table of
thresholds (see the private
autoscalematrix) to pick a convenient set of y-levels and step values; when data exceeds 1.0 it rounds up/down to "nice" boundaries. - Bars are clipped and mapped into pixel space using
boundsand the current y-range; rendering ensures minimal visible height for very small values.
Markers and interactivity
- Markers (inner class
HistoGraph.Marker) annotate the histogram at an x-coordinate and are drawn as vertical lines spanning bin boundaries. Markers can have a color, description and optional dash pattern (linestyle). Markers are added withaddMarker(double, String, String)(or the overload that accepts a dash pattern) and cleared withclearMarkers(). - When markers are drawn the bin they hit is saved into
HistoGraph.Marker.binwhich allows the graph to include marker descriptions in tooltips. - The graph provides tooltip text for a pixel coordinate via
getTooltipAt(int, int)and for a bin index viagetTooltipAt(int). Tooltip content varies by the histogramview.type(degree, fitness, trait and several statistics types have specialized tooltip formats). - Context menu support includes a check-box item for toggling autoscaling
of the y-axis; it can be enabled/disabled via
enableAutoscaleYMenu(boolean).
Usage notes and important constraints
- Because the data array may be shared across multiple HistoGraph instances, callers must take care when manipulating the shared data buffer concurrently.
- The range-doubling implementation assumes an even
nBins. Using an odd number of bins will breakdoubleMinRange()/doubleMaxRange(). - Most methods guard against a
nulldata array; however many operations are no-ops or return default values (e.g.-1for missing bins) when no data is set.
- Author:
- Christoph Hauert
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassMarker for highlighting a specific bin in the histogram.Nested classes/interfaces inherited from class AbstractGraph
AbstractGraph.HasLogScaleY, AbstractGraph.HasTrajectory, AbstractGraph.MyContext2d, AbstractGraph.Shifter, AbstractGraph.Shifting, AbstractGraph.ZoomCommand, AbstractGraph.Zoomer, AbstractGraph.ZoomingNested classes/interfaces inherited from class UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface HasWidgets
HasWidgets.ForIsWidget -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final double[][]The list of thresholds for automatically scaling the y-axis.private intThe index of the current autoscale setting.private ContextMenuCheckBoxItemThe context menu to select autoscaling of the y-axis.private ArrayList<HistoGraph.Marker> The list of markers for the histogram.(package private) double[][]The data array backing the histogram.private booleanThe flag to indicate whether the autoscale y-axis menu is enabled.private booleanThe flag to indicate whether the data is normalized.static final intThe maximum number of bins for the histogram.(package private) StringThe message to display if no histogram is available.static final intThe minimum width of a bin.(package private) intThe number of bins.private intThe index of the data row used for normalization.(package private) doubleThe number of samples in the histogram.(package private) intThe index of the data row.Fields inherited from class AbstractGraph
bounds, buffer, canvas, colors, contextMenu, CSS_CURSOR_MOVE_VIEW, CURSOR_GRAB_NODE_CLASS, CURSOR_MOVE_NODE_CLASS, CURSOR_ZOOM_IN_CLASS, CURSOR_ZOOM_OUT_CLASS, DEFAULT_BUFFER_SIZE, doubleClickHandler, element, g, hasMessage, hasZoom, leftMouseButton, logger, logYMenu, markerColors, markers, MIN_BUFFER_SIZE, MIN_MSEC_BETWEEN_UPDATES, module, mouseDownHandler, mouseMoveHandler, mouseOutHandler, mouseUpHandler, mouseWheelHandler, mouseX, mouseY, PIHALF, pinchDist, pinchX, pinchY, scale, shifter, style, tooltip, tooltipProvider, touchEndHandler, touchEndTime, touchMoveHandler, touchStartHandler, updatetime, view, viewCorner, wrapper, zoomer, zoomFactor, zoomInertiaTimer, zoomInMenu, zoomOutMenu, zoomResetMenuFields inherited from class UIObject
DEBUG_ID_PREFIXFields inherited from interface BasicTooltipProvider
TABLE_CELL_BULLET, TABLE_CELL_NEXT, TABLE_CELL_NEXT_COLOR, TABLE_END, TABLE_ROW_END, TABLE_ROW_START, TABLE_ROW_START_COLOR, TABLE_ROW_START_RIGHT, TABLE_SEPARATOR, TABLE_STYLE -
Constructor Summary
ConstructorsConstructorDescriptionHistoGraph(Histogram view, Module<?> module, int row) Create new histogram graph formodulerunning inview. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddData(double x) Add data pointxto histogram.voidaddData(int bin) Add data point to histogram by increasing the count of the bin with indexbinby one.voidaddData(int bin, double incr) Add data point to histogram by increasing the count of the bin with indexbinbyincr.voidAdd marker to histogram atxwith colorcolorand descriptiondescr.voidAdd marker to histogram atxwith colorcolor, descriptiondescr, and linestylelinestyle.private voidappendBinTooltip(StringBuilder tip, int bar) Append tooltip for bin at mouse coordinates.private voidappendTipDegree(StringBuilder tip, int bar) Append degree tooltip.private voidappendTipFixProb(StringBuilder tip, int bar) Append fixation probability tooltip.private voidappendTipFixTime(StringBuilder tip, int bar) Append fixation time tooltip.private voidappendTipStationary(StringBuilder tip, int bar) Append stationary distribution tooltip.doublebin2x(int bin) Convert the bin index tox-coordinate.voidClear the histrogram data.voidClear all markers from the histogram.voidClear the message.private double[]computeNormBounds(double[] myData, double[] norm) Compute min/max from per-bin normalization row; returns {yMin, yMax}.private voidDouble the range of the histogram by increasing the maximum value.private voidDouble the range of the histogram by lowering the minimum value.private voiddrawBars(double[] myData, double[] norm, double barwidth, double h, double map) Draw bars for the histogram using either per-bin normalization row or global normalization flag.protected voidDraw the marked bins.voidenableAutoscaleYMenu(boolean enable) Enable or disable the autoscale y-axis menu.voidExport the graphical contextctx.intgetBinAt(int x, int y) Get the index of the bin at(x, y).double[][]getData()Get the data for the histogram.doublegetData(int idx) Get the data for the histogram in bin with indexidx.intCalculate the maximum number of bins for the histogram with a width of at leastMIN_BIN_WIDTH.getNoteAt(int bin) Get the description of the marker at binbinornullif no marker is set.doubleGet the number of samples for this histogram.doublegetSamples(int idx) Get the total number of samples in bin with indexidx.getTooltipAt(int bar) Get the tooltip for the location with indexindex.getTooltipAt(int x, int y) Get the tooltip information for the location with coordinates(x, y).private voidhandleLargeYMax(double yMax, double[] myData) Handle the case whereyMax > 1.0by rounding the maximum up if necessary and determining/roundingyMinwhen applicable.private inthandleSmallYMax(double yMax) Handle the case whereyMax <= 1.0by selecting an autoscale index and updatingGraphStyle.yMax.protected voidonLoad()booleanpaint(boolean force) Draw the graph.voidpopulateContextMenuAt(ContextMenu menu, int x, int y) Populate context menumenuin listening widget at (relative) position(x,y).voidreset()Reset the graph.private intselectAutoscaleIndexForYMax(double yMax) Adjustautoscaleidxto match the givenyMax.voidsetData(double[][] data) Set the data for the histogram.voidsetNormalized(boolean isNormalized) Set whether the data is normalized.voidsetNormalized(int normIdx) Set the index of the data row that is used for normalization.intx2bin(double x) Convertx-coordinate to bin index.Methods inherited from class AbstractGraph
activate, addContextMenuHandler, autoscale, calcBounds, calcBounds, clearCanvas, clearGraph, clearHistory, contains, convertToScaledCoordinates, convertToScaledCoordinates, deactivate, displayMessage, doUpdate, drawFrame, drawFrame, fill, fillCircle, fillCircle, fillCircle, fillRect, fillTextVertical, getBuffer, getModule, getStyle, hasHistory, hasMessage, init, onMouseDown, onMouseMove, onMouseOut, onMouseUp, onMouseWheel, onResize, onTouchEnd, onTouchMove, onTouchStart, onUnload, paint, parse, prependTime2Data, resetTransforms, setBufferCapacity, setColors, setFont, setLogY, setMarkers, setMarkers, setStrokeStyleAt, setTooltipProvider, shift, stroke, strokeCircle, strokeCircle, strokeCircle, strokeLine, strokeLine, strokeRect, zoom, zoom, zoom, zoomMethods inherited from class FocusPanel
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus, setTabIndexMethods inherited from class SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidgetMethods inherited from class Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeMethods inherited from class Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BasicTooltipProvider
getTooltipAtMethods inherited from interface ContextMenu.Listener
getAbsoluteLeft, getAbsoluteTopMethods inherited from interface HasHandlers
fireEventMethods inherited from interface HasTouchCancelHandlers
addTouchCancelHandlerMethods inherited from interface HasTouchEndHandlers
addTouchEndHandlerMethods inherited from interface HasTouchMoveHandlers
addTouchMoveHandlerMethods inherited from interface HasTouchStartHandlers
addTouchStartHandlerMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
autoscale
private static final double[][] autoscaleThe list of thresholds for automatically scaling the y-axis. The first element of each row is the maximum value for the y-axis, the second element is the minimum value for the y-axis, and the third element is the number of levels for the y-axis.For example, the scale changes from
0-1with 4 levels to0-0.5with 5 levels if the maximum value drops below0.4. -
autoscaleidx
private int autoscaleidxThe index of the current autoscale setting. -
binmarkers
The list of markers for the histogram. -
data
double[][] dataThe data array backing the histogram. This may be shared by multipleHistoGraphs, each accessing a different row in the array. -
row
int rowThe index of the data row. -
message
String messageThe message to display if no histogram is available. -
isNormalized
private boolean isNormalizedThe flag to indicate whether the data is normalized. -
normIdx
private int normIdxThe index of the data row used for normalization. -
nSamples
double nSamplesThe number of samples in the histogram. -
nBins
int nBinsThe number of bins.- See Also:
- Implementation Notes:
- The number of bins needs to be even for doubling the range of the histogram.
-
MAX_BINS
public static final int MAX_BINSThe maximum number of bins for the histogram.- See Also:
-
MIN_BIN_WIDTH
public static final int MIN_BIN_WIDTHThe minimum width of a bin.- See Also:
-
autoscaleYMenu
The context menu to select autoscaling of the y-axis. -
enableAutoscaleYMenu
private boolean enableAutoscaleYMenuThe flag to indicate whether the autoscale y-axis menu is enabled.
-
-
Constructor Details
-
HistoGraph
Create new histogram graph formodulerunning inview. The row is used to identify data entries that apply to this histogram and represents the index of the data row.- Parameters:
view- the view of this graphmodule- the module backing the graphrow- the index of the data row
-
-
Method Details
-
addMarker
-
addMarker
Add marker to histogram atxwith colorcolor, descriptiondescr, and linestylelinestyle.- Parameters:
x- thex-coordinate of the markercolor- the color of the markerdescr- the description of the markerlinestyle- the linestyle of the marker
-
clearMarkers
public void clearMarkers()Clear all markers from the histogram. -
getNoteAt
Get the description of the marker at binbinornullif no marker is set.- Parameters:
bin- the index of the bin- Returns:
- the description of the marker
-
onLoad
protected void onLoad()- Overrides:
onLoadin classAbstractGraph<double[]>
-
getMaxBins
public int getMaxBins()Calculate the maximum number of bins for the histogram with a width of at leastMIN_BIN_WIDTH.- Returns:
- the maximum number of bins
- See Also:
-
setNormalized
public void setNormalized(boolean isNormalized) Set whether the data is normalized. IfisNormalizedistrue, the sum of the data in each bin is normalized to1.0.
Note: This conflicts withsetNormalized(int).- Parameters:
isNormalized-trueif the data is normalized,falseotherwise
-
setNormalized
public void setNormalized(int normIdx) Set the index of the data row that is used for normalization. If multipleHistoGraphs share the same data, they all need to use the same row for normalization.
Note: This conflicts withsetNormalized(boolean).- Parameters:
normIdx- the index of the data row for normalization
-
getSamples
public double getSamples()Get the number of samples for this histogram.- Returns:
- the number of samples
-
getSamples
public double getSamples(int idx) Get the total number of samples in bin with indexidx. For data that is not normalized the number of samples is returned.- Parameters:
idx- the index of the bin- Returns:
- the number of samples
- See Also:
-
getData
public double[][] getData()Get the data for the histogram.
Note: The data may be shared by multipleHistoGraphs, each refering to a row in thedouble[][]array specified by the graphsrow.- Returns:
- the 2D data array for storing the histogram data
-
getData
public double getData(int idx) Get the data for the histogram in bin with indexidx. Whether this returns raw or normalized data depends on the setting of the graph.- Parameters:
idx- the index of the bin- Returns:
- the histogram data for the bin
idx - See Also:
-
setData
public void setData(double[][] data) Set the data for the histogram.
Note: The data may be shared by multipleHistoGraphs, each refering to a row in thedouble[][]array specified by the graphsrow.- Parameters:
data- the 2D data array for storing the histogram data
-
addData
public void addData(int bin) Add data point to histogram by increasing the count of the bin with indexbinby one. For normalized data the normalization is updated accordingly.- Parameters:
bin- the index of the bin in the histogram- See Also:
-
addData
public void addData(int bin, double incr) Add data point to histogram by increasing the count of the bin with indexbinbyincr. For normalized data the normalization is updated accordingly.- Parameters:
bin- the index of the bin in the histogramincr- the increment to add to the bin- See Also:
-
addData
public void addData(double x) Add data pointxto histogram. The data point is added to the histogram for \(x\in[x_\text{min},x_\text{max}]\). If \(x>x_\text{max}]\) or \(x<x_\text{min}]\) the range is doubled to \([x_\text{min}, x_\text{max} + (x_\text{max}-x_\text{min})]\)) or \([x_\text{min} - (x_\text{max}-x_\text{min}), x_\text{max}]\)), respectively. The number of bins remains unchanged.
Important: The number of bins needs to be even!- Parameters:
x- the new data point- See Also:
-
clearData
public void clearData()Clear the histrogram data. -
doubleMinRange
private void doubleMinRange()Double the range of the histogram by lowering the minimum value.- Implementation Notes:
- The number of bins needs to be even!
-
doubleMaxRange
private void doubleMaxRange()Double the range of the histogram by increasing the maximum value.- Implementation Notes:
- The number of bins needs to be even!
-
x2bin
public int x2bin(double x) Convertx-coordinate to bin index.- Parameters:
x- thex-coordinate- Returns:
- the index of the bin
-
bin2x
public double bin2x(int bin) Convert the bin index tox-coordinate.- Parameters:
bin- the index of the bin- Returns:
- the
x-coordinate
-
reset
public void reset()Description copied from class:AbstractGraphReset the graph. Clear canvas and messages.- Overrides:
resetin classAbstractGraph<double[]>
-
export
Description copied from class:AbstractGraphExport the graphical contextctx.- Specified by:
exportin classAbstractGraph<double[]>- Parameters:
ctx- the graphical context to export
-
clearMessage
public void clearMessage()Description copied from class:AbstractGraphClear the message.- Overrides:
clearMessagein classAbstractGraph<double[]>
-
paint
public boolean paint(boolean force) Description copied from class:AbstractGraphDraw the graph. For re-drawing the graph, setforcetotrue.- Overrides:
paintin classAbstractGraph<double[]>- Parameters:
force-trueto force re-drawing of graph- Returns:
trueif painting skipped
-
handleSmallYMax
private int handleSmallYMax(double yMax) Handle the case whereyMax <= 1.0by selecting an autoscale index and updatingGraphStyle.yMax.- Parameters:
yMax- observed maximum bin height- Returns:
- number of y-levels to use
-
handleLargeYMax
private void handleLargeYMax(double yMax, double[] myData) Handle the case whereyMax > 1.0by rounding the maximum up if necessary and determining/roundingyMinwhen applicable.- Parameters:
yMax- observed maximum bin heightmyData- histogram counts
-
computeNormBounds
private double[] computeNormBounds(double[] myData, double[] norm) Compute min/max from per-bin normalization row; returns {yMin, yMax}. If no valid normalization entries are found returns {0.0, 1.0}.- Parameters:
myData- histogram countsnorm- per-bin normalization data- Returns:
- two-element array {yMin, yMax}
-
selectAutoscaleIndexForYMax
private int selectAutoscaleIndexForYMax(double yMax) Adjustautoscaleidxto match the givenyMax.- Parameters:
yMax- observed maximum bin height- Returns:
- number of y-levels for the selected autoscale row
-
drawBars
private void drawBars(double[] myData, double[] norm, double barwidth, double h, double map) Draw bars for the histogram using either per-bin normalization row or global normalization flag.- Parameters:
myData- histogram valuesnorm- per-bin normalization data (may benull)barwidth- width of a bar in pixelsh- total graph heightmap- conversion factor from value to pixels
-
drawMarkers
protected void drawMarkers()Draw the marked bins. -
getBinAt
public int getBinAt(int x, int y) Get the index of the bin at(x, y). Returns-1if no bin is found.- Parameters:
x- thex-coordinatey- they-coordinate- Returns:
- the index of the bin
-
getTooltipAt
Description copied from interface:Tooltip.ProviderGet the tooltip information for the location with coordinates(x, y). The returned string may include HTML elements for formatting.- Specified by:
getTooltipAtin interfaceTooltip.Provider- Parameters:
x- thex-coordinate for the tooltipy- they-coordinate for the tooltip- Returns:
- the (formatted) string with the tooltip info
-
getTooltipAt
Description copied from interface:BasicTooltipProviderGet the tooltip for the location with indexindex. The index typically refers to an individual node but may equally refer to a location on a lattice for PDE models or trait distributions.- Specified by:
getTooltipAtin interfaceBasicTooltipProvider- Parameters:
bar- theindexof the location- Returns:
- the tooltip
-
appendTipDegree
Append degree tooltip.- Parameters:
tip- the tooltip string builderbar- the bar index
-
appendBinTooltip
Append tooltip for bin at mouse coordinates.- Parameters:
tip- the tooltip string builderbar- the bar index
-
appendTipFixProb
Append fixation probability tooltip.- Parameters:
tip- the tooltip string builderbar- the bar index
-
appendTipFixTime
Append fixation time tooltip.- Parameters:
tip- the tooltip string builderbar- the bar index
-
appendTipStationary
Append stationary distribution tooltip.- Parameters:
tip- the tooltip string builderbar- the bar index
-
enableAutoscaleYMenu
public void enableAutoscaleYMenu(boolean enable) Enable or disable the autoscale y-axis menu.- Parameters:
enable-trueto enable the autoscale menu
-
populateContextMenuAt
Description copied from class:AbstractGraphPopulate context menumenuin listening widget at (relative) position(x,y).Adds buffer size menu and queries the view to add further functionality.
- Specified by:
populateContextMenuAtin interfaceContextMenu.Provider- Overrides:
populateContextMenuAtin classAbstractGraph<double[]>- Parameters:
menu- context menu entries are added herex- horizontal coordinate (relative to listening widget)y- horizontal coordinate (relative to listening widget)- See Also:
-