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
Dot Plots
Re: Dot Plots
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?
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Dot Plots
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
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
Re: Dot Plots
Hi Oliver,
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: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?
Code: Select all
point1.Pointer.Transparency = 100; // or 50 or whatever you want
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.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).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |