This question is locked. New answers and comments are not allowed.
see attached file...
6 Answers, 1 is accepted
0
Lancelot
Top achievements
Rank 1
answered on 12 Jun 2012, 10:16 PM
Hi Pedro,
After looking at your chart, I can see where your problem lies. If you take a closer look at the two items that have the yellow tops, the total amount added in the bar is only 30.
All your other bars have 31 as a total value and therefore have no room left. So what is happening? The chart is making up for the remaining value of 1 with the yellow section.
Also, you may want to adjust your Y-Axis to have a max value of 31. As it is now, you have a value of 100 which does not represent your bars' values.
I hope this answer clears things up for you. If it does not, please tell me a bit more on what you are trying to achieve, a single image is difficult to ascertain what your goals are.
Good Luck!
Lancelot
After looking at your chart, I can see where your problem lies. If you take a closer look at the two items that have the yellow tops, the total amount added in the bar is only 30.
All your other bars have 31 as a total value and therefore have no room left. So what is happening? The chart is making up for the remaining value of 1 with the yellow section.
Also, you may want to adjust your Y-Axis to have a max value of 31. As it is now, you have a value of 100 which does not represent your bars' values.
I hope this answer clears things up for you. If it does not, please tell me a bit more on what you are trying to achieve, a single image is difficult to ascertain what your goals are.
Good Luck!
Lancelot
0
Pedro
Top achievements
Rank 1
answered on 19 Jun 2012, 05:18 PM
Hi Lancelot,
Thanks for the reply, but the problem is that these values are dynamic. See this other example.
Thanks for the reply, but the problem is that these values are dynamic. See this other example.
0
Lancelot
Top achievements
Rank 1
answered on 20 Jun 2012, 10:07 PM
Hi Pedro,
Thank you for providing another image. It is hard to really determine what is going without your actual code, however in this new image it appears that label for the value is not being shown because there is not enough room left to display the label.
For instance, all the other gray values are displayed because there is room between the end of the blue range and the top of the chart. In columns 1,2 and 4 there is no room left over. Except for the first category (green), the label will appear in its own section of the bar. So if you have a value that is a few percent and at the top of the chart, the label wont display.
You could create your own custom Style for the ItemLabel you can find instructions on that here, but you may end up needed to edit the entire control template to allow the value to show even when there is no room. This link will bring you to the Styling Overview for the entire RadChart. To learn how to extract the entire control template, this link will demonstrate that for you.
Good Luck
Lancelot
Thank you for providing another image. It is hard to really determine what is going without your actual code, however in this new image it appears that label for the value is not being shown because there is not enough room left to display the label.
For instance, all the other gray values are displayed because there is room between the end of the blue range and the top of the chart. In columns 1,2 and 4 there is no room left over. Except for the first category (green), the label will appear in its own section of the bar. So if you have a value that is a few percent and at the top of the chart, the label wont display.
You could create your own custom Style for the ItemLabel you can find instructions on that here, but you may end up needed to edit the entire control template to allow the value to show even when there is no room. This link will bring you to the Styling Overview for the entire RadChart. To learn how to extract the entire control template, this link will demonstrate that for you.
Good Luck
Lancelot
0
Accepted
Hello Pedro,
Thank you for the attached screenshots. You can try to disable the smart labels:
Also for the last series you can set the LabelDisplayMode to Inside:
Instead of the LegendDisplayMode you may also set a series item label style with a margin:
I have attached a simple project to demonstrate the suggestions.
All the best,
Petar Marchev
the Telerik team
Thank you for the attached screenshots. You can try to disable the smart labels:
this
.chart1.DefaultView.ChartArea.SmartLabelsEnabled =
false
;
Also for the last series you can set the LabelDisplayMode to Inside:
<
telerik:StackedBar100SeriesDefinition
>
<
telerik:StackedBar100SeriesDefinition.LabelSettings
>
<
telerik:BarLabelSettings
LabelDisplayMode
=
"Inside"
/>
Instead of the LegendDisplayMode you may also set a series item label style with a margin:
<
telerik:StackedBar100SeriesDefinition
>
<
telerik:StackedBar100SeriesDefinition.SeriesItemLabelStyle
>
<
Style
TargetType
=
"telerik:SeriesItemLabel"
>
<
Setter
Property
=
"Margin"
Value
=
"0 7 0 0"
/>
I have attached a simple project to demonstrate the suggestions.
All the best,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Pedro
Top achievements
Rank 1
answered on 21 Jun 2012, 02:15 PM
Hello Petar,
Thank you so much, using this option "<telerik:BarLabelSettings LabelDisplayMode="Inside" />". The values were superimposed see (fig1.png).
I decided as follows(see test_hist.png):
seriesDefinition.LabelSettings.LabelDisplayMode = LabelDisplayMode.Outside;
seriesDefinition.LabelSettings.Distance = 0d;
Pedro.
Thank you so much, using this option "<telerik:BarLabelSettings LabelDisplayMode="Inside" />". The values were superimposed see (fig1.png).
I decided as follows(see test_hist.png):
seriesDefinition.LabelSettings.LabelDisplayMode = LabelDisplayMode.Outside;
seriesDefinition.LabelSettings.Distance = 0d;
Pedro.
0
Hello Pedro,
My suggestion was to set the display mode to Inside only for the last series. Give this a try and see if you like the results.
Greetings,
Petar Marchev
the Telerik team
My suggestion was to set the display mode to Inside only for the last series. Give this a try and see if you like the results.
Greetings,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>