BarChart that plots bars indicating
data values for a category. The bars can be vertical or horizontal depending
on which axis is a category axis.
The bar for each series is stacked on top of the previous series.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ListChangeListener | |
| private CategoryAxis | |
| private DoubleProperty | categoryGap
The gap to leave between bars in separate categories |
| private static final PseudoClass | HORIZONTAL_PSEUDOCLASS_STATE
Pseudoclass indicating this is a horizontal chart. |
| private final Orientation | |
| private ParallelTransition | |
| private Map | |
| private ValueAxis | |
| private static final PseudoClass | VERTICAL_PSEUDOCLASS_STATE
Pseudoclass indicating this is a vertical chart. |
| Access | Constructor and Description |
|---|---|
| public | StackedBarChart(Axis<X>
The x axis to use xAxis, Axis<Y> The y axis to use yAxis)Construct a new StackedBarChart with the given axis. |
| public | StackedBarChart(Axis<X>
The x axis to use xAxis, Axis<Y> The y axis to use yAxis, ObservableList<XYChart.The data to use, this is the actual list used so any changes to it will be reflected in the chart dataConstruct a new StackedBarChart with the given axis and data. |
| public | StackedBarChart(Axis<X>
The x axis to use xAxis, Axis<Y> The y axis to use yAxis, ObservableList<XYChart.The data to use, this is the actual list used so any changes to it will be reflected in the chart data,The gap to leave between bars in separate categories categoryGap)Construct a new StackedBarChart with the given axis and data. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public DoubleProperty | |
| private Node | |
| private Timeline | |
| pack-priv Legend. | createLegendItemForSeries(XYChart.
the series for this legend item series,the index of the series seriesIndex)Overrides javafx. Called by the updateLegend for each series in the chart in order to create new legend item |
| protected void | dataItemAdded(XYChart.
The series the data item was added to series,The index of the new item within the series itemIndex, XYChart.The new data item that was added itemImplements abstract javafx. Called when a data item has been added to a series. |
| protected void | dataItemChanged(XYChart.
The data item who was changed itemImplements abstract javafx. Called when a data item has changed, ie its xValue, yValue or extraValue has changed. |
| protected void | dataItemRemoved(final XYChart.
The item that has been removed from the series item,The series the item was removed from seriesImplements abstract javafx. Called when a data item has been removed from data model but it is still visible on the chart. |
| public double | |
| public static List | Returns: theCssMetaDataHides javafx. Gets the |
| public List | getCssMetaData()
Overrides javafx. Implements javafx. This method should delegate to |
| private List | |
| protected void | layoutPlotChildren()
Implements abstract javafx. Called to update and layout the plot children. |
| private void | |
| protected void | seriesAdded(XYChart.
The series that has been added series,The index of the new series seriesIndex)Implements abstract javafx. A series has been added to the charts data model. |
| pack-priv void | seriesBeingRemovedIsAdded(XYChart.
Overrides javafx. This method is called when there is an attempt to add series that was set to be removed, and the removal might not have completed. |
| protected void | seriesChanged(ListChangeListener.
a Change instance representing the changes to the series cOverrides javafx. Called when each atomic change is made to the list of series for this chart |
| protected void | seriesRemoved(final XYChart.
The series that has been removed seriesImplements abstract javafx. A series has been removed from the data model but it is still visible on the chart. |
| public void | |
| protected void | updateAxisRange()
Overrides javafx. This is called when the range has been invalidated and we need to update it. |
| private void |
| categoriesListener | back to summary |
|---|---|
| private ListChangeListener<String> categoriesListener | |
| categoryAxis | back to summary |
|---|---|
| private CategoryAxis categoryAxis | |
| categoryGap | back to summary |
|---|---|
| private DoubleProperty categoryGap The gap to leave between bars in separate categories | |
| HORIZONTAL_PSEUDOCLASS_STATE | back to summary |
|---|---|
| private static final PseudoClass HORIZONTAL_PSEUDOCLASS_STATE Pseudoclass indicating this is a horizontal chart. | |
| orientation | back to summary |
|---|---|
| private final Orientation orientation | |
| parallelTransition | back to summary |
|---|---|
| private ParallelTransition parallelTransition | |
| seriesCategoryMap | back to summary |
|---|---|
| private Map<XYChart. | |
| valueAxis | back to summary |
|---|---|
| private ValueAxis<T extends Number> valueAxis | |
| VERTICAL_PSEUDOCLASS_STATE | back to summary |
|---|---|
| private static final PseudoClass VERTICAL_PSEUDOCLASS_STATE Pseudoclass indicating this is a vertical chart. | |
| StackedBarChart | back to summary |
|---|---|
| public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis) Construct a new StackedBarChart with the given axis. The two axis should be a ValueAxis/NumberAxis and a CategoryAxis, they can be in either order depending on if you want a horizontal or vertical bar chart. | |
| StackedBarChart | back to summary |
|---|---|
| public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart. Construct a new StackedBarChart with the given axis and data. The two axis should be a ValueAxis/NumberAxis and a CategoryAxis, they can be in either order depending on if you want a horizontal or vertical bar chart.
| |
| StackedBarChart | back to summary |
|---|---|
| public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart. Construct a new StackedBarChart with the given axis and data. The two axis should be a ValueAxis/NumberAxis and a CategoryAxis, they can be in either order depending on if you want a horizontal or vertical bar chart.
| |
| animateDataAdd | back to summary |
|---|---|
| private void animateDataAdd(XYChart. | |
| categoryGapProperty | back to summary |
|---|---|
| public DoubleProperty categoryGapProperty() | |
| createBar | back to summary |
|---|---|
| private Node createBar(XYChart. | |
| createDataRemoveTimeline | back to summary |
|---|---|
| private Timeline createDataRemoveTimeline(XYChart. | |
| createLegendItemForSeries | back to summary |
|---|---|
| pack-priv Legend. Overrides javafx. Doc from javafx. Called by the updateLegend for each series in the chart in order to create new legend item
| |
| dataItemAdded | back to summary |
|---|---|
| protected void dataItemAdded(XYChart. Implements abstract javafx. Doc from javafx. Called when a data item has been added to a series. This is where implementations of XYChart can create/add new nodes to getPlotChildren to represent this data item. They also may animate that data add with a fade in or similar if animated = true. | |
| dataItemChanged | back to summary |
|---|---|
| protected void dataItemChanged(XYChart. Implements abstract javafx. Doc from javafx. Called when a data item has changed, ie its xValue, yValue or extraValue has changed. | |
| dataItemRemoved | back to summary |
|---|---|
| protected void dataItemRemoved(final XYChart. Implements abstract javafx. Doc from javafx. Called when a data item has been removed from data model but it is still visible on the chart. Its still visible so that you can handle animation for removing it in this method. After you are done animating the data item you must call removeDataItemFromDisplay() to remove the items node from being displayed on the chart. | |
| getCategoryGap | back to summary |
|---|---|
| public double getCategoryGap() | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Gets the
| |
| getCssMetaData | back to summary |
|---|---|
| public List Overrides javafx. Implements javafx. Doc from javafx. This method should delegate to
| |
| getDataItem | back to summary |
|---|---|
| private List | |
| layoutPlotChildren | back to summary |
|---|---|
| protected void layoutPlotChildren() Implements abstract javafx. Doc from javafx. Called to update and layout the plot children. This should include all work to updates nodes representing the plot on top of the axis and grid lines etc. The origin is the top left of the plot area, the plot area with can be got by getting the width of the x axis and its height from the height of the y axis.
| |
| processDataRemove | back to summary |
|---|---|
| private void processDataRemove(final XYChart. | |
| seriesAdded | back to summary |
|---|---|
| protected void seriesAdded(XYChart. Implements abstract javafx. Doc from javafx. A series has been added to the charts data model. This is where implementations of XYChart can create/add new nodes to getPlotChildren to represent this series. Also you have to handle adding any data items that are already in the series. You may simply call dataItemAdded() for each one or provide some different animation for a whole series being added. | |
| seriesBeingRemovedIsAdded | back to summary |
|---|---|
| pack-priv void seriesBeingRemovedIsAdded(XYChart. Overrides javafx. Doc from javafx. This method is called when there is an attempt to add series that was set to be removed, and the removal might not have completed.
| |
| seriesChanged | back to summary |
|---|---|
| protected void seriesChanged(ListChangeListener. Overrides javafx. Doc from javafx. Called when each atomic change is made to the list of series for this chart
| |
| seriesRemoved | back to summary |
|---|---|
| protected void seriesRemoved(final XYChart. Implements abstract javafx. Doc from javafx. A series has been removed from the data model but it is still visible on the chart. Its still visible so that you can handle animation for removing it in this method. After you are done animating the data item you must call removeSeriesFromDisplay() to remove the series from the display list. | |
| setCategoryGap | back to summary |
|---|---|
| public void setCategoryGap(double value) | |
| updateAxisRange | back to summary |
|---|---|
| protected void updateAxisRange() Overrides javafx. Doc from javafx. This is called when the range has been invalidated and we need to update it. If the axis are auto ranging then we compile a list of all data that the given axis has to plot and call invalidateRange() on the axis passing it that data.
| |
| updateMap | back to summary |
|---|---|
| private void updateMap(XYChart. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final CssMetaData | |
| private static final List |
| Access | Constructor and Description |
|---|---|
| private |
| CATEGORY_GAP | back to summary |
|---|---|
| private static final CssMetaData<StackedBarChart<?, ?>, Number> CATEGORY_GAP | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |