Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/johno/lumber.js

A wrapper for d3.js.
https://github.com/johno/lumber.js

Last synced: about 1 month ago
JSON representation

A wrapper for d3.js.

Awesome Lists containing this project

README

        

# Lumber.js

_This is currently under development._

A wrapper for d3.js. It allows you to specify graph data and styling with data attributes in page elements.

## Using HTML5 Data Attributes

If you'd like to use HTML5 data attributes:

```html

```

## Using Vanilla JS

```js
// Select the chart div using d3.
chartDiv = d3.select("#bar-chart");

// Specify the chart details in a simple object.
lumberData = { data: [{ x: 3, y: "A"}, { x: 2, y: "B"}], width: "400", height: 250, type: "bar", yAxis: "Frequency", xAxis: "Letter" };

// Call lumber so it can do it's magic.
lumber.barChart(chartDiv, lumberData);
```

## Installation

Distribution files are available in the [dist directory](https://github.com/johnotander/lumberjs/tree/master/dist).

```
dist/
css/
lumber.css // Compiled, css version of lumber.scss.
scss/
lumber.scss // Sass version of lumber.js styling.
lumber.js // Development version of lumber.js.
lumber.min.js // Minified, production version of lumber.js.
```

### Development

This project uses gulp to automate tasks like jshinting, uglification, and sass compilation:

```
git clone https://github.com/johnotander/lumberjs.git && cd lumberjs
npm install .
npm install -g gulp
gulp
```

For further documentation on gulp, a good place to start would be [Travis Maynard's blog post](http://travismaynard.com/writing/getting-started-with-gulp).

## Contributing

1. Fork it ( http://github.com/johnotander/lumberjs/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by [John Otander](http://www.johnotander.com) ([@4lpine](https://twitter.com/4lpine)).