Request for a new Series Style

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Further information Regarding Bubble Series

Post by Mike Jones » Tue Oct 23, 2007 9:31 pm

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.

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

Post by Narcís » Wed Oct 24, 2007 7:37 am

Hi Mike,

Thanks for the observation. I've added this information to the issue report
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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Need to resolve disappearing rectangles

Post by Mike Jones » Wed Oct 01, 2008 12:31 am

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.

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

Post by Narcís » Wed Oct 01, 2008 9:22 am

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.
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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Just need some advice

Post by Mike Jones » Wed Oct 01, 2008 2:03 pm

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.

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

Post by Marc » Fri Oct 03, 2008 9:36 am

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
Steema Support

Post Reply