Page 2 of 2

Further information Regarding Bubble Series

Posted: Tue Oct 23, 2007 9:31 pm
by 8739068
The disappearing bubbles seems to occur only on the Y axis on a 2D chart.

It is easy to duplicate the problem by using your example, TeeChartNetExamples. If you go to Welcome !\Chart styles\Standard\Bubble\Bubble Transparency, using the mouse pan the chart by right clicking on the chart surface. You will notice that bubbles disappear if the center point of the bubble goes past the left most boundary. Yet the top, bottom, and right boundaries do not behave this way.

Posted: Wed Oct 24, 2007 7:37 am
by narcis
Hi Mike,

Thanks for the observation. I've added this information to the issue report

Need to resolve disappearing rectangles

Posted: Wed Oct 01, 2008 12:31 am
by 8739068
Issue number 1 in the previous post is really becoming a problem for me. The RectangleBubble series works great other than this issue.

Since I have the source I would like to resolve this issue. Where would you suggest I start looking to resolve this?

As a reminder, some of the rectangles are not drawn when they get close the edge of the chart. Instead of showing part of the rectangle as it drifts off the screen, TChart simply does not draw the entire rectangle.

Thanks for your help.

Posted: Wed Oct 01, 2008 9:22 am
by narcis
Hi Mike,

Please notice that we don't offer support with source code modifications. However, I think you should implement this in DrawValue method in Bubble class.

Just need some advice

Posted: Wed Oct 01, 2008 2:03 pm
by 8739068
I don't expect support on this issue, just some friendly advise where to start looking.

We do have the DrawValue method overriden and it is trying to draw the rectangle. The problem seems to go deeper into the System.Drawing.Graphics. I have a simple example where I have 1 large rectangle drawn. If I pan on the chart, as soon as my left edge of the rectangle touches the left axis the rectangle disappears. I found that a call in CanvasGDIplus.cs is getting made. It ends up calling the System.Drawing.Graphics.FillPolygon.

So it looks like there is something in the setup of the GDI+ canvas that clips a FillPolygon. If you could have a quick conversation with one of your experts on this and get a suggestion on what I need to research, I would very much appreciate it. I am not real familiar with GDI+ and I am not finding much help searching the web.

BTW, the bubble series style has the same problem. You had already acknowledged this so I will be glad to share anything I learn so you can maybe use it to fix it in your future releases.

Posted: Fri Oct 03, 2008 9:36 am
by Marc
Hello Mike,

Thanks for your comments. The current first point clipping behaviour does appear inconvenient under some viewing conditions. TeeChart checks what the FirstVisible point of the Series is by checking whether the value is greater or less than the left of the bottom axis scale. ... as such, as soon as the centre of the point is less than the Axis minimum it is no longer considered the first visible point. It seems that for Point and Bubble Series (and perhaps other similarly expressed data) deciding first point under that criteria is over-simplistic. We'll correct that for an upcoming maintenance release.

In the meantime, for your interim use, you could modify the Series Draw method to draw all points (or add a condition of your own):

To see how it works, change:
In Series.cs,
From:

Code: Select all

{
public virtual void Draw()
  if (DrawValuesForward())
    for (int t = firstVisible; t <= lastVisible; t++) DrawValue(t);
  else
    for (int t = lastVisible; t >= firstVisible; t--) DrawValue(t);
}
To:

Code: Select all

public virtual void Draw()
{
  if (DrawValuesForward())
    for (int t = 0; t <= lastVisible; t++) DrawValue(t);
  else
    for (int t = lastVisible; t >= firstVisible; t--) DrawValue(t);
}
Note that with this change made TeeChart will always plot all points from the first 'data' value to the last 'visible' value, clipping at the Left Axis. You can optionally add a slightly more sophisticated condition if you wish. The change we'll make will probably make the check for firstVisible more point-type sensitive.

Regards!
Marc Meumann