Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Ellipse over Dataserie vb.net (Read 1925 times)
Aapo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Aug 30th, 2020
Ellipse over Dataserie vb.net
Nov 22nd, 2020 at 12:13pm
Print Post  
hello,
I have Dataserie and I need Ellipse over that data. I have calculated Eigenvalues, Covarience/inv(cov), means etc.
But I need a sample code for help to do that with mindfusion.
I use vs2015 with Extreme mathematics+MF and vb.net
br aapo
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Online


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Ellipse over Dataserie vb.net
Reply #1 - Nov 23rd, 2020 at 7:55am
Print Post  
Hi,

If you mean drawing ellipses at data point locations, you might try adding a BubbleRenderer to chart's Plot, however BubbleRenderer draws circles with same X/Y radius. If you need different X/Y radii, you might have to create a custom series renderer, e.g. here's BubbleRenderer drawing code you could adapt for your scenario:

Code
Select All
protected internal override void Draw(RenderContext context)
{
    EnumVisiblePoints(context, (s, i, point) =>
    {
        var d = (float)Series[s].GetValue(i, 2) * 2;
        using (var brush = EffectiveFill(s, i, context).CreateGdiBrush(new RectangleF(point.X - d / 2, point.Y - d / 2, d, d)))
            context.Graphics.FillEllipse(brush, point.X - d / 2, point.Y - d / 2, d, d);
        using (var pen = EffectiveStrokePen(s, i, context).CreateGdiPen())
            context.Graphics.DrawEllipse(pen, point.X - d / 2, point.Y - d / 2, d, d);
...
} 



If that ellipse of yours shows some cumulative / mean value derived from main series data, you could represent it as a separate series containing a single data point.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Aapo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Aug 30th, 2020
Re: Ellipse over Dataserie vb.net
Reply #2 - Nov 25th, 2020 at 1:43pm
Print Post  
Thank's for these advices.  I try continue with that
br Aapo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint