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

RadPolarChart Problem with circle size

8 Answers 99 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
linnet
Top achievements
Rank 1
linnet asked on 05 Jan 2013, 03:07 AM
Hi!
I'm using RadPolarChart and RadChart to create Decision Analysis Demo.
On Attached file(charts.png) the Top-Left Chart is RadPolarChart uses RadialAxis.
The label text is too long so circle size become small.
If possible no wrap but circle can fill the grid.

Here is my code:
<UserControl.Resources>
    <Style x:Key="MajorTickStyle" TargetType="Rectangle">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
    <Style x:Key="PolarAxisLabelStyle" TargetType="TextBlock">
        <Setter Property="Margin" Value="7,0,0,0" />
        <Setter Property="FontFamily" Value="Arial" />
    </Style>
    <Style x:Key="RadarAxisLabelStyle" TargetType="TextBlock">
        <Setter Property="Margin" Value="5" />
        <Setter Property="FontFamily" Value="Arial" />
    </Style>
</UserControl.Resources>
<telerik:RadPolarChart x:Name="RadPolarChart1" Grid.Row="0" Grid.Column="0" Margin="0">
    <telerik:RadPolarChart.Grid>
        <chartView:PolarChartGrid GridLineVisibility="Both" />
    </telerik:RadPolarChart.Grid>
    <telerik:RadPolarChart.RadialAxis>
        <chartView:CategoricalRadialAxis MajorTickStyle="{StaticResource MajorTickStyle}" LabelStyle="{StaticResource RadarAxisLabelStyle}" />
    </telerik:RadPolarChart.RadialAxis>
    <telerik:RadPolarChart.PolarAxis>
        <chartView:PolarAxis Minimum="0" Maximum="0.15" LabelInterval="3" LabelFormat="p2" LabelStyle="{StaticResource PolarAxisLabelStyle}" />
    </telerik:RadPolarChart.PolarAxis>
    <chartView:RadarAreaSeries>
        <chartView:RadarAreaSeries.DataPoints>
            <telerik:CategoricalDataPoint Category="ABCDEFGHIJKLMN111111" Value="0.011" />
            <telerik:CategoricalDataPoint Category="BCDEFGHIJKLMNA111111" Value="0.011" />
            <telerik:CategoricalDataPoint Category="CDEFGHIJKLMNAB111111" Value="0.124" />
            <telerik:CategoricalDataPoint Category="DEFGHIJKLMNABC111111" Value="0.08" />
            <telerik:CategoricalDataPoint Category="EFGHIJKLMNABCD111111" Value="0.133" />
        </chartView:RadarAreaSeries.DataPoints>
    </chartView:RadarAreaSeries>
</telerik:RadPolarChart>

Thank you for the support.

8 Answers, 1 is accepted

Sort by
0
Accepted
Petar Marchev
Telerik team
answered on 10 Jan 2013, 06:58 AM
Hi Linnet,

This is a known issue, which is already logged in our PITS where you can vote for it and track its status. I have attached a project to demonstrate one possible work-around for this. Examine the attachment and see if you can apply the suggested work-around in your actual app. This approach involves the RadialAxisLabelTemplate template, RadialAxisLabelStyle style and the RadPolarChart1_LayoutUpdated event handler, so please go through it carefully.

Greetings,
Petar Marchev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Trude
Top achievements
Rank 2
answered on 07 Feb 2013, 12:07 AM
While this work-around works in the limited scenarios I have tested - it would be nice if you could fix it in the near future.
0
Trude
Top achievements
Rank 2
answered on 19 Dec 2013, 02:26 PM

I can see that this issue is marked as resolved in PITS.

With the latest release the circle still becomes very small with long labels.

The workaround is still necessary, but not ideal as it clips the labels.

Any other solutions/workaround possible?

0
Petar Marchev
Telerik team
answered on 24 Dec 2013, 01:44 PM
Hi Jorn,

Can you provide us with a snapshot of the result that you get so that we can see how the chart has arranged its elements. Perhaps you can use a label template which wraps the text in two or three rows (and a specific Width, say 50).

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Trude
Top achievements
Rank 2
answered on 05 Feb 2014, 08:49 AM
Hello,

Attached is three screenshots. One with default chart behaviour, second one with the workaround found earlier in this thread and the third with just applying a style like this:

            <Style x:Key="RadialAxisLabelStyle" TargetType="TextBlock">
                <Setter Property="Width" Value="80"/>
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="Margin" Value="10,10,10,10"/>
            </Style>


With the workaround the size and label layout is nice but the labels themselves are clipped. With styling it looks OK, but the short labels are wasting space by being a little too far from the chart (making the chart itself smaller).
0
Petar Marchev
Telerik team
answered on 05 Feb 2014, 09:46 AM
Hello Jorn,

I am sorry to hear that you are still having problems with this. I have attached a modified version of the previous project to handle the default TextBlock instead of the Canvas in the DataTemplate. With this update, the TextBlock's alignment is toggled and the labels are positioned closer to the chart.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Trude
Top achievements
Rank 2
answered on 05 Feb 2014, 01:15 PM
Thanks - I think this is acceptable. One last question - In our application the user is able to add/remove the datapoints (by filtering the result set). Should I leave the LayoutUpdated event since this only runs once now?
0
Petar Marchev
Telerik team
answered on 05 Feb 2014, 01:34 PM
Jorn,

I think it will suffice if the code runs once each time the chart is rebound.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
linnet
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Trude
Top achievements
Rank 2
Share this question
or