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

rotate series label

7 Answers 366 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 20 Jul 2009, 02:30 AM
Hi,

Is it possible to rotate a series label 90 degrees?

Kevin.

7 Answers, 1 is accepted

Sort by
0
Paul Ezerski
Top achievements
Rank 1
answered on 20 Jul 2009, 05:42 PM

chart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 90;

0
Kevin
Top achievements
Rank 1
answered on 20 Jul 2009, 10:20 PM
Sorry, I mean the data point label so for a bar chart each value is vertical across the bar
0
Vladimir Milev
Telerik team
answered on 21 Jul 2009, 07:34 AM
Hi Kevin,

Unfortunately this is not supported yet out of the box yet. You can achieve this by overriding the SeriesItemLabel template using a custom style. Here is the default template shipped with RadChart:

<Setter Property="Template" > 
    <Setter.Value> 
        <ControlTemplate TargetType="telerikCharting:SeriesItemLabel"
            <Canvas> 
                <TextBlock x:Name="PART_TextContainer" 
                    Canvas.Top="{TemplateBinding TextContainerCanvasTop}" 
                    Canvas.Left="{TemplateBinding TextContainerCanvasLeft}" 
                    VerticalAlignment="Stretch" 
                    TextAlignment="Center" 
                    Text="{TemplateBinding Content}" 
                    Foreground="{TemplateBinding Foreground}" /> 
            </Canvas> 
        </ControlTemplate> 
    </Setter.Value> 
</Setter> 

In WPF you can apply a rotate transform to rotate the textblock by 90 degrees.

Best wishes,
Vladimir Milev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kevin
Top achievements
Rank 1
answered on 21 Jul 2009, 08:01 PM
can this be done in C#?

K
0
Giuseppe
Telerik team
answered on 22 Jul 2009, 08:45 AM
Hi Kevin,

Unfortunately as my colleague noted this is not supported out-of-the-box yet. We will forward your inquiry to our developers for further consideration so this can be added for one of the future releases of the control.


Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Silvan
Top achievements
Rank 1
answered on 08 Mar 2010, 06:01 PM
Hi,

Is there already a way to transform the data point label of the bar to be vertical in c# or vb-code?

Thanks
Marcel
0
Giuseppe
Telerik team
answered on 11 Mar 2010, 06:04 PM
Hi Marcel,

We have extended the label positioning API and added smart positioning algorithm for the Q1 2010 release but unfortunately it is still not possible to rotate the label with C# code only. This feature request is also added to our our public issue tracking system.


Best wishes,
Freddie
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Andi
Top achievements
Rank 1
commented on 24 Jun 2021, 01:06 PM

Is it now possible to rotate the series labels by an given angel?
Martin Ivanov
Telerik team
commented on 28 Jun 2021, 07:07 AM

I already posted an answer in the other forum: https://www.telerik.com/forums/rotate-series-labels

 

Tags
Chart
Asked by
Kevin
Top achievements
Rank 1
Answers by
Paul Ezerski
Top achievements
Rank 1
Kevin
Top achievements
Rank 1
Vladimir Milev
Telerik team
Giuseppe
Telerik team
Silvan
Top achievements
Rank 1
Share this question
or