How to draw lines at an angle of 90°

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

How to draw lines at an angle of 90°

Post by EAleg »

Hello guys, sry for my "speak London". So, how i can draw lines (Links from Node 1 in Node 2) at an angle of 90°? Or, how make a bridge, like intermediate point? (These corners will serve as bridges) Example below:
Attachments
Example.png
Example.png (7.65 KiB) Viewed 5250 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

You use VIA to specify the intermediate points, and "VIASTYLE angled" to make them corners and not curves. The 90 degrees is up to you - make sure the coordinates match up (same y or same x as the previous one).
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Howie wrote: Wed Jun 10, 2020 4:33 am You use VIA to specify the intermediate points, and "VIASTYLE angled" to make them corners and not curves. The 90 degrees is up to you - make sure the coordinates match up (same y or same x as the previous one).
Can You post example here please (= thk u
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

Code: Select all

NODE a
  POSITION 100 100

NODE b
  POSITION 400 100 

LINK l1
  NODES a b
  VIA 200 100
  VIA 200 200
  VIA 300 200
  VIA 300 100
  VIASTYLE angled
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Howie wrote: Wed Jun 10, 2020 4:48 am

Code: Select all

NODE a
  POSITION 100 100

NODE b
  POSITION 400 100 

LINK l1
  NODES a b
  VIA 200 100
  VIA 200 200
  VIA 300 200
  VIA 300 100
  VIASTYLE angled
when i type VIA (example) 500 600 VIA 600 500 VIA 500 600 VIASTYLE angled, it reads maybe only 1st value )= and i have only one corner.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

Do you put it all on one line like that? It should be separate lines.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Howie wrote: Wed Jun 10, 2020 5:34 am Do you put it all on one line like that? It should be separate lines.
Thanks, figured it out) Need to play with the corners (I mean about x and y). Yes, I have it all written on one line. Everything is written in one line for me.

Here is example: LINK node02847-node02893aaa VIASTYLE angled NODES node02847 node02893 VIA 490 795 VIA 770 773 VIA 841 786

Thk u very mach (=
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Good afternoon, I did not find a way to write in PM, I will write here, I hope the admins will not be offended. I have a question (= how make parallel links, i found guide, it didn't help me, or i don't know how it must working, and how make it )= I must type this in every link, or on node?
Attachments
example2.png
example2.png (8.94 KiB) Viewed 5236 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

(this kind of thing definitely shouldn't be in a PM, in my opinion! The whole point of the forum is to share knowledge. I'm working for free, so the more people can read it, the better)

You need it for every link for the ends that aren't centred.

Code: Select all

LINK l1
   NODES a b:-20:-20
to make the link end 20 pixels left and 20 pixels down from the node's centre.

It might be useful to know that you can also make VIAs positioned relative to a node too:

Code: Select all

   VIA b -20 -100
so you can avoid some maths when you move nodes.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

The whole point of the forum is to share knowledge. I'm working for free, so the more people can read it, the better --- okay, sry)))

I don’t quite understand why these values are needed -20. Can you please see again, I'll throw off a picture of the circuit. There I marked the nodes. And from below, I’ll leave the configuration node and links.Thank you man for answers, it's really helps))


NODE a
LABEL Node a
POSITION 144 129

NODE b
LABEL Node b
POSITION 144 129

NODE d
LABEL Node d
POSITION 144 129

LINK a-b
WIDTH 4
VIASTYLE angled
NODES a b
VIA 144 248
VIA 248 248
VIA 400 248

LINK b-d
WIDTH 4
VIASTYLE angled
NODES b d
VIA 400 248
VIA 248 248
VIA 760 248
Attachments
Б33333ез імені.png
Б33333ез імені.png (8.88 KiB) Viewed 5233 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

That's cheating! You drew a different picture this time :-)

What you have looks right to me, except you have the same coordinates for all 3 nodes. What problem are you seeing now?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Howie wrote: Thu Jun 11, 2020 3:44 am That's cheating! You drew a different picture this time :-)

What you have looks right to me, except you have the same coordinates for all 3 nodes. What problem are you seeing now?
The problem is the same, both links are on top of each other, how to push them away (= I’m not deceiving, I rather did not correctly formulate the question and the problem ...
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

EAleg wrote: Thu Jun 11, 2020 3:53 am
Howie wrote: Thu Jun 11, 2020 3:44 am That's cheating! You drew a different picture this time :-)

What you have looks right to me, except you have the same coordinates for all 3 nodes. What problem are you seeing now?
The problem is the same, both links are on top of each other, how to push them away (= I’m not deceiving, I rather did not correctly formulate the question and the problem ...
Or when there are a huge number of links, how to make the distance between them
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: How to draw lines at an angle of 90°

Post by Howie »

To push them away, you use the offset on the NODES line inside the LINK.

So you can either say +/- pixels left/right and up/down (my example up above)

or you can use a couple of other formats that are smart about the size of the node (look up NODES in the manual).

but the idea is the same - links go from centre to centre. If you have two, then at least one of them needs to end somewhere else to stop them overlapping.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: How to draw lines at an angle of 90°

Post by EAleg »

Good afternoon Howie! Pls, can You tell me, how i can move rectangular frame with percent? For example one in the middle, 2nd at the beginning. Thank You for answers, and help!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests