Page 1 of 1

Name for a serie

Posted: Fri Feb 18, 2011 12:45 pm
by 14051412
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

Re: Name for a serie

Posted: Fri Feb 18, 2011 3:09 pm
by 10050769
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,

Re: Name for a serie

Posted: Fri Feb 18, 2011 5:10 pm
by 14051412
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

Re: Name for a serie

Posted: Mon Feb 21, 2011 11:57 am
by 10050769
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,