Fork of Everything in One
This interactive D3.js v7 visualization presents Buddha’s teachings as a hierarchical radial tree, with the core teaching at the center branching outward through concepts like the Four Noble Truths and Dependent Origination. Using d3.cluster, the layout positions nodes in a full circle, with curved links and text labels adjusted for orientation. The code implements zoom and pan via d3.zoom, supports responsive resizing, and renders all elements as SVG. Data is loaded from a local JSON file using d3.json.
AI-generated descriptionBuddha's Teachings Radial Tree Visualization
An interactive visualization that presents Buddha's teachings in a hierarchical radial tree layout. The visualization allows users to explore the interconnected concepts of Buddhism starting from the core teaching and branching out to more specific aspects.
Overview
This project uses D3.js to create a beautiful, interactive radial tree visualization of Buddhist teachings. The teachings are arranged hierarchically, starting with Buddha's core teachings at the center and branching out to more specific concepts.
Key features:
- Radial tree layout presenting Buddhist teachings hierarchically
- Interactive zoom and pan functionality
- Responsive design that adjusts to window size
- Visually distinct styling for different levels of teachings
Demo
View live demo (Add your live demo link here)
Screenshot
Buddha's Teachings Visualization (Add a screenshot when available)
Structure
The visualization follows a hierarchical structure:
- The root represents "Buddha's Teachings"
- Main branches include "Four Noble Truths" and other core teachings
- Each primary teaching branches into more specific concepts
- The hierarchy continues up to 3-4 levels deep
Technology Stack
- D3.js (v7) for data visualization
- HTML5 & CSS3
- Vanilla JavaScript with ES modules
- Responsive design for multiple screen sizes
Project Files
index.html- Main HTML filemain.js- Entry point that initializes the visualizationvisualization.js- Core visualization logicdataLoader.js- Handles loading the hierarchical datazoom.js- Implements zoom and pan functionalityutils.js- Utility functions for the visualizationstyles.css- Styling for the visualizationdata.json- Hierarchical data structure of Buddha's teachings
Usage
- Clone the repository
- Open
index.htmlin a web browser or host it on a web server - Interact with the visualization:
- Zoom in/out using the mouse wheel or touchpad gestures
- Pan by clicking and dragging
- Explore the hierarchical structure of Buddha's teachings
Features
- Interactive Navigation: Zoom and pan to explore different levels of detail
- Hierarchical Representation: Clear parent-child relationships between concepts
- Responsive Layout: Automatically adjusts to different screen sizes
- Visual Hierarchy: Root, branches, and leaf nodes are visually distinct
- Text Orientation: Text labels are positioned for optimal readability
Development
To modify or extend this visualization:
- Update
data.jsonto change the content or structure of the teachings - Modify
styles.cssto adjust the visual appearance - Edit visualization logic in the JS files to change the behavior or layout
License
[Add your license information here]
Credits
- Buddha's teachings data compiled from [add your sources]
- Visualization built with D3.js