Dot Plots

Ideas and wishes for TeeChart
Post Reply
Oli
Newbie
Newbie
Posts: 42
Joined: Fri Jan 13, 2012 12:00 am

Dot Plots

Post by Oli » Fri May 18, 2012 9:53 am

Hi,

I am wondering if it is possible to implement dot plots (similar to the attached charts) in future Teechart releases. Two different types would be nice, aligned and scattered (as shown) points to avoid overlapping. Line may represent mean, median or custom value.

May be there is a workaround to produce such charts with the current Teechart version, and I would appreciate any guideance to do so.

Cheers
Oliver
Attachments
Dotplot.jpg
Dotplot.jpg (17.67 KiB) Viewed 28169 times

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

Re: Dot Plots

Post by Yeray » Fri May 18, 2012 3:19 pm

Hi Oliver,

You could use three Points series. One in blue with Circle pointer, one in red with the default Rectangle pointer and one in green with Triangle pointer.
Then, you could use three functions, one linked to each series.
I wouldn't expect to find too much problems with it. I guess I'm missing something. Maybe what you want is an algorithm to, given an YValues set, sort the XValues so the points occupy the minimum space without overlapping. Is that what you meant?
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

Oli
Newbie
Newbie
Posts: 42
Joined: Fri Jan 13, 2012 12:00 am

Re: Dot Plots

Post by Oli » Sat May 19, 2012 10:56 pm

Hi Yeray,

thanks for your hint on using Points series. I was indeed able to make the dot plots as I wanted them. For the scattered dot plots, I just randomized the xvalues in a range of plus/minus 40%, for example for x=1, I get a new random x values between 0.6 and 1.4. I have not thought about checking the distance of each point to each other avoiding overlapping. Instead I was thinking to make the Pointer.Brush.Color=Transparent and Pointer.Brush.Solid=True. In this case, overlapping points should be still distinguishable, unless pointers are completely overlapping.

However, if I set Pointer.Brush.Color=Transparent all pointers become invisible (or transparent). Is Pointer.Pen.Color also set to transparent? Is it a bug or expected behavior?

Secondly , if I set Pointer.Brush.Color=White then certain pointer styles (cross, diagcross, star) becomes invisible too (on white background). It would make sense if I set their Pointer.Pen.Color= White. Actually , Pointer.Brush.Color=White does not make sense for those pointer style (nothing to fill).

I could find a workaround for the second porblem, but the first seems to b more tricky. Can you please let me know if you can reproduce the problem. I use the latest version of Teechart.net (release from 11 May).

Many thanks again for your help getting the dot plots done.

Oliver

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

Re: Dot Plots

Post by Yeray » Tue May 22, 2012 11:13 am

Hi Oliver,
Oli wrote:However, if I set Pointer.Brush.Color=Transparent all pointers become invisible (or transparent). Is Pointer.Pen.Color also set to transparent? Is it a bug or expected behavior?
Yes, when Pointer.Brush.Color=Transparent, the Pen.Color is also set to Transparent. If you want the pen to be drawn, but the interior of the pointer, you could use transparency:

Code: Select all

            point1.Pointer.Transparency = 100; // or 50 or whatever you want
Oli wrote:Secondly , if I set Pointer.Brush.Color=White then certain pointer styles (cross, diagcross, star) becomes invisible too (on white background). It would make sense if I set their Pointer.Pen.Color= White. Actually , Pointer.Brush.Color=White does not make sense for those pointer style (nothing to fill).
Star, SmallDot, Cross and DiagCross PointerStyles use the series' Color as Pen.Color in this case because, as you say, otherwise has no sense for them.
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