In the Report_PageHeader event handler, write the following code:
private void reportMaxViewer1_Report_PageHeader_Format(
CppMax.ReportMax.ReportMaxPage FilePage, ref bool bCancel)
{
ReportMaxChart MainChart = (ReportMaxChart)FilePage.FindControl("MainChart");
Chart chart1 = MainChart.GetChart();
ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title();
chart1.BackColor = System.Drawing.Color.FromArgb(
((System.Byte)(243)), ((System.Byte)(223)), ((System.Byte)(193)));
chart1.BackGradientStyle =
System.Windows.Forms.DataVisualization.Charting.GradientStyle.TopBottom;
chart1.BorderlineColor = System.Drawing.Color.FromArgb(
((System.Byte)(181)), ((System.Byte)(64)), ((System.Byte)(1)));
chart1.BorderlineDashStyle =
System.Windows.Forms.DataVisualization.Charting.ChartDashStyle.Solid;
chart1.BorderlineWidth = 2;
chart1.BorderSkin.SkinStyle =
System.Windows.Forms.DataVisualization.Charting.BorderSkinStyle.Emboss;
chartArea1.Area3DStyle.IsClustered = true;
chartArea1.Area3DStyle.Perspective = 10;
chartArea1.Area3DStyle.IsRightAngleAxes = false;
chartArea1.Area3DStyle.WallWidth = 0;
chartArea1.Area3DStyle.Inclination = 15;
chartArea1.Area3DStyle.Rotation = 10;
chartArea1.AxisX.LabelStyle.Font =
new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisX.LineColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
chartArea1.AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
chartArea1.AxisY.LabelStyle.Font =
new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
chartArea1.AxisY.LineColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
chartArea1.AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
chartArea1.AxisY.MajorTickMark.Size = 0.6F;
chartArea1.BackColor = System.Drawing.Color.OldLace;
chartArea1.BackSecondaryColor = System.Drawing.Color.White;
chartArea1.BorderColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
chartArea1.Name = "Default";
chartArea1.Position.Auto = false;
chartArea1.Position.Height = 78F;
chartArea1.Position.Width = 88F;
chartArea1.Position.X = 5F;
chartArea1.Position.Y = 15F;
chartArea1.ShadowColor = System.Drawing.Color.Transparent;
chart1.ChartAreas.Add(chartArea1);
legend1.Alignment = System.Drawing.StringAlignment.Far;
legend1.IsTextAutoFit = false;
legend1.BackColor = System.Drawing.Color.Transparent;
legend1.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Bold);
legend1.Name = "Default";
legend1.Position.Auto = false;
legend1.Position.Height = 14.23021F;
legend1.Position.Width = 19.34047F;
legend1.Position.X = 74.73474F;
legend1.Position.Y = 74.08253F;
chart1.Legends.Add(legend1);
chart1.Location = new System.Drawing.Point(16, 56);
chart1.Name = "chart1";
chart1.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.BrightPastel;
series1.BorderColor = System.Drawing.Color.FromArgb((
(System.Byte)(180)), ((System.Byte)(26)), ((System.Byte)(59)), ((System.Byte)(105)));
series1.ChartType = SeriesChartType.Radar;
series1.Color = System.Drawing.Color.FromArgb(
((System.Byte)(220)), ((System.Byte)(65)), ((System.Byte)(140)), ((System.Byte)(240)));
series1.MarkerBorderColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
series1.MarkerSize = 9;
series1.Name = "Series1";
series1.ShadowOffset = 1;
series2.BorderColor = System.Drawing.Color.FromArgb(
((System.Byte)(180)), ((System.Byte)(26)), ((System.Byte)(59)), ((System.Byte)(105)));
series2.ChartType = SeriesChartType.Radar;
series2.Color = System.Drawing.Color.FromArgb(((System.Byte)(220)),
((System.Byte)(252)), ((System.Byte)(180)), ((System.Byte)(65)));
series2.MarkerBorderColor = System.Drawing.Color.FromArgb(
((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));
series2.MarkerSize = 9;
series2.Name = "Series2";
series2.ShadowOffset = 1;
chart1.Series.Add(series1);
chart1.Series.Add(series2);
chart1.TabIndex = 1;
title1.ForeColor = System.Drawing.Color.FromArgb(
((System.Byte)(26)), ((System.Byte)(59)), ((System.Byte)(105)));
title1.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold);
title1.ShadowColor = System.Drawing.Color.FromArgb(
((System.Byte)(32)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
title1.ShadowOffset = 3;
title1.Text = "Radar Chart";
chart1.Titles.Add(title1);
double[] yValues = { 65.62, 75.54, 60.45, 34.73, 85.42, 55.9, 63.6, 55.1, 77.2 };
double[] yValues2 = { 76.45, 23.78, 86.45, 30.76, 23.79, 35.67, 89.56, 67.45, 38.98 };
string[] xValues = { "France", "Canada", "Germany",
"USA", "Italy", "Spain", "Russia", "Sweden", "Japan" };
chart1.Series["Series1"].Points.DataBindXY(xValues, yValues);
chart1.Series["Series2"].Points.DataBindXY(xValues, yValues2);
chart1.Series["Series1"]["RadarDrawingStyle"] = "Area";
chart1.Series["Series2"]["RadarDrawingStyle"] = "Area";
chart1.Series["Series1"].BorderColor = Color.FromArgb(100, 100, 100);
chart1.Series["Series1"].BorderWidth = 1;
chart1.Series["Series2"].BorderColor = Color.FromArgb(100, 100, 100);
chart1.Series["Series2"].BorderWidth = 1;
chart1.Series["Series1"]["AreaDrawingStyle"] = "Polygon";
chart1.Series["Series2"]["AreaDrawingStyle"] = "Polygon";
chart1.Series["Series1"]["CircularLabelsStyle"] = "Circular";
chart1.Series["Series2"]["CircularLabelsStyle"] = "Circular";
MainChart.UpdateChart(chart1);
}