Browse Source

CHART-20675 主题样式图表预览图调整

research/11.0
白岳 3 years ago
parent
commit
7548e9fc94
  1. 16
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java

16
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java

@ -15,22 +15,25 @@ import com.fr.design.mainframe.theme.preview.ecpreview.ECComponentPreviewPane;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.PiePlot4VanChart;
import com.fr.plugin.chart.attr.VanChartLegend;
import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.base.AttrLabel; import com.fr.plugin.chart.base.AttrLabel;
import com.fr.plugin.chart.base.VanChartTools; import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.column.VanChartColumnPlot;
import com.fr.plugin.chart.type.GradientType;
import com.fr.plugin.chart.type.RadiusType; import com.fr.plugin.chart.type.RadiusType;
import com.fr.plugin.chart.vanchart.VanChart; import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
/** /**
@ -183,11 +186,14 @@ public class FormThemePreviewPane extends TemplateThemePreviewPane<FormTheme> {
vanChartTools.setFullScreen(false); vanChartTools.setFullScreen(false);
PiePlot4VanChart plot = chart.getPlot(); PiePlot4VanChart plot = chart.getPlot();
plot.getLegend().setPosition(Constants.BOTTOM); VanChartLegend legend = (VanChartLegend) plot.getLegend();
plot.setPlotStyle(ChartConstants.STYLE_NONE); legend.setPosition(Constants.BOTTOM);
legend.setCustomSize(true);
legend.setMaxHeight(28);
plot.getGradientStyle().setGradientType(GradientType.NONE);
plot.setInnerRadiusPercent(75); plot.setInnerRadiusPercent(75);
plot.getRadius().setRadiusType(RadiusType.FIXED); plot.getRadius().setRadiusType(RadiusType.FIXED);
plot.getRadius().setRadius(80); plot.getRadius().setRadius(70);
Object[] category = {StringUtils.EMPTY}; Object[] category = {StringUtils.EMPTY};
Object[] series = {"A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1"}; Object[] series = {"A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1"};

Loading…
Cancel
Save