Name for a serie

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lolo
Newbie
Newbie
Posts: 11
Joined: Thu Jan 08, 2009 12:00 am

Name for a serie

Post by lolo » Fri Feb 18, 2011 12:45 pm

Hi forum...

I have the next question.

I have two fastlines into my chart, fastline1 and fastline2.
Now, i need to insert a name foreach fastline. I need that this name appears over the fastline.
I dont need the legend for each point, only the name for this fastline.

thankyou

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

Re: Name for a serie

Post by Sandra » Fri Feb 18, 2011 3:09 pm

Hello lolo,

I have made a simple code for you that assign different name for each Fastlines:

Code: Select all

 public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        Steema.TeeChart.Styles.FastLine Fastline1, Fastline2;
        private void InitializeChart()
        {
            Fastline1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            Fastline2 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            Fastline1.FillSampleValues();
            Fastline2.FillSampleValues();
            Fastline1.Title = "Car";
            Fastline2.Title = "Bike";
        }
Could you say us if it works as expected?

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

lolo
Newbie
Newbie
Posts: 11
Joined: Thu Jan 08, 2009 12:00 am

Re: Name for a serie

Post by lolo » Fri Feb 18, 2011 5:10 pm

Hello Sandra

Thankyou for this code. But when I assign for example, fastline1.Title = "hola mundo", this name appears in the legend, and what i need is that name over the fastline and not in the legend. I need this name into the chart.

how can i do it???

Thank you

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

Re: Name for a serie

Post by Sandra » Mon Feb 21, 2011 11:57 am

Hello lolo,
Sorry, I had not understood well your problem. I suggest that use Mark tip tool, as do in next example:

Code: Select all

 Steema.TeeChart.Styles.FastLine Fastline1, Fastline2;
        Steema.TeeChart.Tools.MarksTip tip; 
        private void InitializeChart()
        {
            Fastline1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            Fastline2 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            Fastline1.FillSampleValues();
            Fastline2.FillSampleValues();
            Fastline1.Title = "Car";
            Fastline2.Title = "Bike";
            tip = new Steema.TeeChart.Tools.MarksTip(tChart1.Chart);
            tip.Style = Steema.TeeChart.Styles.MarksStyles.SeriesTitle;
        }
And other solution would be, use Annotation tool where you can take a look to examples of Demo project, concretely All Features\Welcome !\Tool\Annotation . If these options don’t work as you want please let me know.

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