Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
axes title
posted

Hi

Is there anyway to put axes titles in XamDataCharts?

Thanks
tungngie

Parents
  • 27093
    posted
    Hello Tungngie,
     
    There currently is no such built in functionality supposedly because it can be easily created by adding a TextBlock and aligning it. I have created a xaml snippet for you showing how to easily align top-right and bottom-right axis titles:
     
    <TextBlock x:Name="BottomRightCaption"
                VerticalAlignment="Bottom"
                HorizontalAlignment="Right"
                Foreground="Red"
                Text="AXIS CAPTION"
                Margin="10,10,45,10" />
     
    Here I have used my OutsideRightAxis’ AxisLabelSettings’ Extent property as the title’s right margin value: <igChart:AxisLabelSettings Location="OutsideRight" Extent="45" />
     
     
    <TextBlock x:Name="TopRightCaption"
                VerticalAlignment="Top"
                HorizontalAlignment="Right"
                Foreground="Red"
                Text="AXIS CAPTION"
                Margin="10,35,10,10" >
        <TextBlock.LayoutTransform>
            <RotateTransform  Angle="90" />
        </TextBlock.LayoutTransform>
    </TextBlock>
     
    Here I have used my OutsideTopAxis’ AxisLabelSettings’ Extent property as the title’s top margin value: <igChart:AxisLabelSettings Location="OutsideTop" Extent="35" />
     
     Hope this helps. Please let me know if you require any further assistance on the matter.
     
    Sincerely,
    Petar Monov
    Developer Support Engineer
    Infragistics Bulgaria
Reply Children