Page 1 of 1

data table tool in teechart

Posted: Thu Feb 18, 2010 10:25 am
by 13045482
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..

Re: data table tool in teechart

Posted: Fri Feb 19, 2010 5:17 am
by 13045482
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).

Re: data table tool in teechart

Posted: Fri Feb 19, 2010 12:04 pm
by 10050769
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,

Re: data table tool in teechart

Posted: Fri Feb 19, 2010 12:08 pm
by narcis
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

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 7:28 am
by 13045482
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

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 7:29 am
by 13045482
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)

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 9:29 am
by 10050769
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,

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 9:40 am
by 13045482
can i download this version for free or is it paid under my licence ? if so please give me link for same. Thanks.

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 9:50 am
by narcis
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!

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 9:58 am
by 13045482
is the TeeChart for .NET v2009 and version 4 one and the same?

Re: data table tool in teechart

Posted: Mon Feb 22, 2010 10:01 am
by narcis
Hi shikha,

Yes, it is the same. Internally it's v4 and 2009 is the commercial name.

Re: data table tool in teechart

Posted: Wed Mar 03, 2010 12:10 pm
by 13045482
Thanks for the useful information.