Browse Source

字段名作为一个新的字段

master
zheng 6 years ago
parent
commit
ad744f4c57
  1. 7
      src/com/fr/plugin/demo/DemoChart.java
  2. 5
      src/com/fr/plugin/demo/DemoReportDataPane.java
  3. 4
      src/com/fr/plugin/demo/DemoTableDataPane.java

7
src/com/fr/plugin/demo/DemoChart.java

@ -136,8 +136,11 @@ public class DemoChart extends AbstractChart<DemoDataConfig>{
// jsonObject.put("targetName", dataConfig.getTargetName()); // jsonObject.put("targetName", dataConfig.getTargetName());
List<Object> expectList = dataConfig.getExpect().getValues(); // List<Object> expectList = dataConfig.getExpect().getValues();
List<Object> actualList = dataConfig.getActual().getValues(); // List<Object> actualList = dataConfig.getActual().getValues();
List<Object> customNames = dataConfig.getCustomNameField().getValues();
List<Object> customValues = dataConfig.getCustomValueField().getValues();
for (int i = 0, len = xValues.size(); i < len; i++) { for (int i = 0, len = xValues.size(); i < len; i++) {
maxValue = Math.max(GeneralUtils.objectToNumber(zValues.get(i)).doubleValue(), maxValue); maxValue = Math.max(GeneralUtils.objectToNumber(zValues.get(i)).doubleValue(), maxValue);

5
src/com/fr/plugin/demo/DemoReportDataPane.java

@ -16,6 +16,11 @@ public class DemoReportDataPane extends AbstractExtendedChartReportDataPane<Demo
private TinyFormulaPane yPane; private TinyFormulaPane yPane;
private TinyFormulaPane zPane; private TinyFormulaPane zPane;
@Override
protected boolean hasCustomFieldPane() {
return true;
}
@Override @Override
protected String[] fieldLabel() { protected String[] fieldLabel() {
return new String[]{ return new String[]{

4
src/com/fr/plugin/demo/DemoTableDataPane.java

@ -21,6 +21,10 @@ public class DemoTableDataPane extends AbstractExtendedChartTableDataPane<DemoDa
private UIComboBox actual; private UIComboBox actual;
private CalculateComboBox actualFunction; private CalculateComboBox actualFunction;
@Override
protected boolean hasCustomFieldPane() {
return true;
}
@Override @Override
protected String[] fieldLabels() { protected String[] fieldLabels() {

Loading…
Cancel
Save