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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Diferentiating the different series when printing the graph

Thread ID:





97434 Nov 26,2010 02:10 PM UTC Dec 8,2010 06:15 AM UTC Windows Forms 5
Tags: Chart
Leïla Benakezouh
Asked On November 26, 2010 02:10 PM UTC

I need to print/print preview a line chart that displays multiple series.
In order to distinguish the different lines if the user prints in a black/white mode, I tried to use the property ChartPrintColorMode.GrayScale that works well for the bar charts but not really for the line charts. I don't see any difference between my lines.
Can you help me on that ?
Thank you in advance

Subash Chandran M [Syncfusion]
Replied On November 29, 2010 12:50 PM UTC

Hi Leila,

Thank you for using Syncfusion Products.

I am afraid, that I was unable to reproduce this issue. I have created a simple sample to meet your requirement which shows different line series such as dotted, dashed and solid lines. Please provide us a sample which reproduces the issue, so that we could analyze the issue and provide you the solution at the earliest.

Subash Chandran M

Leïla Benakezouh
Replied On November 29, 2010 02:33 PM UTC

Thank you for your help.
I'm not sure to understand your answer. Do you mean that if you have 3 curves with the same dash style, and if you print using the GreayScale print mode, they will be printed with 3 different dash style ?

I know that is my curves have originally different dash style, they will be printed as they are shown but in my case, all my curves have the same dash style (the solid dash style) but I need to be able to distinguish them if they are printed in a black/white printer.
The example provided in the User Guide(Automatic Grayscale Handling) seem to provide what I need but it doesn't work if the graph type is a "Line Chart" and not a "Column Chart "

Is there a way to change the dash styles only on the printed (or previewed before printed) graph if I use the Grayscale print mode ?
Thank you for your help.

Subash Chandran M [Syncfusion]
Replied On November 30, 2010 11:19 AM UTC

Hi Leila,

Thanks for the update.

We have created a sample to meet your requirement with chart having different line series. We have printed the output using PDF printer and its showing the difference. The sample is uploaded along with the PDF file showing the series displayed with different line styles.

Please do let us know if it helps.

Subash Chandran M


Leïla Benakezouh
Replied On December 7, 2010 11:24 AM UTC

Thank you for you help.
It works very well but in my case, I can have a lot of points used to draw my graph. Because of that, the dash style doest not really make a difference (the points are too close for that).

I need to find an additional way to differentiate the curves if the graph is printed in a black and white mode.


Subash Chandran M [Syncfusion]
Replied On December 8, 2010 06:15 AM UTC

Hi Leila,

Thanks for the update.

We suggest you to use either of the options given below :

(1) Use ChartSymbolShape:

Make use of ChartSymbolShape with ChartSeries to differentiate the series with shapes like arrow,square,circle,etc., You can print this in GrayScale color mode.The code snippet for using ChartSymbolShape is given below :

//Adding ChartSymbolShape to the Chart Series 1
cs1.Style.Symbol.Shape = ChartSymbolShape.Circle;

(2) Use dashstyle:

Another option is to use dash style for chartseries border with different patterns like custom,dash,dashdot,etc.,which will show the dash styles differently while the ChartPrintColorMode property is set to Color. The GrayScale mode prints this with default dash style. So,you can print this through a black & white printer having series printed with differences. The code snippet for using dashstyle is given below :

//Adding dashstyle to the Chart Series 1
cs1.Style.Border.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
chControl.PrintColorMode = ChartPrintColorMode.Color;

Please check the attached file and let me know if any concerns.

Subash Chandran M

Printing ChartSeries_71f645fb.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon