This is a TypeScript implementation of the D3.js Zoomable Sunburst Visualization, converted from an Observable notebook.
- Interactive zoomable sunburst diagram
- Smooth transitions between hierarchy levels
- Responsive design that works on various screen sizes
- Built with TypeScript for improved type safety and code quality
- Node.js (v14 or later)
- npm or yarn
- Docker (optional, for containerized deployment)
- Clone the repository:
git clone <repository-url>
cd zoomable-sunburst- Install dependencies:
npm install- Start the development server:
npm startThis will start a development server at http://localhost:3000 with hot reloading enabled.
To build the application for production:
npm run buildThis will create optimized production files in the dist directory.
You can easily build and run the application using Docker:
- Build the Docker image:
docker build -t zoomable-sunburst .- Run the Docker container:
docker run -p 8080:80 zoomable-sunburst- Open your browser and navigate to http://localhost:8080
src/- TypeScript source codeindex.ts- Entry point for the applicationsunburst.ts- Main Sunburst visualization implementationtypes.ts- TypeScript type definitions
public/- Static assetsindex.html- HTML templatestyle.css- CSS stylesflare-2.json- Hierarchical data used for the visualization
The Zoomable Sunburst diagram shows a hierarchical data structure where:
- Each arc represents a node in the hierarchy
- The center circle represents the root
- Only two levels of the hierarchy are visible at once
- Click on any arc to zoom in and focus on that part of the hierarchy
- Click on the center circle to zoom out one level
This project is based on D3.js examples, which are distributed under the ISC License.
The original visualization was created by Observable and is based on D3.js.