We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

ChartWebControl, ChartSeriesType.Spline

I am using ASP.NET Syncfusion control, ChartWebControl, ChartSeriesType.Spline
I can’t set the series width, and I can’t change the color of the series, could you show me how. I tried to change many of the chart control properties, but these don’t help.
I also tried to use the PrepareStyle event to modify the series properties, but I still can’t set the series width, and I can’t change the color of the series.
Thanks a lot.

void series1_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args) {
try {
// Style formatting using a callback. You can apply the same settings directly on the series style on the
// point styles.
ChartSeries series = sender as ChartSeries;
if (series != null) {
//args.Style.DisplayText = true;
//args.Style.TextFormat = "{0}";
//args.Style.TextOffset = 3;

args.Style.TextOrientation = ChartTextOrientation.Smart;

args.Style.Symbol.Shape = ChartSymbolShape.Circle;
args.Style.Symbol.Size = new Size(6, 6);
args.Style.Symbol.Color = Color.BlueViolet;
args.Style.DisplayShadow = true;

//args.Style.BaseStyle.
}
} catch (Exception exc) {
throw exc;
}
}//end RefreshSeries()


ASP.NET ChartWebControl_ChartSeriesType.Spline0.zip

8 Replies

SB Suresh Babu Syncfusion Team December 28, 2006 06:54 PM UTC

Hello Erik,

I assume that you are using Syncfusion version 4.4.0.51 with VS.NET 2005.

Step-1:
Setting the width of a series can be done by resizing the axis with which it is attached.

[C#]
// This is to set the axis size to change the series width which is attached to it
this.ChartWebControl1.Model.Series[0].ActualXAxis.AutoSize = false;
this.ChartWebControl1.Model.Series[0].ActualXAxis.Size = new SizeF(200, 1);

Step-2:
Using the ‘Interior’ property, the Line color will be changed.

[C#]
// This property is to change the color of the Line
args.Style.Interior = new BrushInfo(Color.White);

Please take a look into the sample attached for more information.

Spline Chart sample

Let me know if this helps.

Thanks for using Syncfusion products.

Best Regards,
Sureshbabu


EH Erik Huynh February 8, 2007 07:36 PM UTC

Thank you very much for your help.
I am using the same control, and I display it on our intranet website, and there is another PowerPoint application that get these charts as images with 'Paste Special' to dynamically get the updated images from the website.
The problem is every time the website is refreshed or a new user browse the chart, the chart image name is changed.
It is fine on the web page since the ASP.NET webpage can display the image, but in Powerpoint, the 'Paste Special' will be mislinked.
Is there a way to customize the properties of a chart so that we only have a consistent chart image name UNCHANGED? Or any workaround (like copy the chart image to another folder with the same name everytime the web page is refreshed?
THANKS A LOT FOR YOUR HELP. WE HAVE USED YOUR SYNCFUSION CONTROLS FOR OVER 2 YEARS.


EH Erik Huynh February 8, 2007 07:38 PM UTC

Note: Previous help for the Series line width work well.
I am using ASP.NET with C#.
Thanks.


AD Administrator Syncfusion Team February 9, 2007 11:44 AM UTC

Hi Erik,

Thank You for the Update.

Could you please provide us with some more informations with regard to the issue that you have mentioned here , so that it would help us in meeting your requirement exactly?

Also could please provide us with some informations regarding this point ->"There is another PowerPoint application that get these charts as images with 'Paste Special' to dynamically get the updated images from the website" ?

Thank You for your continued support and
co-operation.

Regards,
Ramya.


AD Administrator Syncfusion Team February 9, 2007 07:52 PM UTC

Thank you very much for your quick response.
Sorry that I haven't written clearly my problem.
I am using Syncfusion Essential Studio 4.2.0.37 with our ASP.NET 20 using C# inside VS 2005
We use ChartWebControl, ChartSeriesType.Spline control to display a chart control in our intranet website (and we can access to the folder where we deployed our ASP.NET application.
For the ChartWebControl.ChartSeriesType.Spline we use the following property to allow using the chart control image somewhere else: (please correct me if I haven't got all the required properties.)
OutputFormat=DiskFile
ImageFormat=Png
Then, inside another Powerpoint file we inserted the linked image to the chart control image file so that whenever the ASP.NET application updated with new data, leading to the changed image content, our Powerpoint file can be re-opened to have the latest image content imported automatically.
The problem is Syncfusion chart control image name is like http://localhost/chartMonitor/Images/76c82c96-5e52-4605-8975-2985d6998648.Png
(the image name keep changing whenever a new user refreshes our site, so our linked image in Powerpoint is not valid anymore.)
Is there a way to set the image name of the chart control to a fixed file name? Or can we export the image to another folder via coding, then we will use that folder and image name for our linked image in Powerpoint file.
THANK YOU VERY MUCH FOR YOUR HELP. I REALLY APPRECIATE IT.


AD Administrator Syncfusion Team February 13, 2007 06:45 PM UTC

Anyone is looking at this post.
Thanks.


AD Administrator Syncfusion Team February 14, 2007 06:48 PM UTC

Hi Erik,

My strong apologies for the delay in getting back to you.

I have created a sample as per you requirement and attached with this post.

In this sample the ChartImage gets saved to a folder(say C:\ChartImage) and gets updated for every Page Refresh.

Kindly take a look at the attached sample and let me know if you have any queries.

Thank You for your co-operation.

Regards,
Ramya.

ChartTest0.zip


AD Administrator Syncfusion Team February 15, 2007 04:54 PM UTC

Thank you very much for creating the sample. The sample runs perfectly and serves our design.

Loader.
Live Chat Icon For mobile
Up arrow icon