Timebar and RadChart/SparkLine X-axis issue

5 posts, 1 answers
  1. mandeep bhullar
    mandeep  bhullar avatar
    6 posts
    Member since:
    Dec 2009

    Posted 12 Jul 2011 Link to this post

    Hi,

    I am using RadTimebar for visualizing data across time. However, I am facing an alignment issue. I tried using Sparkline as well as RadChart but the problem seems consistent. As data progesses over time, the bars (corresponding to each day (time period)) seem to shift to the left, making them inconsistent with the dates shown on the RadTimebar. Please find attached a screenshot of the issue. Please let me know if there is any property that needs to be set to avoid this kind of behaviour or am I missing something.

    Thanks.

  2. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 14 Jul 2011 Link to this post

    Hi Mandeep Bhullar,
    I already answered your support ticket on the same topic. I will post the information here as well, so that it is available to all, who might have the same question:

    I am not quite sure what your specific setup is and that is why, I cannot tell you exactly what is causing the problem that you describe. Basically, in case you define a chart as content of the timeBar, you should remove its y-axis, its legend and the margin and padding of the chartArea, so that the content of the chart will spread over the same area as the content of the timeBar. For example:
    <telerik:RadChart x:Name="RadChart1" ItemsSource="{Binding SpeedForTrack, ElementName=viewModel}">
                    <telerik:RadChart.DefaultView>
                        <telerik:ChartDefaultView>
                            <telerik:ChartDefaultView.ChartLegend>
                                <telerik:ChartLegend Visibility="Collapsed"></telerik:ChartLegend>
                            </telerik:ChartDefaultView.ChartLegend>
                            <telerik:ChartDefaultView.ChartArea>
                                <telerik:ChartArea Margin="0 0 0 0" Padding="0 0 0 0">
                                    <telerik:ChartArea.AxisY>
                                        <telerik:AxisY Visibility="Collapsed" />
                                    </telerik:ChartArea.AxisY>
                                </telerik:ChartArea>

    In case you need additional help with that, please send me a simple test project in the support thread that demonstrates the problem.

    Greetings,
    Tsvetie
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. mandeep bhullar
    mandeep  bhullar avatar
    6 posts
    Member since:
    Dec 2009

    Posted 14 Jul 2011 Link to this post

    Thanks. Setting these properties solved the issue.
  5. MB
    MB avatar
    23 posts
    Member since:
    Aug 2007

    Posted 14 Oct 2011 Link to this post


    In my case, these properties helped, but did not resolve the issue for me.

    Gradually, over the time period, the chart bars become offset with the timebar.

    The first few periods look fine.

    Although I am confident it is the same range - is there a way to bind the chart x-axis range to the timebar PeriodStart / PeriodEnd?
    I tried element binding and using the MinValue/MaxValue but that does not seem to do anything.
  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 17 Oct 2011 Link to this post

    Hello Mb,
    You cannot bind the chart's x-axis range to the properties of the timebar. You can, however, set that range manually. In order to do this, you should set the AutoRange property of the x-axis to "False". For additional information, please refer to the following help topic - http://www.telerik.com/help/silverlight/radchart-features-axes-x-axis.html.

    In case you need additional help with that, please open a formal support ticket and send me a running test project, that demonstrates the problem you have.

    All the best,
    Tsvetie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner