Page 1 of 1

2 color lines in the same value

Posted: Mon Mar 22, 2010 8:49 am
by 15654539
Hello,

When I have 2 colorLine's in the same value, by example if I see the blue coloLine when I try to drag it I drag the red one. If I change the order in the editor I see the red one but I move first the blue one. Can I change this behaviour?

Thanks

Re: 2 color lines in the same value

Posted: Tue Mar 23, 2010 11:34 am
by 10050769
Hello wakeup,

I make a simple project that I think you can use in your application. Basically code uses a radio button, lets you choose, what colorline you want to drag.

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.Bar bar1;
        Steema.TeeChart.Tools.ColorLine colorline1, colorline2;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar1.FillSampleValues();
            bar1.ColorEach = true;
            colorline1 = new Steema.TeeChart.Tools.ColorLine(tChart1.Chart);
            colorline2 = new Steema.TeeChart.Tools.ColorLine(tChart1.Chart);
            colorline1.Axis = tChart1.Axes.Bottom;
            colorline2.Axis = tChart1.Axes.Bottom;
            colorline1.Pen.Color = Color.Red;
            colorline2.Pen.Color = Color.Blue;
            colorline1.Draw3D = false;
            colorline2.Draw3D = false;
            //-------SELECT COLORLINE2-------//
            colorline2.AllowDrag = true;
            colorline1.AllowDrag = false;
            radioButton1.Checked = false;
        }
        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                colorline1.AllowDrag = true;
            }
        }
Please, check next code works as you want.

Thanks,

I hope will helps.

Re: 2 color lines in the same value

Posted: Tue Mar 23, 2010 11:44 am
by 15654539
Sorry. I think you don't understand the problem.

I don't find usefull to use a checkbox only for the special cases both color lines are in the same value... It should be transparent for the user.
When both color lines are in the same value one over the other, I think it doesn't matter which moves first when I try to drag it, but I think it should be the one with the color is over.

Sorry, my english is a bit limitated.

Thanks

Re: 2 color lines in the same value

Posted: Wed Mar 24, 2010 10:59 am
by yeray
Hi wakeup,

Yes, it seems that the order followed to check what series is going to be dragged should go reverse. I've added it to the wish list to be revised asap (TF02014748).