KM
kevin musters
June 23, 2004 02:24 PM UTC
Just thought I would mention, that I am using the method described in the example:
http://www.syncfusion.com/support/user/Uploads/EssentialChartActiveReports_2860.zip
specified in the forum link:
http://www.syncfusion.com/Support/forums/message.aspx?MessageID=15523
Thanks,
DJ
Davis Jebaraj
Syncfusion Team
June 24, 2004 12:23 PM UTC
Hi Kevin,
The resolution of the image printed by the printer is lower because the sizing of the image is intended for on screen display (We used a factor of 96 for the screen''s PPI Pixels Per Inch).
You could change the 96 to be 300 or 600 to reflect the Dots Per Inch DPI of the printer. This will change the size of the image on the screen. We can set the Picture control property''s SizeMode property to accomodate this change. Also, the font sizes for the Title and axes will have to be increased for higher resolutions. Please see the code below:
private void Detail_Format(object sender, System.EventArgs eArgs)
{
Syncfusion.Windows.Forms.Chart.ChartControl cc = new Syncfusion.Windows.Forms.Chart.ChartControl();
cc.Model.ColorModel.Palette = ChartColorPalette.Pastel;
cc.PrimaryXAxis.Title = "Resource Labor Costs";
cc.PrimaryYAxis.Title = "Hours Worked";
ChartSeries Series = cc.Model.NewSeries ( "Resource Costs ", ChartSeriesType.Column );
for ( int j = 0; j < 20; j++ )
{
Series.Points.Add ( Convert.ToDouble ( j ), Convert.ToDouble ( j + 1 ) );
}
Series.Style.DisplayText = false;
Series.Style.DisplayShadow = true;
Series.Style.Symbol.Shape = ChartSymbolShape.Square;
Series.Style.Symbol.Size = new Size ( 15, 15 );
Series.Style.Symbol.Color = Color.Blue;
Series.Style.Border.Color = Color.FromArgb(100, Color.BlueViolet);
Series.Style.Border.DashStyle = DashStyle.DashDotDot;
cc.Series.Add(Series);
cc.LegendPosition = ChartLegendPosition.Top;
cc.PrimaryXAxis.DrawGrid = false;
cc.PrimaryYAxis.DrawGrid = false;
cc.Legend.Visible = false;
//Higher Resolution Image Begin
this.arPictureControl.SizeMode = SizeModes.Stretch;
cc.Font = new Font(cc.Font.Name , 72);
cc.PrimaryXAxis.Font = new Font(cc.PrimaryXAxis.Font.Name , 48);
cc.PrimaryYAxis.Font = new Font(cc.PrimaryYAxis.Font.Name , 48);
// Convert ActiveReports'' Inches
System.Drawing.Size sizePix = new System.Drawing.Size(
(int)(this.arPictureControl.Size.Width*600),
(int)(this.arPictureControl.Size.Height*600));
// Higher Resolution Image End
// Lower Resolution Image Begin
/*System.Drawing.Size sizePix = new System.Drawing.Size(
(int)(this.arPictureControl.Size.Width*96),
(int)(this.arPictureControl.Size.Height*96));
*/
// Lower Resolution Image End
Image img = new Bitmap(sizePix.Width,sizePix.Height);
cc.Draw(img);
this.arPictureControl.Image = img;
}
Regards,
Davis