I am trying to accomplish creating a filled in region on a chart by creating either a Points series or Bubble series. My goal is to have all the points drawn to make sure they just touch on the top and bottom of a circle or oval with the adjacent points.
When I use Point series, Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle and make the Pointer.HorizSize = Constant size, it will not look correctly when I zoom in using the charts zoom capabilities. When I zoom in, the circle gets smaller and the space between the circles gets larger.
I was looking at using a Bubble series. It seems to not have this problem with zooming, but I had problems when adding my points. I get my points from 2 or 3 arrays of doubles. All examples working with the Bubble series shows adding points by adding them point by point. I added points by calling the series.Add(double[], double[]) method. I was able to call this method successfully but when it came time to render the chart I got an exception saying index was out of range.
I considered using the TChart.Zoomed event and then try to calculate a horizontal and verticle settings for my Pointer.Style. Not sure how to calculate the HorizSize and VertSize.
Can the bubble series work? If so it appears this is only good for a 2D chart. What to do if I need to accomplish the same thing in a 3D chart?
Any advise on how to solve my problem?
Resizing points or bubbles
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
Bubble series didn't work fine for you because each bubble needs 3 values: x, y and radius. Where x and y determine each bubble's center. There's no add method overload with 3 arrays. You should try looping through your arrays and adding values to the bubbles.
If you don't like the 3D view you can try using OpenGL as shown in the OpenGL demo at TeeChart's program group.
Bubble series didn't work fine for you because each bubble needs 3 values: x, y and radius. Where x and y determine each bubble's center. There's no add method overload with 3 arrays. You should try looping through your arrays and adding values to the bubbles.
If you don't like the 3D view you can try using OpenGL as shown in the OpenGL demo at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
What are the advantages of using OpenGL
Your last response prompted some followup question.
Bubble series style is 3 dimensional? Is there an example not using OpenGL with this series?
When would I want to use OpenGL versus the default charting canvas?
I notice if I comment all the lines in the OpenGL demo that use TeeOpenGL1 that the bubbles are only 2 dimensional. This does not make sense to me. How does a Bubble series be 2D in the default canvas and 3D on an OpenGL canvas?
Bubble series style is 3 dimensional? Is there an example not using OpenGL with this series?
When would I want to use OpenGL versus the default charting canvas?
I notice if I comment all the lines in the OpenGL demo that use TeeOpenGL1 that the bubbles are only 2 dimensional. This does not make sense to me. How does a Bubble series be 2D in the default canvas and 3D on an OpenGL canvas?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
Yes, that's true. GDI+ is not a real 3D canvas (is not intended for 3d graphics) whereas OpenGL was designed to draw 3D graphics. In GDI+ we fake 3D look including 3d bubbles with the polished sphere style as you can see in the All Features\Welcome !\Chart styles\Standard\Bubble\Bubble Sphere Style example at the features demo.
Yes, that's true. GDI+ is not a real 3D canvas (is not intended for 3d graphics) whereas OpenGL was designed to draw 3D graphics. In GDI+ we fake 3D look including 3d bubbles with the polished sphere style as you can see in the All Features\Welcome !\Chart styles\Standard\Bubble\Bubble Sphere Style example at the features demo.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
how to calculate a radius
How can we calculate the radius we need for a Bubble so the edges of the bubble touch?
I would think we would need to know the distance in pixels between grid marks.
Any thoughts?
I would think we would need to know the distance in pixels between grid marks.
Any thoughts?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
Bubble's radius should be the half of the distance between one bubble center and it's surrounding bubbles. This is calculated in axes coordinates.
For example, if one bubble is at 1, 1 and another one is at 5, 1 then both bubbles should have a radius of 2.
Bubble's radius should be the half of the distance between one bubble center and it's surrounding bubbles. This is calculated in axes coordinates.
For example, if one bubble is at 1, 1 and another one is at 5, 1 then both bubbles should have a radius of 2.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
If axes are not equidistance
Is it possible to specify different radius of the bubble to produce oval or egg shaped bubbles?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
No, elliptic shapes can not be drawn using bubble series. In that case you may want to try using Shape series. You can use shape series as shown here.
No, elliptic shapes can not be drawn using bubble series. In that case you may want to try using Shape series. You can use shape series as shown here.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |