B4J Question How to Create a Network Diagram

BillMeyer

Well-Known Member
Licensed User
Longtime User
Good Day B4X'ers
Any ideas how one would go about creating something like the image below - or do you know of an API that one could use ???

All ideas and help appreciated...

1663316132674.png


Thanks in Advance
 

Magma

Expert
Licensed User
Longtime User
Good Day B4X'ers
Any ideas how one would go about creating something like the image below - or do you know of an API that one could use ???

All ideas and help appreciated...

View attachment 133673

Thanks in Advance
You can create a table or any string array... with at least two columns...
id and childofid... if chiofid is null,"" is the root

You can make a canvas with scrollpane and draw all these easy or you can use layouts and scrollpane to be easier...
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Interesting task, it's interesting if any code solution will be published here, when and if developed...
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
Take a look at this.
 
Upvote 0

epiCode

Active Member
Licensed User
 
Upvote 0

William Lancee

Well-Known Member
Licensed User
Longtime User
Version 2 has specs for nodes and arrows, as well as touch sensitivity for both nodes and arrows. It is still less than 150 lines of code.

NetChartV2.png




' LOGGED TEST TOUCHES
'CEO: Hans DeVoort
'The Company
'Root---->CEO
'VP-HR: Emelia Hartman
'Root---->VP-HR
'VP-Finance: Michael Rocher
 

Attachments

  • NetChartV2.zip
    20.3 KB · Views: 161
Last edited:
Upvote 0

SJQ

Member
Licensed User
Longtime User
A number of years ago I created a couple of projects in B4A... one an interactive fiction creator for a school, the other for our site engineers for Wire and Network schematics... Its Similar to the previous post.
I created these in B4A, I've used a Canvas with Labels and drawn lines and the Pinch and Zoom Lib.
So the user can tap and hold on a node, then move it around keeping the connecting lines connected to the relevant nodes.
 

Attachments

  • Crop1.png
    Crop1.png
    19.8 KB · Views: 161
  • crop2.png
    crop2.png
    37.3 KB · Views: 147
Upvote 0
Top