Some issues for VBScript graphs

TeeChart for ActiveX, COM and ASP
Post Reply
ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Some issues for VBScript graphs

Post by ModelTech » Mon Nov 19, 2007 12:33 pm

1. How can I "freeze" vertical scroll for TeeChart VBScript graphs? I have tried standart delphi parameters, but they did not work.

2. Is it possible on-line ON/OFF series on TeeChart VBScript graphs (by using ticks for example)?

Regards,
Danila.

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

Post by Narcís » Mon Nov 19, 2007 2:34 pm

Hi Danila,

Please find below the answers to your questions:

1. You can try using this:

Code: Select all

    TChart1.Scroll.Enable = pmVertical
Or this:

Code: Select all

    TChart1.Scroll.Enable = 2
You'll find all constants definitions at TeeChartDefines.h available at C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual C++.

2. Yes, you can use legend checkboxes:

Code: Select all

    TChart1.Legend.CheckBoxes = True
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

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Mon Nov 19, 2007 4:12 pm

Hi, Narcís

Thank you for fast and useful answers.

But my scroll is still work when I use

Code: Select all

Chart1.Scroll.Enable = pmNone
Namely, vertical scroll. How can I "freeze" vertical scroll oh graph? I.e. How can I set "NO" vertical scroll.

I'm using TeeChart 8 (VBScript) and IExplorer 7 (Win XP home edition).

And one more question:
Is it possible to change color of "zooming rectangle" on black? Becouse white rectangle on the white background is invisible.

Thanks in advance,
Danila.

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

Post by Narcís » Mon Nov 19, 2007 5:10 pm

Hi Danila,

Have you tried using this?

Code: Select all

    TChart1.Scroll.Enable = 1
If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
And one more question:
Is it possible to change color of "zooming rectangle" on black? Becouse white rectangle on the white background is invisible.
Yes, you can do this:

Code: Select all

    TChart1.Zoom.Pen.Color = vbBlack
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

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Tue Nov 20, 2007 6:32 am

Thank you again - your answer is very useful.

I have tried code you posted above (TChart1.Scroll.Enable = 1), it did not work. I will prepare a simple example and send it.

Regards,
Danila.

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Tue Nov 20, 2007 12:36 pm

I have question about AddArray. I try to use it for the graph with "date" X-scale.
The following code does not work properly:

Code: Select all

xa =Array(   DateValue("30.05.1982"), DateValue("31.05.1982"), DateValue("01.06.1982"), DateValue("01.07.1982"), DateValue("01.08.1982"), DateValue("01.09.1982"), DateValue("01.10.1982"), DateValue("01.11.1982"), DateValue("01.12.1982"), DateValue("01.02.1983"))
ya =Array(   0, 0, 0, 11.7458, 16.6664, 28.1098, 40.4745, 40.4745, 23.8088, 40.0495)
Chart1.Series(0).AddArray 10, xa, ya
How can I plot the graph with "date" X scale using AddArray?

Thanks in advance,
Danila.

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

Post by Narcís » Tue Nov 20, 2007 12:47 pm

Hi Danila,

It works fine for me here using something like this:

Code: Select all

Private Sub Form_Load()
    TChart1.Series(0).XValues.DateTime = True
        
    xa = Array(DateValue("1/11/2007"), DateValue("2/11/2007"), DateValue("3/11/2007"), _
                DateValue("4/11/2007"), DateValue("5/11/2007"))
    ya = Array(0, 0, 0, 11.7458, 16.6664)
    TChart1.Series(0).AddArray 5, ya, xa
End Sub
BTW: Would you mind starting a new thread when you post about a new subject?

Thanks in advance.
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

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Thu Nov 22, 2007 9:03 am

Hi Narcís,

I have uploaded example with "persistent" mouse scroll at your upload page. The name of the file is "SCROLL.html"

The issue is: when I scroll the page with the mouse wheel, the chart also scrolling up and down. But I want to "freeze" such movement of the chart.

Regards,
Danila.

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

Post by Narcís » Thu Nov 22, 2007 10:01 am

Hi Danila,

Thanks for the example project.
The issue is: when I scroll the page with the mouse wheel, the chart also scrolling up and down. But I want to "freeze" such movement of the chart.
Ok, I didn't knew you ment scrolling using the mouse wheel. In that case your problem is the same described here. I've tried solution suggested there with your example and works fine for me.
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

ModelTech
Newbie
Newbie
Posts: 28
Joined: Tue Oct 09, 2007 12:00 am

Post by ModelTech » Thu Nov 22, 2007 12:28 pm

Oh, yes!

It works well :D

Thanks for the great support!

Regards,
Danila.

Post Reply