< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/chart/StackedBarChart.java
Print this page
*** 231,241 ****
processDataRemove(series, item);
removeDataItemFromDisplay(series, item);
}
}
! /** @inheritDoc */
@Override protected void dataItemChanged(Data<X, Y> item) {
double barVal;
double currentVal;
if (orientation == Orientation.VERTICAL) {
barVal = ((Number) item.getYValue()).doubleValue();
--- 231,241 ----
processDataRemove(series, item);
removeDataItemFromDisplay(series, item);
}
}
! /** {@inheritDoc} */
@Override protected void dataItemChanged(Data<X, Y> item) {
double barVal;
double currentVal;
if (orientation == Orientation.VERTICAL) {
barVal = ((Number) item.getYValue()).doubleValue();
*** 264,274 ****
bar.getStyleClass().setAll("chart-bar", "series" + i, "data" + j, series.defaultColorStyleClass);
}
}
}
! /** @inheritDoc */
@Override protected void seriesAdded(Series<X, Y> series, int seriesIndex) {
// handle any data already in series
// create entry in the map
Map<String, List<Data<X, Y>>> categoryMap = new HashMap<String, List<Data<X, Y>>>();
for (int j = 0; j < series.getData().size(); j++) {
--- 264,274 ----
bar.getStyleClass().setAll("chart-bar", "series" + i, "data" + j, series.defaultColorStyleClass);
}
}
}
! /** {@inheritDoc} */
@Override protected void seriesAdded(Series<X, Y> series, int seriesIndex) {
// handle any data already in series
// create entry in the map
Map<String, List<Data<X, Y>>> categoryMap = new HashMap<String, List<Data<X, Y>>>();
for (int j = 0; j < series.getData().size(); j++) {
*** 334,344 ****
removeSeriesFromDisplay(series);
requestChartLayout();
}
}
! /** @inheritDoc */
@Override protected void updateAxisRange() {
// This override is necessary to update axis range based on cumulative Y value for the
// Y axis instead of the inherited way where the max value in the data range is used.
boolean categoryIsX = categoryAxis == getXAxis();
if (categoryAxis.isAutoRanging()) {
--- 334,344 ----
removeSeriesFromDisplay(series);
requestChartLayout();
}
}
! /** {@inheritDoc} */
@Override protected void updateAxisRange() {
// This override is necessary to update axis range based on cumulative Y value for the
// Y axis instead of the inherited way where the max value in the data range is used.
boolean categoryIsX = categoryAxis == getXAxis();
if (categoryAxis.isAutoRanging()) {
*** 375,385 ****
}
valueAxis.invalidateRange(vData);
}
}
! /** @inheritDoc */
@Override protected void layoutPlotChildren() {
double catSpace = categoryAxis.getCategorySpacing();
// calculate bar spacing
final double availableBarSpace = catSpace - getCategoryGap();
final double barWidth = availableBarSpace;
--- 375,385 ----
}
valueAxis.invalidateRange(vData);
}
}
! /** {@inheritDoc} */
@Override protected void layoutPlotChildren() {
double catSpace = categoryAxis.getCategorySpacing();
// calculate bar spacing
final double availableBarSpace = catSpace - getCategoryGap();
final double barWidth = availableBarSpace;
< prev index next >