public class BubbleChart<X,Y> extends XYChart<X,Y>
alternativeColumnFillVisibleProperty, alternativeRowFillVisibleProperty, dataProperty, horizontalGridLinesVisibleProperty, horizontalZeroLineVisibleProperty, verticalGridLinesVisibleProperty, verticalZeroLineVisibleProperty
animatedProperty, legendProperty, legendSideProperty, legendVisibleProperty, titleProperty, titleSideProperty
XYChart.Data<X,Y>, XYChart.Series<X,Y>
DEFAULT_COLOR, seriesColorMap
useChartContentMirroring
Constructor and Description |
---|
BubbleChart(Axis<X> xAxis,
Axis<Y> yAxis)
Construct a new BubbleChart with the given axis.
|
BubbleChart(Axis<X> xAxis,
Axis<Y> yAxis,
<any> data)
Construct a new BubbleChart with the given axis and data.
|
Modifier and Type | Method and Description |
---|---|
private Node |
createBubble(XYChart.Series<X,Y> series,
int seriesIndex,
XYChart.Data<X,Y> item,
int itemIndex)
Create a Bubble for a given data item if it doesn't already have a node
|
(package private) LegendItem |
createLegendItemForSeries(XYChart.Series<X,Y> series,
int seriesIndex)
Called by the updateLegend for each series in the chart in order to
create new legend item
|
protected void |
dataItemAdded(XYChart.Series<X,Y> series,
int itemIndex,
XYChart.Data<X,Y> item)
Called when a data item has been added to a series.
|
protected void |
dataItemChanged(XYChart.Data<X,Y> item)
Called when a data item has changed, ie its xValue, yValue or extraValue has changed.
|
protected void |
dataItemRemoved(XYChart.Data<X,Y> item,
XYChart.Series<X,Y> series)
Called when a data item has been removed from data model but it is still visible on the chart.
|
private static double |
getDoubleValue(java.lang.Object number,
double nullDefault)
Used to get a double value from a object that can be a Number object or null
|
protected void |
layoutPlotChildren()
Called to update and layout the plot children.
|
protected void |
seriesAdded(XYChart.Series<X,Y> series,
int seriesIndex)
A series has been added to the charts data model.
|
protected void |
seriesRemoved(XYChart.Series<X,Y> series)
A series has been removed from the data model but it is still visible on the chart.
|
protected void |
updateAxisRange()
This is called when the range has been invalidated and we need to update it.
|
alternativeColumnFillVisibleProperty, alternativeRowFillVisibleProperty, createSeriesRemoveTimeLine, currentDisplayedExtraValueProperty, currentDisplayedXValueProperty, currentDisplayedYValueProperty, dataBeingRemovedIsAdded, dataProperty, getClassCssMetaData, getCssMetaData, getCurrentDisplayedExtraValue, getCurrentDisplayedXValue, getCurrentDisplayedYValue, getData, getDataSize, getDisplayedDataIterator, getDisplayedSeriesIterator, getPlotChildren, getSeriesIndex, getSeriesSize, getVerticalGridLinesVisible, getXAxis, getYAxis, horizontalGridLinesVisibleProperty, horizontalZeroLineVisibleProperty, isAlternativeColumnFillVisible, isAlternativeRowFillVisible, isHorizontalGridLinesVisible, isHorizontalZeroLineVisible, isVerticalZeroLineVisible, layoutChartChildren, removeDataItemFromDisplay, removeSeriesFromDisplay, seriesBeingRemovedIsAdded, seriesChanged, setAlternativeColumnFillVisible, setAlternativeRowFillVisible, setCurrentDisplayedExtraValue, setCurrentDisplayedXValue, setCurrentDisplayedYValue, setData, setHorizontalGridLinesVisible, setHorizontalZeroLineVisible, setVerticalGridLinesVisible, setVerticalZeroLineVisible, updateLegend, verticalGridLinesVisibleProperty, verticalZeroLineVisibleProperty
animate, animate, animatedProperty, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAnimated, getChartChildren, getLegend, getLegendSide, getTitle, getTitleSide, isLegendVisible, layoutChildren, legendProperty, legendSideProperty, legendVisibleProperty, requestChartLayout, setAnimated, setLegend, setLegendSide, setLegendVisible, setTitle, setTitleSide, shouldAnimate, titleProperty, titleSideProperty
public BubbleChart(Axis<X> xAxis, Axis<Y> yAxis)
xAxis
- The x axis to useyAxis
- The y axis to usepublic BubbleChart(Axis<X> xAxis, Axis<Y> yAxis, <any> data)
xAxis
- The x axis to useyAxis
- The y axis to usedata
- The data to use, this is the actual list used so any changes to it will be reflected in the chartprivate static double getDoubleValue(java.lang.Object number, double nullDefault)
number
- Object possibly a instance of NumbernullDefault
- What value to return if the number object is null or not a Numberprotected void layoutPlotChildren()
layoutPlotChildren
in class XYChart<X,Y>
protected void dataItemAdded(XYChart.Series<X,Y> series, int itemIndex, XYChart.Data<X,Y> item)
XYChart
dataItemAdded
in class XYChart<X,Y>
series
- The series the data item was added toitemIndex
- The index of the new item within the seriesitem
- The new data item that was addedprotected void dataItemRemoved(XYChart.Data<X,Y> item, XYChart.Series<X,Y> series)
XYChart
dataItemRemoved
in class XYChart<X,Y>
item
- The item that has been removed from the seriesseries
- The series the item was removed fromprotected void dataItemChanged(XYChart.Data<X,Y> item)
dataItemChanged
in class XYChart<X,Y>
item
- The data item who was changedprotected void seriesAdded(XYChart.Series<X,Y> series, int seriesIndex)
XYChart
seriesAdded
in class XYChart<X,Y>
series
- The series that has been addedseriesIndex
- The index of the new seriesprotected void seriesRemoved(XYChart.Series<X,Y> series)
XYChart
seriesRemoved
in class XYChart<X,Y>
series
- The series that has been removedprivate Node createBubble(XYChart.Series<X,Y> series, int seriesIndex, XYChart.Data<X,Y> item, int itemIndex)
series
- seriesIndex
- The index of the series containing the itemitem
- The data item to create node foritemIndex
- The index of the data item in the seriesprotected void updateAxisRange()
updateAxisRange
in class XYChart<X,Y>
LegendItem createLegendItemForSeries(XYChart.Series<X,Y> series, int seriesIndex)
XYChart
createLegendItemForSeries
in class XYChart<X,Y>
series
- the series for this legend itemseriesIndex
- the index of the series