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
210
How to Set Axis Titles?
posted

How would go about setting the x and y axis titles.  These are captions below the ticks (ie. Years)?

 

Thanks,

Steve

Parents
No Data
Reply
  • 28496
    Offline posted

    axis titles are not yet a feature of the xamchart.  you can request features here: http://devcenter.infragistics.com/protected/requestfeature.aspx

     here's how you can override the control template to include textblocks at the left and bottom of the control.  you can use these as your axis titles.

    <igCA:XamChart Height="300" Width="300">

    <igCA:XamChart.Template>

    <ControlTemplate>

    <Grid>

    <Grid.ColumnDefinitions>

    <ColumnDefinition Width="25" />

    <ColumnDefinition Width="*" />

    </Grid.ColumnDefinitions>

    <Grid.RowDefinitions>

    <RowDefinition Height="*" />

    <RowDefinition Height="25" />

    </Grid.RowDefinitions>

    <ContentPresenter Name="PART_Default_Chart" Grid.Row="0" Grid.Column="1" />

    <TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" TextAlignment="Center">

    <TextBlock.LayoutTransform>

    <RotateTransform Angle="90" />

    </TextBlock.LayoutTransform>

    Left Title

    </TextBlock>

    <TextBlock Grid.Row="1" Grid.ColumnSpan="2" TextAlignment="Center">Bottom Title</TextBlock>

    </Grid>

    </ControlTemplate>

    </igCA:XamChart.Template>

    </igCA:XamChart>

Children