create custom mark?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

create custom mark?

Post by Eric » Fri Dec 08, 2006 6:15 am

Dear Sir

How do create custom mark? because I want the TChart mark display
Percentage and Value.

Thank
Eric

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 08, 2006 3:18 pm

Hi Eric,
you can customize the Mark text by using the GetSeriesMark event of the Series.
Please see the help for details.

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Mon Dec 18, 2006 2:16 am

Can you please give me some sample code?
Your think that is enought information from TChart Help.chm

Triggered on placing Mark for each Series Point. Use this method to modify the Mark Text content.public GetSeriesMarkEventHandler GetSeriesMark
Remarks
Triggered on placing Mark for each Series Point. Use this method to modify the Mark Text content.


Eric

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Dec 18, 2006 7:22 am

Hi.

The following example uses series GetSeriesMarj event to customize individual mark text:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            line1.Marks.Visible = true;
            line1.FillSampleValues();
        }

        private void line1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
        {
            // mark displays point pct and value
            double value = series.YValues[e.ValueIndex];
            double pct = value/series.YValues.TotalABS;
            e.MarkText = value.ToString()+" " +pct.ToString("0.00 %"); 
        }
Marjan Slatinek,
http://www.steema.com

Eric
Newbie
Newbie
Posts: 99
Joined: Wed Sep 14, 2005 4:00 am

Post by Eric » Mon Dec 18, 2006 7:46 am

Dear Sir

Thank...

Post Reply