Browse Source

CHART-2665 & CHART-2886 堆积和坐标轴update返回一个新创建的conditionattr CHART-1882直接改报错即可 不用记住conditionattr

final/10.0
qinghuiliu 6 years ago
parent
commit
c27ba8498f
  1. 19
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

19
designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

@ -99,10 +99,12 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
}
public void populateBean(ConditionAttr conditionAttr) {
this.conditionAttr = conditionAttr;
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
AttrSeriesStackAndAxis seriesStackAndAxis = conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
if (XAxis == null || YAxis == null) {
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
}
doLayoutPane();
XAxis.setSelectedIndex(seriesStackAndAxis.getXAxisIndex());
@ -129,11 +131,16 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
}
public ConditionAttr updateBean() {
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis)conditionAttr.getExisted(AttrSeriesStackAndAxis.class); seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
ConditionAttr conditionAttr = new ConditionAttr();
AttrSeriesStackAndAxis seriesStackAndAxis = conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
if (seriesStackAndAxis == null) {
seriesStackAndAxis = new AttrSeriesStackAndAxis();
conditionAttr.addDataSeriesCondition(seriesStackAndAxis);
}
seriesStackAndAxis.setXAxisIndex(XAxis.getSelectedIndex());
seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis);
conditionAttr.addDataSeriesCondition(seriesStackAndAxis);
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean();
conditionAttr.setCondition(con);

Loading…
Cancel
Save