data table tool in teechart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

data table tool in teechart

Post by Neelam » Thu Feb 18, 2010 10:25 am

I want to add custom values to data table tool, how to do that. for example it shows a row of Y values data of series 1. Now i wt to add a second row where i want to show some text values based on some calculations . plesae let me know how to do that .. iTS VVV urgent!! MANY tahnks in advance..

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Fri Feb 19, 2010 5:17 am

its very urgent. please reply ASAp. I want to basically show some text values in rows of data table tool added to my BAR chart. But currently ( default feature) its accepting only Y bar numeric values(Series numeric values).

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

Re: data table tool in teechart

Post by Sandra » Fri Feb 19, 2010 12:04 pm

Hello shikha,

I made a simple code that adds text to DataTable Tool using auxiliary series. Please see next code and check that works as you want.

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private Steema.TeeChart.Styles.Bar bar1, bar2;
        private Steema.TeeChart.Tools.DataTableTool datatool1;
        private void InitializeChart()
        {
            bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            bar2 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
            datatool1 = new Steema.TeeChart.Tools.DataTableTool(tChart1.Chart);

            bar1.FillSampleValues();
            bar2.DataSource = bar1;
            bar2.Color = Color.Transparent;
            bar2.ShowInLegend = false;
            bar2.Title = "";
            for (int i = 0; i < bar1.Count; i++)
            {
                bar2[i].Label = "Total" + i.ToString();

            }
            datatool1.GetText += new Steema.TeeChart.Tools.DataTableEventHandler(datatool1_GetText);
        }

        void datatool1_GetText(Steema.TeeChart.Tools.DataTableTool sender, Steema.TeeChart.Tools.DataTableEventArgs e)
        {
            if (e.Series.Labels.Count > 0)
            {
                e.Text = e.Series.Labels[e.ValueIndex]; 
            }
        }
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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: data table tool in teechart

Post by Narcís » Fri Feb 19, 2010 12:08 pm

Hello shikha,

If you are looking for prioritary support you you may be interested in knowing of our Pro-Support service:

http://www.steema.com/licensing/support
Best Regards,
Narcís Calvet / 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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Mon Feb 22, 2010 7:28 am

Thanks for the reply. I am using VB.net , so i converted it into that using a utility . But it generates an error- "Error -Type 'Steema.TeeChart.Tools.DataTableEventArgs' is not defined." when i run the program. I am using Teecahrt version -3.5.3470.15474 and the code after converting into vb.net is as follows-

Public Sub New()
InitializeComponent()
InitializeChart()
End Sub
Private bar1 As Steema.TeeChart.Styles.Bar, bar2 As Steema.TeeChart.Styles.Bar
Private datatool1 As Steema.TeeChart.Tools.DataTableTool
Private Sub InitializeChart()
bar1 = New Steema.TeeChart.Styles.Bar(tChart1.Chart)
bar2 = New Steema.TeeChart.Styles.Bar(tChart1.Chart)
datatool1 = New Steema.TeeChart.Tools.DataTableTool(tChart1.Chart)

bar1.FillSampleValues()
bar2.DataSource = bar1
bar2.Color = Color.Transparent
bar2.ShowInLegend = False
bar2.Title = ""
For i As Integer = 0 To bar1.Count - 1

bar2(i).Label = "Total" & i.ToString()
Next
AddHandler datatool1.GetText, AddressOf datatool1_GetText
End Sub

Private Sub datatool1_GetText(ByVal sender As Steema.TeeChart.Tools.DataTableTool, ByVal e As Steema.TeeChart.Tools.DataTableEventArgs)
If e.Series.Labels.Count > 0 Then
e.Text = e.Series.Labels(e.ValueIndex)
End If
End Sub

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Mon Feb 22, 2010 7:29 am

it generates this error at this line-
Private Sub datatool1_GetText(ByVal sender As Steema.TeeChart.Tools.DataTableTool, ByVal e As Steema.TeeChart.Tools.DataTableEventArgs)

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

Re: data table tool in teechart

Post by Sandra » Mon Feb 22, 2010 9:29 am

Hello shikha,
it generates this error at this line-
Private Sub datatool1_GetText(ByVal sender As Steema.TeeChart.Tools.DataTableTool, ByVal e As Steema.TeeChart.Tools.DataTableEventArgs)
I could reproduce your problem using last version 3 of TeeChart.Net but not in version 4, because this event is new in version 4 and is not possible do same with version 3 of TeeChart.


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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Mon Feb 22, 2010 9:40 am

can i download this version for free or is it paid under my licence ? if so please give me link for same. Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: data table tool in teechart

Post by Narcís » Mon Feb 22, 2010 9:50 am

Hi shikha,

If you are a TeeChart for .NET v3 license holder you can upgrade your license to TeeChart for .NET v2009 here:

http://www.steema.com/order/net/u

You can download the fully functional evaluation version here:

http://www.steema.com/evaluation/net

Hope this helps!
Best Regards,
Narcís Calvet / 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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Mon Feb 22, 2010 9:58 am

is the TeeChart for .NET v2009 and version 4 one and the same?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: data table tool in teechart

Post by Narcís » Mon Feb 22, 2010 10:01 am

Hi shikha,

Yes, it is the same. Internally it's v4 and 2009 is the commercial name.
Best Regards,
Narcís Calvet / 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

Neelam
Advanced
Posts: 193
Joined: Fri Jun 08, 2007 12:00 am

Re: data table tool in teechart

Post by Neelam » Wed Mar 03, 2010 12:10 pm

Thanks for the useful information.

Post Reply