Browse Source

Merge pull request #569 in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit 'ddfa52b5246606ce132ffc28599d6fecd8a1a7fc':
  CHART-2665 & CHART-2886 堆积和坐标轴update返回一个新创建的conditionattr CHART-1882直接改报错即可 不用记住conditionattr
  CHART-2665 & CHART-2886 堆积和坐标轴update返回一个新创建的conditionattr CHART-1882直接改报错即可 不用记住conditionattr
final/10.0
richie 6 years ago
parent
commit
0dfa42a44a
  1. 21
      designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java

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

@ -34,8 +34,6 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
protected UIButtonGroup<Integer> isStacked; protected UIButtonGroup<Integer> isStacked;
protected UIButtonGroup<Integer> isPercentStacked; protected UIButtonGroup<Integer> isPercentStacked;
private ConditionAttr conditionAttr;
private LiteConditionPane liteConditionPane; private LiteConditionPane liteConditionPane;
public VanChartCustomStackAndAxisConditionPane() { public VanChartCustomStackAndAxisConditionPane() {
@ -99,10 +97,12 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
} }
public void populateBean(ConditionAttr conditionAttr) { public void populateBean(ConditionAttr conditionAttr) {
this.conditionAttr = conditionAttr; AttrSeriesStackAndAxis seriesStackAndAxis = conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
AttrSeriesStackAndAxis seriesStackAndAxis = (AttrSeriesStackAndAxis) conditionAttr.getExisted(AttrSeriesStackAndAxis.class);
XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray()); if (XAxis == null || YAxis == null) {
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray()); XAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getXAxisNamesArray());
YAxis = new UIButtonGroup<Integer>(seriesStackAndAxis.getYAxisNameArray());
}
doLayoutPane(); doLayoutPane();
XAxis.setSelectedIndex(seriesStackAndAxis.getXAxisIndex()); XAxis.setSelectedIndex(seriesStackAndAxis.getXAxisIndex());
@ -129,11 +129,16 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane<Condi
} }
public ConditionAttr updateBean() { 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()); seriesStackAndAxis.setYAxisIndex(YAxis.getSelectedIndex());
updateStackAndPercent(seriesStackAndAxis); updateStackAndPercent(seriesStackAndAxis);
conditionAttr.addDataSeriesCondition(seriesStackAndAxis);
AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean(); AbstractCondition con = (AbstractCondition) this.liteConditionPane.updateBean();
conditionAttr.setCondition(con); conditionAttr.setCondition(con);

Loading…
Cancel
Save