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

RadChart - Data is not displayed near the edges of the chart

2 Answers 55 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dmitri
Top achievements
Rank 1
Dmitri asked on 07 Oct 2014, 04:09 PM
I'm working on a WPF application and using the Telerik RadChart control.I'm having the following issue:

see demo2.JPG

The number is not displayed for the first and last columns/series.

When I have less columns, everything works great, as in the demo3.JPG

I'm not sure what causes that, and really hope to get any suggestions (maybe its a lack of space, but I'm not sure how to solve that). Thanks!

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 08 Oct 2014, 11:16 AM
Hello Dima,

The reported behavior is caused by the fact that on each layout resize the chart's internal logic checks if the bottom edge of each label is lower than the bottom of the plot area. If so, the label is not added in the chart and therefore it is not visible. In other words if there is not enough space for the label to be displayed correctly centered to the bar, it is removed from the plot area.

To resolve this you can set smaller FontSize for the labels through the SeriesItemLabelStyle.
<telerik:HorizontalBarSeriesDefinition.SeriesItemLabelStyle>
    <Style TargetType="TextBlock">
        <Setter Property="FontSize" Value="8" />
    </Style>   
</telerik:HorizontalBarSeriesDefinition.SeriesItemLabelStyle>
Another approach could be to restrict the chart's height with its MinHeight property.

Please, keep in mind that  RadChart is our old charting component which has many known issues and limitations. This is why we decided to create new charting suite. The new RadChartView consists of few chart controls that can be used depending on your scenario. Furthermore, RadChartView has better implementation and improved performance compared to RadChart. In addition the new components are very flexible and easier to set up. You can read more about the differences between the components in the RadChart vs. RadChartView.

If you just start using a chart or its integration is not very complex I recommend you to try RadChartView.

Please let me know if you need any further assistance.

Regards,
Martin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dmitri
Top achievements
Rank 1
answered on 12 Oct 2014, 08:31 AM
Thank you, Martin, setting the chart's MinHeight property solved this issue for me.

Tags
Chart
Asked by
Dmitri
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Dmitri
Top achievements
Rank 1
Share this question
or