Hello.
I need to draw interrelationship diagrams (shapes connected with arrows) to display team members relationships.
Simple example
a bit more complex
and sophisticated one
I've expected to have "shapes (points), connected with arrows" diagram type in your editor but I failed to find any.
Maybe it can be drawn by a combintaion of two diagram types? which one?
Thank you.
Interrelationship diagrams (shapes connected with arrows)
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Interrelationship diagrams (shapes connected with arrows)
Hello,
All of the TeeChart Series types plot values, either of two (x,y) or three (x,y,z) dimensions - if I understand correctly, you are looking to draw diagrams rather than plot values, which while not the core function of TeeChart can actually be done.
The way is to draw directly onto TeeChart is by one of the Canvas Events; following is a small example to get you started:
All of the TeeChart Series types plot values, either of two (x,y) or three (x,y,z) dimensions - if I understand correctly, you are looking to draw diagrams rather than plot values, which while not the core function of TeeChart can actually be done.
The way is to draw directly onto TeeChart is by one of the Canvas Events; following is a small example to get you started:
Code: Select all
private void InitializeChart(TChart chart)
{
void Chart_AfterDraw(object sender, Graphics3D g)
{
var center = new Point(100, 100);
g.Brush.Color = Color.Blue;
g.Pen.Color = Color.Red;
var ellipseRect = Utils.FromLTRB(center.X - 50, center.Y - 50, center.X + 50, center.Y + 50);
g.Ellipse(ellipseRect);
var text = "AAAA";
g.Font.Color = Color.Yellow;
g.Font.Bold = true;
g.TextOut(center.X - (Utils.Round(g.TextWidth(text) / 2)), center.Y - (Utils.Round(g.TextHeight(text) / 2)), text);
var point = g.PointFromCircle(ellipseRect, 310);
g.Brush.Color = Color.Pink;
g.Pen.Visible = false;
g.Arrow(true, PointDouble.Round(point), new Point(300, 300), 5, 10, 0);
}
chart.Header.Visible = false;
chart.Axes.Visible = false;
chart.AfterDraw += Chart_AfterDraw;
}
Best Regards,
Christopher Ireland / 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 |
Re: Interrelationship diagrams (shapes connected with arrows)
For now I've ended up with combination of Line series (circle points are enabled, line is disabled, markes are enabled) and Arrow series (it must be second series on the chart to be drawn after Line series - so arrow head is placed above circle point).
It looks something like:
It looks something like:
Last edited by bairog on Mon Nov 02, 2020 8:39 am, edited 4 times in total.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Interrelationship diagrams (shapes connected with arrows)
That's very nice. It's so good, in fact, that I wonder if we could ask your permission to publish this image on our public website as an example of a client using TeeChart custom drawing?
Many thanks.
Many thanks.
Best Regards,
Christopher Ireland / 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 |
Re: Interrelationship diagrams (shapes connected with arrows)
I've slightly modyfied data on my image - so now you can publish this image on our public website.Christopher wrote: ↑Mon Nov 02, 2020 8:07 amIt's so good, in fact, that I wonder if we could ask your permission to publish this image on our public website as an example of a client using TeeChart custom drawing?
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Interrelationship diagrams (shapes connected with arrows)
Thank you very much!
Best Regards,
Christopher Ireland / 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 |