Select Start/End Date Time period

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mat
Newbie
Newbie
Posts: 2
Joined: Thu May 13, 2010 12:00 am

Select Start/End Date Time period

Post by mat » Mon Jul 05, 2010 4:08 pm

Hello,

As per the attatched image I would like to be able to select a start and end period from from the trend using vertical bars that can be dragged horizontally. Where ever the bar is positioned the corrosponding date from the x axis will be selected (can be passed to other silverlight controls). Is this functionality available? If not would it be possible to develop this functionality on top of the current chart?

Thanks in advance for any help.
Attachments
Trend start end period.PNG
Trend start end period.PNG (110 KiB) Viewed 2466 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Select Start/End Date Time period

Post by Sandra » Tue Jul 06, 2010 8:57 am

Hello mat,

I suggest using ColorLine Tool that lets you move line; consult its position value, etc. I have made a simple example that I think its code you can help you.

Code: Select all

public MainPage()
        {
            InitializeComponent();
            InitializeChart();
        }
        private Steema.TeeChart.Silverlight.Styles.Line line1;
        private Steema.TeeChart.Silverlight.Tools.ColorLine color1, color2;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
         line1 = new Steema.TeeChart.Silverlight.Styles.Line(tChart1.Chart);
         line1.FillSampleValues();
         color1 = new Steema.TeeChart.Silverlight.Tools.ColorLine(tChart1.Chart);
         color2 = new Steema.TeeChart.Silverlight.Tools.ColorLine(tChart1.Chart);
         line1.XValues.DateTime = true;
         color1.Axis = tChart1.Axes.Bottom;
         color2.Axis = tChart1.Axes.Bottom;
         color1.Pen.Width = 2;
         color2.Pen.Width = 2;
         color1.Value = line1.XValues[0];
         color2.Value = line1.XValues[10];
       }
Could you please check if previous code works as you want?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply