Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/britecharts/britecharts

Composable Charting Library based on reusable D3.js components.
https://github.com/britecharts/britecharts

britecharts chart d3 data-visualization es2015 interactive-visualizations javascript reusable-charting-library svg

Last synced: 3 days ago
JSON representation

Composable Charting Library based on reusable D3.js components.

Awesome Lists containing this project

README

        

# Britecharts

> Britecharts is a client-side **reusable Charting Library** based on [D3.js v5][1] that offers easy and intuitive use of charts and components that can be composed together to create amazing visualizations.

[![Build Status](https://travis-ci.org/britecharts/britecharts.svg?branch=master)](https://travis-ci.org/britecharts/britecharts)
[![npm version](https://badge.fury.io/js/britecharts.svg)](https://badge.fury.io/js/britecharts)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/britecharts/britecharts/blob/master/.github/CONTRIBUTING.md)
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)
[![Twitter Follow](https://img.shields.io/twitter/follow/britecharts.svg?style=social&label=Follow)](https://twitter.com/Britecharts/followers)

| [![Bar Chart][barchartimg]][barchartdemo] | [![Line Chart][linechartimg]][linechartdemo] | [![Donut Chart][donutchartimg]][donutchartdemo] |
| --------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------- |
| [![Stacked Bar Chart][stackedbarchartimg]][stackedbarchartdemo] | [![Stacked Area Chart][stackedareachartlargeimg]][stackedareachartdemo] | [![Grouped Bar Chart][groupedbarchartimg]][groupedbarchartdemo] |
| [![Sparkline Chart][sparklinechartimg]][sparklinechartdemo] | [![Legend Chart][legendchartimg]][donutchartdemo] | [![Brush Chart][brushchartimg]][brushchartdemo] |

Britecharts [components][32] have been written in ES2016 with a Test Driven methodology, so they are **fully tested**, and we are committed to keeping them that way.

## Key Features

- Reusability
- Composability
- Great design

## Usage

The typical use of Britecharts involves creating a chart using its simple API, then rendering it on a container which has previously had data applied to it. The code will look like this:

barChart
.width(500)
.height(300);

barContainer.datum(dataset).call(barChart);

## API

All the components expose some **common API methods** like width, height, and margin. Additionally, each chart or component can expose specific methods you can find in the documentation:

- [API][25], [Demo][linechartdemo] Line Chart
- [API][22], [Demo][barchartdemo] Bar Chart
- [API][21], [Demo][donutchartdemo] Donut Chart
- [API][38], [Demo][stackedbarchartdemo] Stacked Bar Chart
- [API][40], [Demo][groupedbarchartdemo] Grouped Bar Chart
- [API][43], [Demo][bulletchartdemo] Bullet Chart
- [API][23], [Demo][brushchartdemo] Brush Chart
- [API][41], [Demo][scatterplotdemo] Scatter Plot
- [API][29], [Demo][sparklinechartdemo] Sparkline Chart
- [API][30], [Demo][stackedareachartdemo] Stacked Area Chart
- [API][28], [Demo][stepchartdemo] Step Chart
- [API][26], [Demo][barchartdemo] Mini Tooltip
- [API][27], [Demo][linechartdemo] Tooltip
- [API][24], [Demo][donutchartdemo] Legend

## Installation

Britecharts components are distributed in **UMD modules**, each one exposing a D3.js component written with the [Reusable API pattern][3]. To use any of the Britecharts modules, you will need to require the chart in your JS file using AMD/CommonJS modules or adding a script tag with the `src` pointing to the file. You would also need to load the [d3-selection][37] submodule to select the chart container.

```
npm install britecharts d3-selection
```

You can also load Britecharts from our [CDN][cdnhome] as we do in this [demo][cdndemo] page or play around in our [JSBin][jsbinsandbox] and [CodePen][codependemos] demo projects.

They also provide some minimal CSS styling, that can be loaded independently or as a bundle. Check our [Styling Britecharts tutorial][stylingbritecharts] to see more options.

## See Also

- [Documentation Homepage][31]
- [Getting Started Guide][gettingstarted]
- [Tutorials][tutorialsindex]
- [How To Guides][howtoindex]
- [About Britecharts][topicsindex]
- [Contributing Guide][35]
- [Github Repo][33]
- [Bar Chart Tutorial][screencast][Video]
- [Release Notes][13]

## Community Roadmap
This project is in active development. We want your input about what is important, for that, add your votes using the πŸ‘ reaction:
* [Top Feature Requests](https://github.com/britecharts/britecharts/issues?q=is%3Aissue+is%3Aclosed+sort%3Areactions-%2B1-desc+label%3Atype%3Afeature+)
* [Documentation Requests](https://github.com/britecharts/britecharts/issues?q=is%3Aissue+is%3Aclosed+sort%3Areactions-%2B1-desc+label%3Atype%3Adocumentation+)
* [Top Bugs](https://github.com/britecharts/britecharts/issues?q=is%3Aissue+is%3Aclosed+sort%3Areactions-%2B1-desc+label%3Atype%3Abug+)

To give your feedback, you can open a new issue. You can also find us in the [D3.js slack group][d3slack], in the **#britecharts** channel. If you want to help, you can check the [contributing][35] guide.

If you work with Angular, check out [ngx-britecharts][angularwrapper] and their [demos][angularwrapperdemos]. We are also preparing a wrapper for React, and we will be talking about it on our [twitter][twitter].

## Acknowledgments

[Sun Dai][sunsdribble] designs Britecharts, and two books inspired the code, [Developing a D3.js Edge][19] and [Mastering D3.js][20]. It also leveraged a significant number of examples and articles from the [D3.js][1] community overall.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Daler Asrorov

πŸ’» πŸ“– πŸ€” 🚧 πŸ‘€ ⚠️

Ryan Wholey

πŸ’» πŸ“– πŸ€” 🚧 πŸ‘€ ⚠️

jchen85

πŸ’» πŸ€” 🚧 πŸ‘€ ⚠️

Marcos GΓ³mez

πŸ’»

ajdani

πŸ› πŸ’» 🚧

shayh

πŸ’»

Jay Clark

πŸ’»



Brendan Ratter

πŸ’» πŸ€”

Rajesh

πŸ’»

Alexis Crespo

πŸ’»

Gago

πŸ’» πŸ–‹ πŸ€” πŸš‡ 🚧 πŸ‘€ πŸ”§ ⚠️

This project follows the [all-contributors](https://allcontributors.org) specification.
Contributions of any kind are welcome!

## License

Copyright 2019 Eventbrite

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

[https://www.apache.org/licenses/LICENSE-2.0][14]

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Read more in the [license document][15]

[1]: https://d3js.org/
[2]: https://webpack.github.io/
[3]: https://bost.ocks.org/mike/chart/
[12]: https://nodejs.org/en/download/
[13]: https://github.com/britecharts/britecharts/releases
[14]: https://www.apache.org/licenses/LICENSE-2.0
[15]: https://github.com/britecharts/britecharts/blob/master/LICENSE.md
[16]: https://github.com/britecharts/britecharts/issues
[17]: https://github.com/babel/babel
[19]: https://bleedingedgepress.com/our-books/developing-a-d3-js-edge/
[20]: https://www.packtpub.com/web-development/mastering-d3js
[21]: https://britecharts.github.io/britecharts/module-Donut.html
[22]: https://britecharts.github.io/britecharts/module-Bar.html
[23]: https://britecharts.github.io/britecharts/module-Brush.html
[24]: https://britecharts.github.io/britecharts/module-Legend.html
[25]: https://britecharts.github.io/britecharts/module-Line.html
[26]: https://britecharts.github.io/britecharts/module-Mini-tooltip.html
[27]: https://britecharts.github.io/britecharts/module-Tooltip.html
[28]: https://britecharts.github.io/britecharts/module-Step.html
[29]: https://britecharts.github.io/britecharts/module-Sparkline.html
[30]: https://britecharts.github.io/britecharts/module-Stacked-area.html
[31]: https://britecharts.github.io/britecharts/
[32]: https://britecharts.github.io/britecharts/tutorial-kitchen-sink.html
[33]: https://github.com/britecharts/britecharts
[gettingstarted]: https://britecharts.github.io/britecharts/getting-started.html
[35]: https://github.com/britecharts/britecharts/blob/master/.github/CONTRIBUTING.md
[36]: https://britecharts.github.io/britecharts/img/logo-stripes-small.png
[37]: https://github.com/d3/d3-selection
[38]: https://britecharts.github.io/britecharts/module-Stacked-bar.html
[40]: https://britecharts.github.io/britecharts/module-Grouped-bar.html
[41]: https://britecharts.github.io/britecharts/module-Scatter-plot.html
[42]: https://scrimba.com/casts/cZWm2tb
[43]: https://britecharts.github.io/britecharts/module-Bullet.html
[cdndemo]: https://britecharts.github.io/britecharts/cdn.html
[cdnhome]: https://cdn.jsdelivr.net/npm/britecharts/dist/
[jsbinsandbox]: https://jsbin.com/wativun/3/edit?html,js,output
[codepensandbox]: https://codepen.io/Golodhros/pen/PprGeP?editors=1010
[codependemos]: https://codepen.io/Britecharts/pens/forked/
[screencast]: https://scrimba.com/casts/cZWm2tb
[angularwrapper]: https://github.com/colapdev/ngx-britecharts
[angularwrapperdemos]: https://colapdev.github.io/ngx-britecharts/
[twitter]: https://twitter.com/britecharts
[sunsdribble]: https://dribbble.com/sundai
[d3slack]: https://d3js.slack.com/
[proposals]: https://github.com/britecharts/britecharts/labels/Type%3A%20Feature
[release3project]: https://github.com/britecharts/britecharts/projects/2
[barchartdemo]: https://britecharts.github.io/britecharts/tutorial-bar.html "Check the Demo"
[linechartdemo]: https://britecharts.github.io/britecharts/tutorial-line.html "Check the Demo"
[donutchartdemo]: https://britecharts.github.io/britecharts/tutorial-donut.html "Check the Demo"
[scatterplotdemo]: https://britecharts.github.io/britecharts/tutorial-scatter-plot.html "Check the Demo"
[sparklinechartdemo]: https://britecharts.github.io/britecharts/tutorial-sparkline.html "Check the Demo"
[stackedareachartdemo]: https://britecharts.github.io/britecharts/tutorial-stacked-area.html "Check the Demo"
[stepchartdemo]: https://britecharts.github.io/britecharts/tutorial-step.html "Check the Demo"
[brushchartdemo]: https://britecharts.github.io/britecharts/tutorial-brush.html "Check the Demo"
[bulletchartdemo]: https://britecharts.github.io/britecharts/tutorial-bullet.html "Check the Demo"
[stackedbarchartdemo]: https://britecharts.github.io/britecharts/tutorial-stacked-bar.html "Check the Demo"
[groupedbarchartdemo]: https://britecharts.github.io/britecharts/tutorial-grouped-bar.html "Check the Demo"
[stackedareademo]: https://britecharts.github.io/britecharts-react/#stacked-area-chart "Check the Demo"
[stackedareaimg]: https://raw.githubusercontent.com/britecharts/britecharts-react/master/src/docs/images/thumbnails/stacked-area.png
[barchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/bar-chart.png
[linechartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/line-chart.png
[donutchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/donut-chart.png
[sparklinechartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/sparkline-chart.png
[stackedareachartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/stacked-area-chart.png
[stackedareachartlargeimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/stacked-area-chart-large.png
[stepchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/step-chart.png
[brushchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/brush-chart.png
[stackedbarchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/stacked-bar-chart.png
[groupedbarchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/grouped-bar-chart.png
[legendchartimg]: https://raw.githubusercontent.com/britecharts/britecharts/master/src/doc/images/thumbnails/legend-chart.png
[tutorialsindex]: http://britecharts.github.io/britecharts/tutorials-index.html
[howtoindex]: http://britecharts.github.io/britecharts/how-to-index.html
[topicsindex]: http://britecharts.github.io/britecharts/topics-index.html
[stylingbritecharts]: http://britecharts.github.io/britecharts/styling-charts.html