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
close icon

Diferentiating the different series when printing the graph

Hi,
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


5 Replies

SC Subash Chandran M Syncfusion Team 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.


Regards,
Subash Chandran M




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

Hi,
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.





SC Subash Chandran M Syncfusion Team 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.

Regards,
Subash Chandran M





ForumID97434_a85e34d2.zip


LB Leïla Benakezouh 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.

Regards.
Leïla



SC Subash Chandran M Syncfusion Team 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.

Regards,
Subash Chandran M





Printing ChartSeries_71f645fb.zip

Loader.
Live Chat Icon For mobile
Up arrow icon