diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java index d1923c1dfe..486eb2d18e 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java @@ -273,9 +273,9 @@ public class CreateComponentAction extends UpdateAction { XChartEditor chartEditor = (XChartEditor) body; Dimension size = chartEditor.getSize(); BufferedImage chartImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB); - Insets margin = chartEditor.getInsets();; + Insets margin = chartEditor.getInsets(); chartEditor.getDesignerEditor().paintEditor(chartImage.getGraphics(), size, margin); - im.getGraphics().drawImage(chartImage, 0, chartEditor.getY(), null); + im.getGraphics().drawImage(chartImage, chartEditor.getX(), chartEditor.getY(), null); } } return im;