Hi,
I want to set my Label Text next to LabelLine on Donut Chart.
i use this code to create my chart, but somehow the label text placed on top of label line, not next to it (see attachment for my desired result)
Thank you in advance
private
void
CreateRadChartDonut(
ref
string
p_strFileName)
{
RadChartView chartDonut =
new
RadChartView();
//chartDonut = radChartView1;
chartDonut.Size = radChartView1.Size;
chartDonut.Dock = DockStyle.Fill;
chartDonut.LabelFormatting += radChartView_LabelFormatting;
chartDonut.View.Margin =
new
Padding(65);
//set pie padding
chartDonut.AreaType = ChartAreaType.Pie;
//set to pie chart type
chartDonut.Series.Clear();
#region Config New Chart Series
Telerik.WinControls.UI.DonutSeries smartPie =
new
Telerik.WinControls.UI.DonutSeries();
smartPie.Name =
"Series"
;
smartPie.InnerRadiusFactor = 0.35f;
//setting inner radious doughnut so it can change as Doughnut Chart
smartPie.LabelMode = PieLabelModes.Horizontal;
smartPie.ShowLabels =
true
;
//show label text
smartPie.DrawLinesToLabels =
true
;
//show label line connector
smartPie.LinesToLabelsColor = Color.FromArgb(197, 158, 115);
//set label line connector color
smartPie.SyncLinesToLabelsColor =
false
;
//set true if we want to set label line color the same as series color
//set angle range starting position
AngleRange range = smartPie.Range;
range.StartAngle = 250;
smartPie.Range = range;
smartPie.LabelsOffsetFromCenter = 1.56f;
#endregion
#region Generate Data
List<DataChart> lData =
new
List<DataChart>();
lData.Add(
new
DataChart(
"Savings"
, 50));
lData.Add(
new
DataChart(
"Deposit"
, 25));
lData.Add(
new
DataChart(
"BancaAssurance"
, 12.5));
lData.Add(
new
DataChart(
"MutualFund"
, 12.5));
#endregion
//add slice area
foreach
(DataChart d
in
lData)
{
PieDataPoint point =
new
PieDataPoint(Convert.ToDouble(d.Value), d.Name);
point.Label = d.Name.ToUpper();
point.Label =
string
.Format(
"{0} | {1}%{2}{3} {4}"
, d.Name.ToUpper(), d.Value, Environment.NewLine,
"IDR"
, Convert.ToDouble(d.ValueRp).ToString(
"N0"
));
smartPie.DataPoints.Add(point);
}
chartDonut.Series.Add(smartPie);
#region Setting Series Slice Color
chartDonut.Series[0].Children[0].BackColor = Color.FromArgb(193, 152, 105);
chartDonut.Series[0].Children[1].BackColor = Color.FromArgb(207, 175, 140);
chartDonut.Series[0].Children[2].BackColor = Color.FromArgb(221, 198, 173);
chartDonut.Series[0].Children[3].BackColor = Color.FromArgb(235, 221, 206);
chartDonut.Series[0].IsVisible =
true
;
#endregion
ExportChart(
ref
p_strFileName, chartDonut,
new
Size(690, 360));
}
Hello,
The gray background of the progress bar seems to be theme specific, is it possible to change it to white/transparent without a custom theme?
Attaching a screen shot to indicate the background fill in question.
Hi,
I have multiple rows. Each row has a different currency. How to find sum in Indian currency using summary row.
please find attached.
waiting for your favorable response.
Thanks.
Hello Telerik Support Team,
I'm trying to add a custom button for the RadImageEditor for my application. When I try to do so using
RadMenuItem cst = new RadMenuItem("Item");
radImageEditor1.ImageEditorElement.CommandsElement.CommandsStackEleemnt.Children.Add(cst);
This does get me the button I need, but I am unable to extend add an event handler to this button.
However If I were to create a button and add it to the element by extending RadMenuItem to override the onclick event within a custom class like so:
CustomMenuItem custom = new CustomMenuItem("CustomMenuItem");
radImageEditor1.ImageEditorEleemnt.CommandsElement.CommandsStackElement.Children.Add(custom);
This will get me a flat generic box the form in which I am unable to modify the style of the button to fit with the rest of the form, however this approach will allow me to define my event handler.
How can I go about it to create a proper button within the image editor side bar (to clarify the side bar below the command elements, and be able to setup the onclick to run the function needed as intended?
Thanks,
Hello :)
Currently the SelectionMiniToolBar appears very transparent with its opacity increasing as the user moves the mouse over it - my problem is the RTF control has a white background and this menu has a white background with no border so visually it looks like it bleeds onto the page - its not of course, it's floating above it but i'd like to add a BORDER to the Mini Tool Bar so it's more recognizable.
So now i'm looking for where the SelectionMiniToolBar is referenced and that has me stumped. rtfControl.SelectionMiniToolBar isn't correct (I sort of knew that going in but it's where i started) so my question is this: How do I add a border to the existing SelectionMiniToolBar or do i have to build my own completely separate menu in order to do this?
Kindest regards,
Curtis