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()
.put("text", getText())
.put("x", "center");
t.put("show", isVisible());
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.chart.chartattr.Title;
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.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
@ -27,7 +28,9 @@ public class EChartsTitle extends Title {
} else {
text4Glyph = GeneralUtils.objectToString(text);
}
return new EChartsTitleGlyph(text4Glyph);
EChartsTitleGlyph titleGlyph = new EChartsTitleGlyph(text4Glyph);
titleGlyph.setVisible(isTitleVisible());
return titleGlyph;
}
@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) {
ob = new ECharts();
}
EChartsTitle title = (EChartsTitle) ob.getTitle();
if (title == null) {
title = new EChartsTitle();
}
EChartsTitle title = new EChartsTitle();
ob.setTitle(title);
title.setTitleVisible(showTitle.getSelectedItem());
String titleString = tinyFormulaPane.updateBean();
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;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
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 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
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) {
return new EChartsPieReportDataContentPane();
return new EChartsPieReportDataContentPane(parent);
}
@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;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.solution.plugin.chart.echarts.common.ui.data.AbstractEChartsReportDataContentPane;
/**
* Created by richie on 16/2/18.
*/
public class EChartsPieReportDataContentPane extends AbstractEChartsReportDataContentPane {
public EChartsPieReportDataContentPane(ChartDataPane parent) {
super(parent);
}
}

Loading…
Cancel
Save