Chart across multiple Panorama items

Thread is closed for posting
4 posts, 0 answers
  1. Dele
    Dele avatar
    23 posts
    Member since:
    Jun 2012

    Posted 03 Sep 2011 Link to this post

    I am having some difficulty showing a chart across multiple panoramas so that users can pan horizontally to see the rest of the chart.
    What happens right now is when the Orientation of the panorama item is Vertical, data shows up on my chart, however, it gets cut off when it gets to the end of the panorama.

    If I make the panorama orientation horizontal, my chart gets cut off altogether.

    How can I accomplish expanding my chart horizontally across multiple panorama items.  Here is a code sample of what I have:

    <controls:PanoramaItem Header="job trends" Margin="0,-25,0,0">
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        <StackPanel Orientation="Horizontal">
                            <Button x:Name="btnEmployment"
                            <Button x:Name="btnYearly"
                            <Button x:Name="btnHourly"
                        <TextBlock Text="TOP EMPLOYED OCCUPATIONS IN 2010"
                                   Style="{StaticResource PhoneTextNormalStyle}" />
                        <telerikChart:RadCartesianChart x:Name="radChartEmployment"
                                <telerikChart:ChartTooltipBehavior TriggerMode="Tap"
                                                                   SnapToClosestPoint="True" />
                                <telerikChart:CartesianChartGrid Style="{StaticResource gridStyleDashed}" MajorLinesVisibility="Y"/>
                                <telerikChart:LinearAxis LineStroke="{StaticResource PhoneDisabledBrush}"
                                <telerikChart:CategoricalAxis LabelFitMode="Rotate"
                                                              ShowLabels="False" />
                            <telerikChart:BarSeries CategoryBinding="Title"
                                                    ItemsSource="{Binding TopJobEmploymentStats, Mode=TwoWay}">
                                        <Border Background="{StaticResource Series2Brush}"
                                                BorderBrush="{StaticResource Series2BorderBrush}"

  2. Georgi
    Georgi avatar
    296 posts

    Posted 07 Sep 2011 Link to this post

    Hi Dele,

    Thank you for contacting us.

    Do you mean the orientation of the Page - Landscape vs. Portrait? I am asking because we recently found a bug in our PhoneApplicationFrame related to changes in orientation. The frame has a property OrientationChangedAnimation which by default is set to a RadFadeAnimation instance. The animation will override the RenderTransform property of the frame while the base framework relies on some transformations to handle the orientation change (this is new in Mango). You can easily workaround this bug by simply setting the OrientationChangedAnimation property to null.

    Let me know whether this fixes the issue. If the problem still exists I would kindly ask you to prepare a simple project that demonstrates the wrong behavior so that I may debug it locally and isolate the cause.

    Best wishes,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Dele
    Dele avatar
    23 posts
    Member since:
    Jun 2012

    Posted 07 Sep 2011 Link to this post

    Hello Georgi,

    Actually, i'm referring to the orientation of the panorama item itself, not the whole page.  The panorama item has an Orientation property you can set to Horizontal or Vertical.  When I set it to horizontal and increase the width of the panorama item, I would expect it the chart to take up as much space as needed.

    I'm trying to get the kind of experience where the user can pan my panorama control and view more of the chart as they pan horizontally.
  4. Victor
    Victor avatar
    1358 posts

    Posted 12 Sep 2011 Link to this post

    Hello Dele,

     Thank you for the question.
    In order to create a chart like this, you have to create as many panorama items you need in order accommodate the desired size of the chart. When you have those, all of them must be empty except the first one, which will contain the chart. Now you have to make the chart in the first panorama item to extend over the other empty items. This can easily be done by setting a negative right margin. For example if you need the chart to occupy three panorama items you set the right margin to be -(3 * 480) and then update that margin accordingly as your orientation changes.

    Please write again if you have other questions.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top