Hello Guys,
I am programmatically generating the chart using the below code and while doing so i am getting unexpected border on Right and Bottom side of the chart [refer the attachment] so can you please give us an idea about how to remove those border?
i have already searched a lot about it and tried following options,
even tried to set the Border thickness to zero but still getting the border so please let us help to remove the border at the earliest.
Refer actual code below if needed,
Thanks,
Nirav
I am programmatically generating the chart using the below code and while doing so i am getting unexpected border on Right and Bottom side of the chart [refer the attachment] so can you please give us an idea about how to remove those border?
i have already searched a lot about it and tried following options,
Chart.Appearance.Border.Visible = false;
Chart.Appearance.Border.Color = Color.Transparent; // or Color.White
Chart.PlotArea.Appearance.Border.Visible = false;
Chart.PlotArea.Appearance.Border.Color = Color.Transparent; // or Color.White
even tried to set the Border thickness to zero but still getting the border so please let us help to remove the border at the earliest.
Refer actual code below if needed,
Telerik.Reporting.Chart defChart = new Telerik.Reporting.Chart();
defChart.BitmapResolution = 96F;
defChart.ChartTitle.TextBlock.Text = departmentName;
defChart.ChartTitle.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font(new FontFamily("Segoe UI"), 10.0f, FontStyle.Regular);
defChart.ChartTitle.Appearance.Position.Auto = false;
defChart.ChartTitle.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.TopLeft;
defChart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
defChart.Name = "chtContactsPerDay" + departmentCount;
defChart.PlotArea.EmptySeriesMessage.Appearance.Visible = true;
defChart.PlotArea.EmptySeriesMessage.Visible = true;
defChart.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(19.05000114440918D), Telerik.Reporting.Drawing.Unit.Cm(5.3340005874633789D));
defChart.Location = new Telerik.Reporting.Drawing.PointU(locationX, locationY);
defChart.AutoLayout = true;
defChart.Appearance.Border.Visible = false;
defChart.Appearance.Shadow.Color = System.Drawing.Color.Transparent;
defChart.Appearance.Shadow.Position = Telerik.Reporting.Charting.Styles.ShadowPosition.Behind;
defChart.ChartTitle.Appearance.Shadow.Color = System.Drawing.Color.Transparent;
defChart.ChartTitle.Appearance.Shadow.Position = Telerik.Reporting.Charting.Styles.ShadowPosition.Behind;
defChart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
defChart.Legend.Appearance.Shadow.Color = System.Drawing.Color.Transparent;
defChart.Legend.Appearance.Shadow.Position = Telerik.Reporting.Charting.Styles.ShadowPosition.Behind;
defChart.PlotArea.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
defChart.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.Transparent;
defChart.PlotArea.Appearance.Shadow.Color = System.Drawing.Color.Transparent;
defChart.PlotArea.Appearance.Shadow.Position = Telerik.Reporting.Charting.Styles.ShadowPosition.Behind;
defChart.PlotArea.EmptySeriesMessage.Appearance.Visible = true;
defChart.PlotArea.EmptySeriesMessage.Visible = true;
defChart.IntelligentLabelsEnabled = false;
defChart.Appearance.ImageQuality = Telerik.Reporting.Charting.Styles.ImageQuality.HighQuality | Telerik.Reporting.Charting.Styles.ImageQuality.AntiAlias;
defChart.Appearance.TextQuality = Telerik.Reporting.Charting.Styles.TextQuality.ClearTypeGridFit;
defChart.BitmapResolution = 600;
defChart.PlotArea.Appearance.Border.Visible = false;
defChart.PlotArea.EmptySeriesMessage.TextBlock.Text = ReportResources.NoDataFoundMessage;
defChart.PlotArea.EmptySeriesMessage.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font(new FontFamily("Segoe UI"), 10.0f, FontStyle.Regular);
defChart.ChartTitle.Visible = true;
Telerik.Reporting.Charting.Styles.ChartMargins chartMargins1 = new Telerik.Reporting.Charting.Styles.ChartMargins();
chartMargins1.Bottom = new Telerik.Reporting.Charting.Styles.Unit(12D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins1.Left = new Telerik.Reporting.Charting.Styles.Unit(12D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins1.Right = new Telerik.Reporting.Charting.Styles.Unit(10D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
chartMargins1.Top = new Telerik.Reporting.Charting.Styles.Unit(10D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
defChart.PlotArea.Appearance.Dimensions.Margins = chartMargins1;
defChart.PlotArea.YAxis.AxisLabel.Appearance.RotationAngle = 180F;
defChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270F;
defChart.SeriesOrientation = ChartSeriesOrientation.Vertical;
ChartSeries serie = new ChartSeries();
serie.Type = ChartSeriesType.Bar;
serie.Clear();
serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.Nothing;
serie.Appearance.ShowLabels = true;
serie.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.Bottom;
serie.Appearance.LabelAppearance.LabelLocation = Telerik.Reporting.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
foreach (string key in countWeekday.Keys)
{
ChartSeriesItem item = new ChartSeriesItem();
item.YValue = (double)countWeekday[key];
item.Name = key;
item.Label.TextBlock.Text = string.Format("{0} ({1})", item.Name, item.YValue);
item.Label.TextBlock.Appearance.TextProperties.Color = Color.Black;
item.Label.Appearance.RotationAngle = 270;
serie.Items.Add(item);
}
defChart.Series.Add(serie);
pnlContactsPerDay_Chart.Items.Add(defChart);
Thanks,
Nirav