From 15292b9fddd477ccf699c5af65ae19d57986753d Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Mon, 14 Oct 2024 17:19:24 +0530 Subject: [PATCH] Create and Edit Charts --- .../.NET/Picture Fill/Picture Fill/Program.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Create and Edit Charts/Picture Fill/.NET/Picture Fill/Picture Fill/Program.cs b/Create and Edit Charts/Picture Fill/.NET/Picture Fill/Picture Fill/Program.cs index 08964421..4531a2ad 100644 --- a/Create and Edit Charts/Picture Fill/.NET/Picture Fill/Picture Fill/Program.cs +++ b/Create and Edit Charts/Picture Fill/.NET/Picture Fill/Picture Fill/Program.cs @@ -1,6 +1,7 @@ using System.IO; using Syncfusion.Drawing; using Syncfusion.XlsIO; +using Syncfusion.XlsIO.Implementation.Shapes; namespace Picture_Fill { @@ -30,9 +31,17 @@ static void Main(string[] args) //Set picture fill to chart area chart.ChartArea.Fill.UserPicture(image1, "Image"); + //Setting offset to chart area fill picture + Rectangle chartarea = Rectangle.FromLTRB(5000, 6000, 7000, 8000); + (chart.ChartArea.Fill as ShapeFillImpl).FillRect = chartarea; + //Set picture fill to plot area chart.PlotArea.Fill.UserPicture(image1, "Image"); + //Setting offset to plot area fill picture + Rectangle plotarea = Rectangle.FromLTRB(5000, 6000, 7000, 8000); + (chart.PlotArea.Fill as ShapeFillImpl).FillRect = plotarea; + //Set picture fill to series serie1.SerieFormat.Fill.UserPicture(image2, "Image"); serie2.SerieFormat.Fill.UserPicture(image2, "Image");