GithubHelp home page GithubHelp logo

hierarchy's Introduction

D3.js hierarchical data visualization

Project to visualize hierarchical data using D3.js. Available on Github Pages.

Written with D3.js and Material UI in Typescript React. Build with Vite.

Users can skip individual rows by clicking on the circle icon on the row. They can also invert a row by clicking on the star icon. To reset the row they can click on the square icon. Users can also modify an entire subtree by using the provided actions on any internal node.

The page also supports changing the font, its size and weight. The user can also enable the option to highlight any negative values in red as an example of a potential business requirement.

The page is responsive, running on a single column on mobile devices and on multiple columns on larger screens. This is implemented with MUI Grid, which emulates the CSS Grid using flexbox.

Development decisions

The reason I chose Vite and MUI is because I've heard good things and wanted to try them out. I've also heard that Vite is faster than Create React App, which I've used before. I've never used D3.js before, so the code is loosely based on the examples I found online.

It seems to work reasonably well with a few thousand nodes, but scrolling can lag on 10k+ nodes. For large datasets, some kind of virtualization would be needed, but I ran out of time to implement that.

Development

There is a basic CI/CD pipeline that builds the page and deploys it to Github Pages. The pipeline is defined in .github/workflows/deploy-to-pages.yaml.

Running the project

To run the project, clone the repository and run nvm use (or use node 20), npm install and npm run dev. The project will be available on localhost:5173.

To run tests, run npm run test which will run a basic (non-exhaustive) vitest suite.

hierarchy's People

Contributors

lukaprebil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.