Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9065811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:36:02+00:00 2026-06-16T16:36:02+00:00

I have a RBAC structure stored in my database (a project built with Yii).

  • 0

I have a RBAC structure stored in my database (a project built with Yii).

I would love to generate a graph to visualize the relationships between the items to see if I’m not making logical mistakes, and to show to other team members.

I was thinking to create a page that would generate a graph / tree. I think I can handle the server-side part but I have no idea how to generate the HTML/CSS (or image).

Nodes in the graph can have multiple children and multiple parents. Arrows are directed. Example: example

I don’t mind using latest CSS3 and HTML5 tech since it will be only used by selected people.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:36:03+00:00Added an answer on June 16, 2026 at 4:36 pm

    I ran into similar concerns a while ago. The solution I finally came with is a little js library that perfectly did the trick, namely Dracula.

    Here is a link to the library : https://github.com/strathausen/dracula

    Considering your needs, all you’ll have to do is something like :

    var g = new Graph();
    
    g.addEdge('author', 'create');
    g.addEdge('author', 'reader');
    g.addEdge('author', 'admin');
    
    // add here the other edges.
    
    var layouter = new Graph.Layout.Spring();
    layouter.layout();
    
    var renderer = new Graph.Renderer.Raphael('#canvas', g, 400, 300);
    renderer.draw();
    

    For more infos, I’ll let you struggle with the documentation.

    Hope it helps.

    [ADDENDUM]

    I would add that, generally speaking, the matter of displaying nodes and arrows is not of a big deal, using svg makes it near trivial. But things get complicated when you want to organize the display of the nodes with rules such as “try to minimize the number of crossing edges”, “display children below their parent”, etc which all need complex mathematics.

    I don’t think that Dracula allows one to customize that kind of rules. Nevertheless, considering your comment, I think there may be a not-too-complicated way to make the layout looks like vertical tree, since it is an acyclic graph ( at least, it seems to be ). But then you will have to go through the making of your own library for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have been trying to get integration testing working with my seam project and the
have a class structure like so Permit -> Financial ->ICollection instrumentList Instrument -> Agency
Have a MySQL database table with 2 columns: id, url The url column has
I'm using Yii RBAC to control user access to my app, it consists of
i am developing one application with iphone & Yii framework(PHP Server side), i have
Have created an android test project and currently trying to write android unit tests
Have a large amount of HTML, but where I thought the bottleneck would be
I have some questions related to RBAC (hirearchy model). Following are the scenarios Assume
I am learning Yii and am trying to develop RBAC now the issue is
I'm working on a Rails app using CanCan for RBAC and I only have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.