This is a migrated thread and some comments may be shown as answers.

Timebar and RadChart/SparkLine X-axis issue

4 Answers 151 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
mandeep bhullar
Top achievements
Rank 1
mandeep bhullar asked on 12 Jul 2011, 11:36 PM
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.

4 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 14 Jul 2011, 01:59 PM
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!

0
mandeep bhullar
Top achievements
Rank 1
answered on 14 Jul 2011, 04:08 PM
Thanks. Setting these properties solved the issue.
0
MB
Top achievements
Rank 1
answered on 14 Oct 2011, 03:52 PM

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.
0
Tsvetie
Telerik team
answered on 17 Oct 2011, 12:28 PM
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 >>

Tags
TimeBar
Asked by
mandeep bhullar
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
mandeep bhullar
Top achievements
Rank 1
MB
Top achievements
Rank 1
Share this question
or