Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
Howto scale markers in overviewpane accordingly
posted

I'm struggling with the size of the markers in the overview pane.

The overview pane shows the complete chart in a smaller size, but it shows the markers in the original size.

So is there a way to tell the overview pane to show the markers in the correct (smaller) size?

Here is a small sample which shows the problem:

<Window x:Class="MarkerInOverview.MainWindow"

  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

  xmlns:ig="http://schemas.infragistics.com/xaml"

  Unloaded="OnUnloaded"

  Title="MainWindow" Height="350" Width="525">

  <Grid>

     <ig:XamDataChart

        WindowResponse="Immediate"

        OverviewPlusDetailPaneVisibility="Visible"

    OverviewPlusDetailPaneHorizontalAlignment="Right"

    OverviewPlusDetailPaneVerticalAlignment="Bottom"

    VerticalZoomable="True"

    HorizontalZoomable="True"

        HorizontalZoombarVisibility="Visible"

        VerticalZoombarVisibility="Visible"

        >

        <ig:XamDataChart.Axes>

           <ig:NumericXAxis x:Name="TheXAxis"

              MinimumValue="0"

              MaximumValue="800">

            </ig:NumericXAxis>

            <ig:NumericYAxis x:Name="TheYAxis"

               MinimumValue="0"

               MaximumValue="600">

            </ig:NumericYAxis>

        </ig:XamDataChart.Axes>

        <ig:XamDataChart.Series>

           <ig:ScatterSeries ItemsSource="{Binding MovingPointToShow}"

              XMemberPath="X"

              YMemberPath="Y"

              MarkerType="Square"

              MarkerBrush="Blue"

              XAxis="{Binding ElementName=TheXAxis}"

              YAxis="{Binding ElementName=TheYAxis}"

              >

              <ig:ScatterSeries.MarkerTemplate>

                 <DataTemplate>

                    <Rectangle Width="160"

                       Height="120"

                       Fill="Blue" />

                 </DataTemplate>

              </ig:ScatterSeries.MarkerTemplate>

           </ig:ScatterSeries>

        </ig:XamDataChart.Series>

    </ig:XamDataChart>

 </Grid>

</Window>

Code behind:

namespace MarkerInOverview

{

   /// <summary>

      /// Interaction logic for MainWindow.xaml

      /// </summary>

      public partial class MainWindow : Window

      {

         private ObservableCollection<Point> MovingPointToShow

         {

            get { return (ObservableCollection<Point>)GetValue(MovingPointToShowProperty); }

            set { SetValue(MovingPointToShowProperty, value); }

         }

         public static readonly DependencyProperty MovingPointToShowProperty =

            DependencyProperty.Register("MovingPointToShow", typeof(ObservableCollection<Point>), typeof(MainWindow), new PropertyMetadata(null));

 

   DispatcherTimer dt = null;

   double _X = 400;

   double _Y = 300;

   Random _Random = new Random();

 

   public MainWindow()

      {

            InitializeComponent();

       this.MovingPointToShow = new ObservableCollection<Point>();

      this.MovingPointToShow.Add(new Point(_X,_Y));

 

            DataContext =this;

            dt =new DispatcherTimer();

            dt.Interval =new TimeSpan(0, 0, 0, 0, 200);

            dt.Tick += (sender, e) =>

            {

         this.MovingPointToShow.Clear();

               _X += (_Random.NextDouble() - 0.5) * 10;

               _Y += (_Random.NextDouble() - 0.5) * 10;

         this.MovingPointToShow.Add(new Point(_X,_Y));

            };

            dt.Start();

      }

 

   private void OnUnloaded(object sender, RoutedEventArgs e)

   {

      if(dt!=null)

            {

               dt.Stop();

               dt =null;

            }

         }

      }

}

 

  • 17475
    Offline posted

    Hello Michael and thank you for posting!

    The size of the markers in the overview pane depends on the size of the markers in the plot area as you have mentioned. Currently there is not build-in functionality for modifying only the markers within the overview pane. This could be done at run time by going through the visual tree and update the size for each item which is not an optimal resolution as it would reflect the performance.
    I would suggest you to add this suggestion as a new product idea at http://ideas.infragistics.com and it may be added in one of our future releases.

    Steps to create your idea:
                   
    1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).
    2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
    3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!

    The benefits of submitting the product idea yourself include:
    - Direct communication with our product management team regarding your product idea.
    - Notifications whenever new information regarding your idea becomes available.

    Additional benefits of the Product Idea system include:

    - Ability to vote on your favorite product ideas to let us know which ones are the most important to you.  You will have ten votes for this and can change which ideas you are voting for at any time.
    - Allow you to shape the future of our products by requesting new controls and products altogether.
    - You and other developers can discuss existing product ideas with members of our Product Management team.

    The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.