Group: Forum Members
Last Active: 12 Years Ago
Posts: 3,
Visits: 1
|
My requirement is to add Diamond image with violet color as data point in chart. How can I add my own Image(Diamond) as point i chart. I want to add my own Image instead of pyramid. Here is my code: PointSeries lineFcstHistory = (NPointSeries)chart.Series.Add(SeriesType.Point);lineFcstHistory.Id = 5; lineFcstHistory.Name = "History";lineFcstHistory.PointShape = PointShape.Pyramid;lineFcstHistory.DataLabelStyle.Visible = false;lineFcstHistory.BorderStyle.Width = new NLength(1, NGraphicsUnit.Pixel);lineFcstHistory.BorderStyle.Color = Color.BlueViolet;lineFcstHistory.FillStyle = new NColorFillStyle(Color.BlueViolet);lineFcstHistory.Values.FillRandom(rd, 1); Could u suggest us how to do it.
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hi Priyanka, You can use the NImageFillStyle to assign a raster image to be used as the point filling. Alternatively you can use custom series to draw arbitrary data point items.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 12 Years Ago
Posts: 3,
Visits: 1
|
Thanks for reply.. I have tried using the below code string imagepath = Server.MapPath("~\\Legend\\FcstHistory1.bmp");NPointSeries lineFcstHistory = (NPointSeries)chart.Series.Add(SeriesType.Point);lineFcstHistory.Id = 5; lineFcstHistory.Name = "History";lineFcstHistory.DataLabelStyle.Visible = false;lineFcstHistory.FillStyle = new NImageFillStyle(imagepath);//new NColorFillStyle(Color.FromArgb(153,108,187));lineFcstHistory.Values.FillRandom(rd, 1); But still i am not able to see the image in chart.
|
Group: Forum Members
Last Active: 12 Years Ago
Posts: 3,
Visits: 1
|
The below 2 steps has restricted to show the images.NStyleSheet styleSheet = NStyleSheet.CreatePredefinedStyleSheet(PredefinedStyleSheet.Nevron); styleSheet.Apply(nChartControl1.Document); After these two steps are removed my code has worked...and the images are showing in chart Thanks a lot.........
|