Tag lost changing serie type

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

Tag lost changing serie type

Post by acastro » Mon Mar 22, 2010 11:35 am

When I change with the chartEditor the type of a serie (for example from line to points) I keep all the values of the serie but not the tag. Is correct this behaviour?

Thanks

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

Re: Tag lost changing serie type

Post by Yeray » Tue Mar 23, 2010 4:46 pm

Hi wakeup,

Yes, actually this isn't copied to the new series. I've added this to the wish list to be implemented in future releases (TF02014745)
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

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

Re: Tag lost changing serie type

Post by acastro » Wed Mar 24, 2010 8:21 am

Ok thanks.

Is there any other serie property which it is diferent between series and it can't be changed from chart editor?

I need to identify if the user has changed the order of the series when he use the chart editor... and I think there isn't any evento to detect it.

thanks!

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

Re: Tag lost changing serie type

Post by Yeray » Thu Mar 25, 2010 11:48 am

Hi wakeup,

I've investigated this further and I've seen that the problem was that the tag property wasn't assigned at Series' method AssignFormat(Series source, Series target).
Correcting it I can change the series type and the tag is maintained so the following example seems to work fine:

Code: Select all

        private void InitializeChart()
        {
            chartController1.Chart = tChart1;

            tChart1.Aspect.View3D = false;
            for (int i = 0; i < 4; i++)
            {
                new Steema.TeeChart.Styles.Area(tChart1.Chart);
                tChart1[i].FillSampleValues();
                tChart1[i].Tag = "series " + i;
            }            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string[] tmpTag = new string[tChart1.Series.Count];
            for (int i = 0; i < tChart1.Series.Count; i++)
            {            
                tmpTag[i] = tChart1[i].Tag.ToString();
            }
            Steema.TeeChart.Editor editor1 = new Steema.TeeChart.Editor(tChart1);
            editor1.ShowModal();
            bool changed = false;
            for (int i = 0; i < tChart1.Series.Count; i++)
            {
                if (tmpTag[i] != tChart1[i].Tag.ToString()) changed = true;
            }

            if (changed) MessageBox.Show("the order has changed");            
        } 
So I'll close the ticket with number (TF02014745). Note that this enhancement will be available with the next maintenance release.
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

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

Re: Tag lost changing serie type

Post by acastro » Thu Mar 25, 2010 3:10 pm

I think you don't understand me well. Sorry about my bad english.

If you run your code and change the type of your serie from area to Point (by example) you will get an error because tag is null in the changed serie.

If you change the type in two series and you change the order you can't identify in the code if the order has been changed or not.


I need any property in the serie, which can't be changed by the user, and It is not removed if the user change the type of the serie.

Thanks

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

Re: Tag lost changing serie type

Post by Yeray » Thu Mar 25, 2010 5:06 pm

Hi wakeup,

No, excuse me. I think it was me who haven't explained well.
The code above doesn't work right now but will work with the changes I've made to TeeChart sources.

I'm afraid that, until the next maintenance release isn't published, I can't think on a way to do what you want.
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

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

Re: Tag lost changing serie type

Post by acastro » Thu Mar 25, 2010 5:14 pm

Ok, if it is solved in the next release I can wait.
Thanks!

Post Reply