Hide part of a lineSerie. (c++ builder)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Newbie
Newbie
Posts: 2
Joined: Tue Nov 12, 2019 12:00 am

Hide part of a lineSerie. (c++ builder)

Post by » Fri Jan 03, 2020 6:50 pm

Hello, I have an application that needs draw part of lineseries visible and another part invisible.
I did it with the overload method DrawValue of the lineSeries with the code LinePen->Visible = false;
the problem is that a series is just stay invisible when the mouse move event
it happens,in other words, I have to put the mouse focus on the lineserie so that it is invisible.
The methods RefreshSeries, Repaint, AutoRepaint doesn't work.The methods doesn't work even if invoked multiple times.
Thanks!

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Hide part of a lineSerie. (c++ builder)

Post by Yeray » Tue Jan 07, 2020 8:49 am

Hello,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Newbie
Newbie
Posts: 2
Joined: Tue Nov 12, 2019 12:00 am

Re: Hide part of a lineSerie. (c++ builder)

Post by » Tue Jan 07, 2020 5:53 pm

the program creates a custom chart series that inherits the line series and does not set value values so that the index 5 of the series is invisible, the series always created with 20 points, and when you mouse over the series the closest index of the mouse has the pointers marked as visible. Only when pointers change from visible to invisible, the section marked invisible becomes invisible. Why does it happen?

The behavior is intermittent, sometimes when the mouse has the focus in the series and the pointer appears the stretch marked as invisible remains visible. So we have created a series of buttons like the refresh, redraw and repaint methods and by adding a new custom series, you can see that the methods have no effect on the series, just with the mouse over the area, the effect of disappearing happens. with the area marked.
Attachments
project_forum.zip
(67.53 KiB) Downloaded 715 times

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Hide part of a lineSerie. (c++ builder)

Post by Yeray » Thu Jan 16, 2020 12:32 pm

Hello,

It would be easier to add a null point in the line segment you want to hide and let TeeChart do it or you

Code: Select all

void TTPCustomSeries::AddPoint(TDateTime pDate, float Km)
{
	 this->SetColorEachPoint(true);
	 if (this->AddXY(pDate, Km, "", clBlue)+1 == 5)
	 {
		 this->AddNullXY(pDate, Km);
	 }
}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply