XAxis.MinValue does not work

3 posts, 0 answers
  1. Mario
    Mario avatar
    26 posts
    Member since:
    Oct 2011

    Posted 14 Mar 2014 Link to this post

    I have a RadHtmlChart in which i dinamically create LineSeries. I have successfully set Chart.PlotArea.YAxis.MaxValue and Chart.PlotArea.YAxis.MinValue, but XAxis.MinValue does not work. I'd like to start the series in a way that the first value "thouches" the y-axis. Because in xaxis i have 2006 as first year, I tried to set XAxis.MinValue = 2006, but I always got a gap between the y-axis and the first value in the chart (it seems that the start of xaxis is the half of 2005). I see the same gap at the end of the chart.

    In attachment the screenshot of chart.

  2. Mario
    Mario avatar
    26 posts
    Member since:
    Oct 2011

    Posted 14 Mar 2014 in reply to Mario Link to this post

    Sorry, the forum didn't attach the screenshot.
  3. DevCraft R3 2016 release webinar banner
  4. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 17 Mar 2014 Link to this post

    Hello Mario,

    You can set the justified property of the x-axis through the chartObject which controls that behavior. For example:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            function pageLoad() {
                var chart = $find("<%=LineChart.ClientID%>");
                chart._chartObject.options.categoryAxis.justified = true;
    <telerik:RadHtmlChart runat="server" ID="LineChart" Width="800" Height="500" Transitions="true">
                <telerik:LineSeries Name="Week 15" MissingValues="Interpolate">
                        <telerik:CategorySeriesItem Y="15" />
                        <telerik:CategorySeriesItem Y="23" />
                        <telerik:CategorySeriesItem />
                        <telerik:CategorySeriesItem Y="71" />
                        <telerik:CategorySeriesItem Y="93" />
                        <telerik:CategorySeriesItem Y="43" />
                        <telerik:CategorySeriesItem Y="23" />

    You may also find useful this feedback item that sheds more light on the matter.

    Danail Vasilev

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Back to Top