Browse Source

echarts基本功能

pull/1/head
richie 9 years ago
parent
commit
d2440e1074
  1. 2
      src/com/fr/solution/plugin/chart/echarts/common/glyph/EChartsTitleGlyph.java
  2. 5
      src/com/fr/solution/plugin/chart/echarts/common/title/EChartsTitle.java
  3. 6
      src/com/fr/solution/plugin/chart/echarts/common/ui/EChartsTitlePane.java
  4. 4
      src/com/fr/solution/plugin/chart/echarts/common/ui/data/AbstractEChartsReportDataContentPane.java
  5. 2
      src/com/fr/solution/plugin/chart/echarts/pie/EChartsPieUI.java
  6. 5
      src/com/fr/solution/plugin/chart/echarts/pie/ui/EChartsPieReportDataContentPane.java

2
src/com/fr/solution/plugin/chart/echarts/common/glyph/EChartsTitleGlyph.java

@ -24,7 +24,7 @@ public class EChartsTitleGlyph extends TitleGlyph {
JSONObject t = JSONObject.create() JSONObject t = JSONObject.create()
.put("text", getText()) .put("text", getText())
.put("x", "center"); .put("x", "center");
t.put("show", isVisible());
return t; return t;
} }
} }

5
src/com/fr/solution/plugin/chart/echarts/common/title/EChartsTitle.java

@ -4,6 +4,7 @@ import com.fr.base.Formula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.chartattr.Title; import com.fr.chart.chartattr.Title;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.solution.plugin.chart.echarts.common.glyph.EChartsGlyph;
import com.fr.solution.plugin.chart.echarts.common.glyph.EChartsTitleGlyph; import com.fr.solution.plugin.chart.echarts.common.glyph.EChartsTitleGlyph;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader; import com.fr.stable.xml.XMLableReader;
@ -27,7 +28,9 @@ public class EChartsTitle extends Title {
} else { } else {
text4Glyph = GeneralUtils.objectToString(text); text4Glyph = GeneralUtils.objectToString(text);
} }
return new EChartsTitleGlyph(text4Glyph); EChartsTitleGlyph titleGlyph = new EChartsTitleGlyph(text4Glyph);
titleGlyph.setVisible(isTitleVisible());
return titleGlyph;
} }
@Override @Override

6
src/com/fr/solution/plugin/chart/echarts/common/ui/EChartsTitlePane.java

@ -72,10 +72,8 @@ public class EChartsTitlePane extends BasicScrollPane<ECharts> {
if (ob == null) { if (ob == null) {
ob = new ECharts(); ob = new ECharts();
} }
EChartsTitle title = (EChartsTitle) ob.getTitle(); EChartsTitle title = new EChartsTitle();
if (title == null) { ob.setTitle(title);
title = new EChartsTitle();
}
title.setTitleVisible(showTitle.getSelectedItem()); title.setTitleVisible(showTitle.getSelectedItem());
String titleString = tinyFormulaPane.updateBean(); String titleString = tinyFormulaPane.updateBean();
Object titleObj; Object titleObj;

4
src/com/fr/solution/plugin/chart/echarts/common/ui/data/AbstractEChartsReportDataContentPane.java

@ -1,5 +1,6 @@
package com.fr.solution.plugin.chart.echarts.common.ui.data; package com.fr.solution.plugin.chart.echarts.common.ui.data;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane;
/** /**
@ -7,4 +8,7 @@ import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataConte
*/ */
public class AbstractEChartsReportDataContentPane extends CategoryPlotReportDataContentPane { public class AbstractEChartsReportDataContentPane extends CategoryPlotReportDataContentPane {
public AbstractEChartsReportDataContentPane(ChartDataPane parent) {
super(parent);
}
} }

2
src/com/fr/solution/plugin/chart/echarts/pie/EChartsPieUI.java

@ -27,7 +27,7 @@ public class EChartsPieUI extends AbstractIndependentEChartsUI {
@Override @Override
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) {
return new EChartsPieReportDataContentPane(); return new EChartsPieReportDataContentPane(parent);
} }
@Override @Override

5
src/com/fr/solution/plugin/chart/echarts/pie/ui/EChartsPieReportDataContentPane.java

@ -1,9 +1,14 @@
package com.fr.solution.plugin.chart.echarts.pie.ui; package com.fr.solution.plugin.chart.echarts.pie.ui;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.solution.plugin.chart.echarts.common.ui.data.AbstractEChartsReportDataContentPane; import com.fr.solution.plugin.chart.echarts.common.ui.data.AbstractEChartsReportDataContentPane;
/** /**
* Created by richie on 16/2/18. * Created by richie on 16/2/18.
*/ */
public class EChartsPieReportDataContentPane extends AbstractEChartsReportDataContentPane { public class EChartsPieReportDataContentPane extends AbstractEChartsReportDataContentPane {
public EChartsPieReportDataContentPane(ChartDataPane parent) {
super(parent);
}
} }

Loading…
Cancel
Save