DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Why I Started Using Dependency Injection in Python
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Understanding the Two Schools of Unit Testing

Trending

  • AI, ML, and Data Science: Shaping the Future of Automation
  • Power BI Embedded Analytics — Part 2: Power BI Embedded Overview
  • Developers Beware: Slopsquatting and Vibe Coding Can Increase Risk of AI-Powered Attacks
  • A Guide to Developing Large Language Models Part 1: Pretraining
  1. DZone
  2. Software Design and Architecture
  3. Security
  4. The Dependency Wheel

The Dependency Wheel

A dependency wheel is an attractive and useful chart type, commonly used to visualize relations or dependencies between nodes (or elements) in the chart

By 
Mustapha Mekhatria user avatar
Mustapha Mekhatria
·
Jun. 13, 19 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
11.3K Views

Join the DZone community and get the full member experience.

Join For Free

A dependency wheel is an attractive and useful chart type, commonly used to visualize relations or dependencies between nodes (or elements) in the chart. Its nodes are laid out along the outer edges of the circle with connections are drawn between them inside the circle. In addition to visualizing connections, the magnitude of each connection is also easily shown.

The demo below displays the 2016 BRICS export in a million USD. BRICS is made up of Brazil, Russia, India, China, and South Africa. The connections, in this case, illustrates trade between BRICS countries. They are “encoded” by using connector width to illustrate trade volume and color to illustrate country or origin, slightly desaturated for better visibility.

We can see that the Sino-Russian import-export volumes are close to balanced, whereas India has a negative trade balance with China, i.e. India imports more than it exports from China. It is also clear that China has the highest volume of exports between the BRICS countries.

To set up the relationship between the elements, all you have to do is to use this format: ['from', 'to', 'weight'], where from and to represents the countries, and the weight the number of the import. Example, China imported 32,229 million USD from Russia in 2016, this sentence becomes in code: ['China', 'Russia', 32229]. And the entire imports within the BRICS is:

      ['Brazil', 'Russia', 2524],
      ['Brazil', 'India', 4115],
      ['Brazil', 'China', 45738],
      ['Brazil', 'South Africa', 1401],

      ['Russia', 'Brazil', 2021],
      ['Russia', 'India', 5564],
      ['Russia', 'China', 32229],
      ['Russia', 'South Africa', 196],

      ['India', 'Brazil', 2484],
      ['India', 'Russia', 2398],
      ['India', 'China', 11757],
      ['India', 'South Africa', 3554],

      ['China', 'Brazil', 23364],
      ['China', 'India', 61311],
      ['China', 'South Africa', 12848],      
      ['China', 'Russia', 38105],

      ['South Africa', 'Russia', 255],
      ['South Africa', 'Brazil', 336],
      ['South Africa', 'India', 5814],
      ['South Africa', 'China', 22491],

Once that part is done, all you have to do is to write the dependecywheel as the chart type type: 'dependencywheel', and your code is ready to run.

Remark

To make the chart more compelling, I changed the default colors. To do that, I just added the following lines at the top of the JS code:

Highcharts.setOptions({
  colors: ['#058DC7', '#8dc705', '#c73f05', '#ffc080', '#24CBE5']
}); 

Accessibility

When you deal with a dependency wheel, colors are your main allies for making the chart attractive and easy to read. However, as an estimated 10% of the population is color-blind, it may be worth experimenting with a pattern fill or a monochrome fill in order to not exclude anybody.

Below are demos using the pattern fill and the monochrome fill.

This demo could be confusing to read for people without color blindness, as he or she is not used to processing patterns, especially in a condensed way, as shown in this demo below.

In this case, monochrome fill may be more appropriate since it is easy to read for all users.

There is more to accessibility than taking color-blindness into account. Our charts can also be processed by screen readers (such as NVDA, Jaws, Voiceover), making it possible to navigate between nodes in a chart and having their labels and values read aloud by the screen reader software. To make this possible, all we have to do is add a reference to the Highcharts accessibility module and leaving the rest of the code as-is:<script src="https://code.highcharts.com/modules/accessibility.js"></script>

The dependency wheel is a compelling chart that is not only attractive and multi-dimensional but also easy to read. Feel free to use it in your project whenever the relationship between the nodes needs to be displayed.

Dependency Chart

Published at DZone with permission of Mustapha Mekhatria. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • While Performing Dependency Selection, I Avoid the Loss Of Sleep From Node.js Libraries' Dangers
  • Why I Started Using Dependency Injection in Python
  • Understanding ldd: The Linux Dynamic Dependency Explorer
  • Understanding the Two Schools of Unit Testing

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: