Resize RadCartesianChart's height - is there a minimum height?

2 posts, 0 answers
  1. Jon
    Jon avatar
    1 posts
    Member since:
    Jun 2017

    Posted 07 Jun Link to this post

    Hi

    I have a RadCartesianChart (see XAML below) in a DataGridTemplateColumn but cannot find a way to reduce the amount of vertical space it is taking up.  It seems to have a minimum height?  Please advise.

    <DataGridTemplateColumn Header="MyColumn"
    IsReadOnly="True"
    Width="300">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <telerik:RadCartesianChart Name="MyChart"
    VerticalAlignment="Stretch"
    Margin="10"
    MaxHeight="20">
    <telerik:RadCartesianChart.Behaviors>
    <telerik:ChartTooltipBehavior />
    </telerik:RadCartesianChart.Behaviors>
    <telerik:LineSeries ItemsSource="{Binding HistoricValues}"
    ValueBinding="RawValue"
    CategoryBinding="Year">
    <telerik:LineSeries.PointTemplate>
    <DataTemplate>
    <Ellipse Fill="Blue"
    Width="8"
    Height="8"/>
    </DataTemplate>
    </telerik:LineSeries.PointTemplate>
    </telerik:LineSeries>
    <telerik:RadCartesianChart.HorizontalAxis>
    <telerik:CategoricalAxis />
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis>
    <telerik:LinearAxis Minimum="{Binding HistoricValueMinimum}"
    Maximum="{Binding HistoricValueMaximum}"
    MajorStep="{Binding HistoricValueStep}"
    Visibility="Collapsed"/>
    </telerik:RadCartesianChart.VerticalAxis>
    </telerik:RadCartesianChart>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    </DataGridTemplateColumn>

    Thanks

     

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    1408 posts

    Posted 08 Jun Link to this post

    Hello Jon,

    RadCartesianChart has MinHeight set to 100. You can set it to 0.
    <telerik:RadCartesianChart MinHeight="0"/>

    Regards,
    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top