Page 1 of 1

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

Posted: Fri Jan 03, 2020 6:50 pm
by 16487359
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!

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

Posted: Tue Jan 07, 2020 8:49 am
by yeray
Hello,

Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

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

Posted: Tue Jan 07, 2020 5:53 pm
by 16487359
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.

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

Posted: Thu Jan 16, 2020 12:32 pm
by yeray
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);
	 }
}