Page 1 of 1

Select Start/End Date Time period

Posted: Mon Jul 05, 2010 4:08 pm
by 15656156
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.

Re: Select Start/End Date Time period

Posted: Tue Jul 06, 2010 8:57 am
by 10050769
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,