All in One
This radial tree visualizes the hierarchical structure of Buddha's teachings, from core concepts like the Four Noble Truths down to individual, simpler precepts. It uses D3.js v7 with the `d3.hierarchy` and `d3.cluster` APIs to compute the circular layout. The SVG rendering supports panning and zooming via the `d3.zoom` module, while node and text sizes adjust based on depth to maintain readability. The data is loaded from a JSON file.
AI-generated descriptionRadial Tree of Buddha's Teachings
This interactive visualization presents Buddha's teachings in a radial tree layout using D3.js. The hierarchical structure allows exploration of key Buddhist concepts starting from the central node and branching outward to show relationships between different teachings.
Features
- Radial Layout: Displays Buddha's teachings in a circular hierarchical structure
- Interactive Navigation: Pan and zoom functionality to explore different parts of the tree
- Responsive Design: Automatically adjusts to fit different screen sizes
- Visual Hierarchy: Node and text sizes adjust based on their depth in the hierarchy
Technical Implementation
The visualization is built using:
- D3.js v7: For data binding and visualization
- ES6 Modules: For clean code organization and separation of concerns
- Hierarchical Data Structure: JSON format representing Buddhist teachings
Project Structure
index.html: Main HTML entry pointmain.js: Application initialization and window resize handlingvisualization.js: Core visualization rendering logicdataLoader.js: Fetches and processes the hierarchical datazoom.js: Implements pan and zoom functionalityutils.js: Helper functions for calculating positions and stylingstyles.css: Visual styling of the tree nodes and linksdata.json: Hierarchical data of Buddha's teachings
Usage
Open index.html in a modern web browser. Navigate the visualization using:
- Zoom: Mouse wheel / pinch gesture
- Pan: Click and drag anywhere on the visualization
Data Structure
The visualization represents Buddha's teachings starting with core concepts like the Four Noble Truths and branching out to more detailed teachings. Each node represents a specific teaching, with the hierarchical layout illustrating how concepts relate to one another.
Visual Design
The visualization uses a warm color palette inspired by traditional Buddhist art:
- Soft parchment background
- Amber node circles
- Dark brown text and connections
- Root node emphasized with darker coloring
- Text with subtle white glow for better readability