Code Monkey home page Code Monkey logo

d3-radialbar's Introduction

#Radial Bar Chart

A D3 reusable radial bar chart (examples).

###Simple example

var data = [{'data': {'Winter': 5, 'Spring': 8, 'Summer': 12, 'Autumn': 9}}];
var chart = radialBarChart()
  .barHeight(250)
  .domain([0,15])
  .barColors(['steelblue']);

d3.select('#chart')
  .datum(data)
  .call(chart);

###Implementation

The implementation follows the reusable charts convention proposed by Mike Bostock.

##Configuration

The chart can be configured in a number of ways (all optional)

  • margin: An object specifying the margins e.g. {top: 20, right: 20, bottom: 20, left: 20}
  • domain: The domain of the data e.g. [0, 10]
  • barHeight: The maximum bar height: this determines the overall size of the chart
  • barColors: An array specifying the bar colours. Repeats if shorter than the number of bars.
  • colorLabels: Colour the labels the same colour as the bar (boolean)
  • tickValues: An array specifying axis tick values e.g. [20, 40, 60, 80, 100]
  • tickCircleValues: An array specifying background circular grid line values e.g. [0, 10, 20, 30, 40]
  • capitalizeLabels: Capitalises the data labels
  • reverseLayerOrder: Reverse the order in which the layers are rendered

###About This chart was created by Peter Cook Twitter: @prcweb

d3-radialbar's People

Contributors

peterrcook avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.