• Stars
    star
    371
  • Rank 115,103 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A configurable pie chart lib and generator built on d3.js

d3pie

Project expired

As of today (Jan 13th, 2020) I've let this project expire. The website won't be around any more. It hasn't been developed in years and while I really liked the script I think it's better to shut it down than give a faulty impresson that it's up and running and cause people more work in the long run.

All the best!


About

d3pie is a highly configurable, re-usable script built on d3.js and jQuery for creating clear, attractive pie charts. It's free, open source, and the source code for the website and script are found right here on github.

Visit d3pie.org (expired!) to learn about the script and create your own pie charts via the online generation tool. This section is to document the codebase only. The website contains the script download links, standalone examples, full documentation and lots of demo pies for you to play around with. That's the place to start!

Download

To download the script, go to the ./d3pie folder and pick one of the files (minimized or not).

The code

If you fancy hacking on the d3pie code, awesome! Visit the ./d3pie-source folder. That contains some more info about how the code is organized and how the file is generated.

Contributions

Pull requests are always welcome! Please know that all contributors should understand that they'll be contributing under the license of the script (MIT).

The website

I wrote the website along with the script itself, and with the generator in particular in mind. The generator is my version of TDD (test-driven-development). It's a UI that tests all (or almost all) features of the script to confirm everything works as expected. So as I developed d3pie, I added the UI to generate pie charts with the available settings. It felt, and still feels, like a very logical way to develop code - and never loses sight of the fact that this script is intended for consumption by human beings.

Anyway, I digress. This codebase contains the website code as well as the d3pie code. It uses requireJS and Handlebars, and a few other helper libraries here and there (jQuery, jQuery UI and others - see below). For the build process, I use Grunt - it minifies everything (CSS, JS), precompiles the Handlebar templates and bundles everything into md5-renamed files. It saves about 0.5MB of space. Yay. I also use grunt to build the d3pie.js and d3pie.min.js files. See the gruntfile for the various tasks for all that.

Script used on the website

Lots! A big thanks to the developers of these scripts.

  • jQuery, jQuery UI
  • jQuery slides
  • Bootstrap
  • momentJS
  • Handlebars
  • prettify
  • three.js
  • Modernizr
  • requireJS
  • grunt, npm

Changelog

  • 0.2.1 - Mar 11, 2017. Minification fix.
  • 0.2.0 - Mar 11, 2017. Bug fixes, compatibility update for d3 version 4.
  • 0.1.9 - Jun 17, 2015. UMD fix. This is the last version that supports d3 v3.x.
  • 0.1.8 - May 1, 2015. Bug fix release.
  • 0.1.7 - Apr 25, 2015. Script and website bug fixes, labels.formatter method. Breaking change: labels.truncation.length renamed to labels.truncation.truncateLength.
  • 0.1.6 - Feb 10, 2015. Bug fixes.
  • 0.1.5 - Dec 14, 2014. placeholderParser option added for tooltips; bug fixes.
  • 0.1.4 - Nov 16, 2014, Tooltips added, bug fixes.
  • 0.1.3 - July 2, 2014. Small segment grouping option added; jQuery dependency dropped.
  • 0.1.2 - June 7, 2014. Assorted bug fixes.
  • 0.1.1 - May 7, 2014. Gradients added.
  • 0.1.0 - April 24, 2014. Initial version

Licence

MIT.

More Repositories

1

generatedata

A powerful, feature-rich, random test data generator.
TypeScript
2,222
star
2

responsive-design-bookmarklet-generator

Generates custom bookmarklets for testing responsive layouts to show how they look in different viewport sizes.
HTML
205
star
3

thepixelator.com

A canvas-based image pixelation website.
JavaScript
37
star
4

js-error-logs

A script to catch client-side errors and send them to the server for logging purposes.
JavaScript
37
star
5

rsv

Really Simple Validation (Javascript validation library)
HTML
22
star
6

php_validation

PHP Validation - the server-side complement to the RSV JS library
PHP
22
star
7

birdsearch.org

Browse worldwide birding locations and sightings, based on ebird.org data
JavaScript
16
star
8

grunt-search

Grunt plugin that searches a list of files and logs all findings in various formats.
JavaScript
15
star
9

generatedata-vagrant

A prepackaged installation of generatedata using Vagrant.
Puppet
13
star
10

polymer-country-region-selector

A Polymer component for adding dynamic, country-region dropdowns to your forms.
HTML
11
star
11

opentranslate.org

The codebase for a PHP-based translation management tool
PHP
6
star
12

char-counter

A simple, configurable Polymer component for adding a character counter to your form fields.
JavaScript
4
star
13

spirograph

A playground app where I can tinker around with various frameworks/libs.
JavaScript
3
star
14

form-emailer

A simple but versatile form email script, written to work with any web form and allow for complete customization over the email content.
PHP
2
star
15

grunt-code-analysis

A grunt plugin to analyze your codebase.
JavaScript
1
star
16

svgplayground

Playing around with Dart and SVG, to provide a simple interface to generate feColorMatrix elements.
JavaScript
1
star
17

flash_image_scroller

A simple, highly configurable Flash script that you can add to your webpages to provide an intuitive "window" to scroll through a series of thumbnail images.
JavaScript
1
star
18

WebRTC

A place to experiment with WebRTC. Currently uses node/socket.
JavaScript
1
star
19

table-indexer

A simple jQuery plugin to change tab-orders from horizontal to vertical
1
star
20

Smart-Lists

A small script that lets you convert "flat" HTML lists of information into categorized, paginated lists.
JavaScript
1
star