When a data point is expected to appear in the chart ?

TeeChart for ActiveX, COM and ASP
Post Reply
Angelo
Newbie
Newbie
Posts: 8
Joined: Mon Oct 20, 2014 12:00 am

When a data point is expected to appear in the chart ?

Post by Angelo » Tue Aug 01, 2023 7:22 pm

I am facing some problem that I cannot figure out where it is. I will try to describe the steps I did

I am reading a file with X and Y values.
before adding the values to a Serie, I set :

Code: Select all

frm.TChart1.AutoRepaint = false. 
Then I add the values to the Serie:

Code: Select all

frm.TChart1.Series(0).AddXY Xdata, Ydata, "", &H80&
After adding the data values, I perform the checking of the axis scales and adjust them accordingly. Then, after adjust the scales set the autorepaint to true and perform a repaint:

Code: Select all

frm.TChart1.AutoRepaint = True
frm.TChart1.Repaint
Here comes what I don´t understand.

After the Repaint method, the chart do not have any point. If I check the count property of the chart, it has at least one point:
frm.TChart1.Series(0).count returns the value 1 or greater.

So my question, when does teechart decides to display the data on the chart ?

Regards.
Angelo

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: When a data point is expected to appear in the chart ?

Post by Marc » Wed Aug 02, 2023 12:01 pm

Hello Angelo,

With one point in the chart you typically see the axes with just one gridline running into the chart. What do you see?

You may not see the point if the Pointer visible isn't true (for a LineSeries). What type of Series are you using?

Regards,
Marc Meumann
Steema Support

Angelo
Newbie
Newbie
Posts: 8
Joined: Mon Oct 20, 2014 12:00 am

Re: When a data point is expected to appear in the chart ?

Post by Angelo » Wed Aug 02, 2023 2:19 pm

Hi Marc;
I am using a Point serie.

I did run step by step (vb6 !! :shock: :roll: :lol: ) the code.

I did see the all the properties of the chart been applied, but for some reason I start to see points in the chart only after the second one added.

Maybe I am messing with autorepaint refreshdata etc. I need to recheck everything again.

Marc, I did search in this forum for refresh, refreshdata, repaint and I noticed that several links (posted by the support) are not redirecting to the correct pages anymore but they are all redirecting to the initial Steema homepage, something like old url´s are redirected to the default home by webserver, instead to display a 404 error page.

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: When a data point is expected to appear in the chart ?

Post by Marc » Thu Aug 03, 2023 8:53 am

I tried this code (TeeChart AX 2023 and VB6:

added a Pojnt Series to Chart. No other changes.

Code: Select all

Private Sub Command1_Click()
  TChart1.AutoRepaint = False
  
  TChart1.Series(0).AddXY 10, 10, "", clTeeColor
  
  TChart1.AutoRepaint = True
  TChart1.Repaint
End Sub
vbpoint.jpg
vbpoint.jpg (12.46 KiB) Viewed 45360 times
It painted ok. Maybe worth checking with a basic run away from your project to confirm that no other settings are interfering.

Thank you for the comment on broken links in the forums. We'll review what can be done with them.

Regards,
Marc
Steema Support

Post Reply