http://es.infragistics.com/help/topic/3749cb6a-9858-447a-8fd2-80db85c7aca1I need to present labels under data values in my chart as shown in the above link.I would like to accomplish this:1.) Set the angle of the label to minus 15 (-15)2.) Display a label under every value3.) Position the label such that the entire label is visible to the viewer and not overlaid on top of the chart (see above link).For example if the value of the label is "My label" the "M" must not be outside the margin of the chart and the "l" must not be over the chart area.My chart displays only 20 values and the labels are timestamp strings i.e "11:21:56"
Thank you!
Here is xaml:
<
ig:XamDataChart Name="xamDataChart1" Width
="600" >
<ig:XamDataChart.Axes
>
<ig:NumericYAxis
MinimumValue="0"
IsLogarithmic
="False"
x:Name
="YAxis" >
</ig:NumericYAxis
<ig:CategoryXAxis
x:Name="XAxis"
ItemsSource="{Binding Load
}"
Label
="{}{Label}">
<ig:CategoryXAxis.LabelSettings
<ig:AxisLabelSettings Angle="-15" FontSize="9" Extent="100" HorizontalAlignment="Left" Location="OutsideBottom"></ig:AxisLabelSettings
</ig:CategoryXAxis.LabelSettings
</ig:CategoryXAxis
</ig:XamDataChart.Axes
<ig:XamDataChart.Series
<ig:ColumnSeries ItemsSource="{Binding Load
ValueMemberPath="Value"
XAxis="{Binding ElementName
=XAxis}"
YAxis="{Binding ElementName
=YAxis}">
</ig:ColumnSeries
</ig:XamDataChart.Series
</ig:XamDataChart
Hello,
Thank you for your post. I have been looking into it and I can suggest you set the CategoryXAxis like this:
<ig:CategoryXAxis x:Name="XAxis" Interval="1" ItemsSource="{Binding Load}"> <ig:CategoryXAxis.LabelSettings> <ig:AxisLabelSettings Extent="50" Location="OutsideBottom" FontSize="9" HorizontalAlignment="Left"/> </ig:CategoryXAxis.LabelSettings> <ig:CategoryXAxis.Label> <DataTemplate> <TextBlock Text="{Binding Item.Label}"> <TextBlock.RenderTransform> <TransformGroup> <RotateTransform Angle="-15" /> <TranslateTransform Y="30"></TranslateTransform> </TransformGroup> </TextBlock.RenderTransform> </TextBlock> </DataTemplate> </ig:CategoryXAxis.Label> </ig:CategoryXAxis>
in order to achiev the functionality you want.
Hope this helps you.
Thank you Stefan, unfortunately the textbox is not displayed correctly: The text does not display even when set to a hardcoded value as I have done below. Also, the textbox does not appear at an angle it is horizontal.
<code>
ig:CategoryXAxis
Interval
="1">
<ig:AxisLabelSettings
Extent="20"
FontSize="9"
HorizontalAlignment="Left"
Foreground
="LightGray"
Location
="OutsideBottom">
</ig:AxisLabelSettings
<ig:CategoryXAxis.Label
<DataTemplate
<TextBlock Text="this text does not display" Width="80">
<TextBlock.RenderTransform>
<TransformGroup>
<RotateTransform Angle="-15" />
<TranslateTransform Y="30"></TranslateTransform>
</TransformGroup>
</TextBlock.RenderTransform
</TextBlock
</DataTemplate
</ig:CategoryXAxis.Label
</code>
Hello Sam,
Since I cannot be completely sure how your data is organized, I am not able to conclude what can cause your behavior, so could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Hello Stephan, the structure of my data is not relevent to the issue I described. Be careful when using canned responses they go to many people LOL :)
From: Infragistics Community - Automated Email [mailto:no-reply@infragistics.com] Sent: Tuesday, November 06, 2012 10:20 PMTo: Wheat, SamSubject: Re: DataPresenterExcelExporter - Entry point was not found error
Re: DataPresenterExcelExporter - Entry point was not found errorBy [Infragistics] Stefan Stoyanov in xamDataGrid
Hello Derrick,
From: Infragistics Community - Automated Email [mailto:no-reply@infragistics.com] Sent: Tuesday, November 06, 2012 10:20 PMTo: Wheat, SamSubject: Re: How to format x axis label with negative angle
Re: How to format x axis label with negative angleBy [Infragistics] Stefan Stoyanov in xamDataChart
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Problem was traced to one of our internal styles.
Thanks for your help Stefan.
Hi Stefan, There is some problem in my app that I am unable to find and I am unable to use the chart as you suggest. If I can find a resolution I will post it here.