扩展图表示例。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

7 years ago
package com.fr.plugin.demo;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.extended.chart.AbstractExtendedChartReportDataPane;
/**
* Created by shine on 2018/3/24.
*/
public class DemoReportDataPane extends AbstractExtendedChartReportDataPane<DemoDataConfig> {
private TinyFormulaPane xPane;
private TinyFormulaPane yPane;
private TinyFormulaPane zPane;
@Override
protected String[] fieldLabel() {
return new String[]{
"X轴",
"Y轴",
"Z轴"
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
if (xPane == null) {
xPane = new TinyFormulaPane();
yPane = new TinyFormulaPane();
zPane = new TinyFormulaPane();
}
return new TinyFormulaPane[]{
xPane,
yPane,
zPane
};
}
@Override
protected void populate(DemoDataConfig dataConf) {
populateField(xPane, dataConf.getX());
populateField(yPane, dataConf.getY());
populateField(zPane, dataConf.getZ());
}
@Override
protected DemoDataConfig update() {
DemoDataConfig dataConfig = new DemoDataConfig();
updateField(xPane, dataConfig.getX());
updateField(yPane, dataConfig.getY());
updateField(zPane, dataConfig.getZ());
return dataConfig;
}
}