This is a migrated thread and some comments may be shown as answers.

radchart borders and labels

2 Answers 107 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 16 Feb 2012, 12:53 PM
How do you get rid of the border around a radchart?  I have a chart in a radgrid and I can't seem to get rid of either the black border or the labels attached to the pie slices.

2 Answers, 1 is accepted

Sort by
0
Dean
Top achievements
Rank 1
answered on 16 Feb 2012, 12:54 PM
Here is the code to load the chart:

radChart.Skin =

 

"WebBlue";

 

radChart.PlotArea.XAxis.DataLabelsColumn =

 

"";

 

radChart.ChartTitle.TextBlock.Visible=

 

false;

 

radChart.PlotArea.YAxis.Appearance.TextAppearance.Visible =

 

false;

 

radChart.PlotArea.XAxis.Appearance.TextAppearance.Visible =

 

false;

 

radChart.DataSource = dt;

radChart.Series[0].DataYColumn =

 

"pct";

 

radChart.Series[0].DataXColumn =

 

"hours_avl";

 

radChart.DataBind();

radChart.Appearance.Border.Color = System.Drawing.

 

Color.White;

 

radChart.Legend.Visible =

 

false;

 

 

 

ChartSeriesItem item1 = radChart.Series[0].Items[0];

 

item1.Name =

 

"Pct Reported";

 

item1.Appearance.FillStyle.MainColor =

 

Color.Green;

 

item1.Appearance.FillStyle.FillType =

 

FillType.Solid;

 

 

 

ChartSeriesItem item2 = radChart.Series[0].Items[1];

 

item2.Name =

 

"Pct Avl";

 

item2.Appearance.FillStyle.MainColor =

 

Color.Red;

 

item2.Appearance.FillStyle.FillType =

 

FillType.Solid;

 

radChart.Visible =

 

true;

 

0
Evgenia
Telerik team
answered on 20 Feb 2012, 01:58 PM
Hello Dean,

Here's how you can make the Border unvisible:

RadChart1.Appearance.Border.Color = System.Drawing.Color.Transparent;

Also please note that you may need to set the SkinsOverrideStyles property of the Chart to false in order for your custom settings to override those set by the Style. 

All the best,
Evgenia
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Chart (Obsolete)
Asked by
Dean
Top achievements
Rank 1
Answers by
Dean
Top achievements
Rank 1
Evgenia
Telerik team
Share this question
or