This question is locked. New answers and comments are not allowed.
Hi,
I have attached the screen shot. I want to display the value 1000 according to the width of the red portion. Is it possible to display the value (1000) on top of the horizontal stacked bar (as shown in the second example) if it does not fit inside the red portion?
We need to show the value inside the bar graph if it fits inside it or else it should be displayed on top of the bar.
I have used the following code:
Regards,
Arvind Robin Kumar.
I have attached the screen shot. I want to display the value 1000 according to the width of the red portion. Is it possible to display the value (1000) on top of the horizontal stacked bar (as shown in the second example) if it does not fit inside the red portion?
We need to show the value inside the bar graph if it fits inside it or else it should be displayed on top of the bar.
I have used the following code:
radChart1.Series.Clear();
radChart1.IntelligentLabelsEnabled =
true
;
ChartSeries cs =
new
ChartSeries();
cs.Items.Add(
new
ChartSeriesItem(1000));
cs.Appearance.BarWidthPercent = 30;
cs.Appearance.FillStyle.MainColor = Color.Red;
cs.Appearance.FillStyle.SecondColor = Color.Red;
//cs.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
cs.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Outside;
cs.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Green;
cs.Type = ChartSeriesType.StackedBar100;
radChart1.Series.Add(cs);
ChartSeries cs1 =
new
ChartSeries();
cs1.Items.Add(
new
ChartSeriesItem(9000));
cs1.Appearance.LabelAppearance.Visible =
false
;
cs1.Appearance.FillStyle.MainColor = Color.Orange;
cs1.Appearance.FillStyle.SecondColor = Color.Orange;
cs1.Type = ChartSeriesType.StackedBar100;
radChart1.Series.Add(cs1);
radChart1.PlotArea.XAxis.Visible = Telerik.Charting.Styles.ChartAxisVisibility.False;
radChart1.PlotArea.YAxis.Visible = Telerik.Charting.Styles.ChartAxisVisibility.False;
radChart1.Legend.Visible =
false
;
radChart1.ChartTitle.Visible =
false
;
radChart1.Update();
Regards,
Arvind Robin Kumar.