Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karl-horning/d3-templates

This repository, d3-templates, contains examples and templates for creating data visualizations using the D3.js library. Each example is converted from TypeScript to JavaScript, and JSDoc comments and explanations are added for better understanding.
https://github.com/karl-horning/d3-templates

d3 html javascript template

Last synced: 12 days ago
JSON representation

This repository, d3-templates, contains examples and templates for creating data visualizations using the D3.js library. Each example is converted from TypeScript to JavaScript, and JSDoc comments and explanations are added for better understanding.

Awesome Lists containing this project

README

        

# D3 Templates

This repository, **d3-templates**, contains examples and templates for creating data visualizations using the D3.js library. Each example is converted from TypeScript to JavaScript, and JSDoc comments and explanations are added for better understanding.

## Examples

1. [Area Chart](./templates/area-chart/): Illustrates the usage of an area chart to visualize data trends over time. [View Example](./templates/area-chart/area-chart.js)

2. [Bar Chart](./templates/bar-chart/): Demonstrates the creation of a bar chart to represent data using rectangular bars. [View Example](./templates/bar-chart/bar-chart.js)

3. [Donut Chart](./templates/donut-chart/): Visualizes categorical data in a circular form, with dynamic resizing and interactive tooltips. [View Example](./templates/donut-chart/donut-chart.js)

4. [Histogram](./templates/histogram/): Utilizes a histogram to display the distribution of data in a set of bins. [View Example](./templates/histogram/histogram.js)

5. [Horizontal Bar Chart](./templates/horizontal-bar-chart): Represents data with a horizontal bar chart, dynamically adjusting to different datasets. [View Example](./templates/horizontal-bar-chart/horizontal-bar-chart.js)

6. [Line Chart](./templates/line-chart/): Illustrates the creation of a line chart to represent data points connected by straight line segments. [View Example](./templates/line-chart/line-chart.js)

## Getting Started

To run the examples:

1. Clone or download this repository to your local machine.
2. Open the HTML files (in other words, `area-chart.html`, `bar-chart.html`, `donut-chart.html`, `histogram.html`, `horizontal-bar-chart.html`, `line-chart.html`) in a web browser.

## Project Structure

- `area-chart`: Folder containing the Area Chart example.
- `area-chart.html`: HTML file.
- `area-chart.js`: JavaScript file.
- `data.js`: JavaScript file with the key data.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Area Chart example.

- `bar-chart`: Folder containing the Bar Chart example.
- `bar-chart.html`: HTML file.
- `bar-chart.js`: JavaScript file.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Bar Chart example.

- `donut-chart`: Folder containing the Donut Chart example.
- `donut-chart.html`: HTML file.
- `donut-chart.js`: JavaScript file.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Donut Chart example.

- `histogram`: Folder containing the Histogram example.
- `histogram.html`: HTML file.
- `histogram.js`: JavaScript file.
- `data.js`: JavaScript file with the key data.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Histogram example.

- `horizontal-bar-chart`: Folder containing the Horizontal Bar Chart example.
- `horizontal-bar-chart.html`: HTML file.
- `horizontal-bar-chart.js`: JavaScript file.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Horizontal Bar Chart example.

- `line-chart`: Folder containing the Line Chart example.
- `line-chart.html`: HTML file.
- `line-chart.js`: JavaScript file.
- `data.js`: JavaScript file with the key data.
- `d3.v6.min.js`: D3 library version 6 minified file.
- `README.md`: README specific to the Line Chart example.

## Usage

Explore each example to understand how to create data visualizations using D3.js. Customize the code and datasets to fit your specific requirements.

## Tutorials

Tutorials on D3.js are available from:
- [D3.js Getting Started](https://d3js.org/getting-started)
- [FreeCodeCamp D3.js Tutorial](https://www.freecodecamp.org/news/d3js-tutorial-data-visualization-for-beginners/)

## Credits

- D3.js library: [D3.js](https://d3js.org/)
- Original templates and examples available on [Observable](https://observablehq.com/)

## License

This project is licensed under the [MIT License](LICENSE).