2 color lines in the same value

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

2 color lines in the same value

Post by acastro » Mon Mar 22, 2010 8:49 am

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

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

Re: 2 color lines in the same value

Post by Sandra » Tue Mar 23, 2010 11:34 am

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.
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

acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Re: 2 color lines in the same value

Post by acastro » Tue Mar 23, 2010 11:44 am

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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: 2 color lines in the same value

Post by Yeray » Wed Mar 24, 2010 10:59 am

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).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply