Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/johno/lumber.js
- Owner: johno
- License: mit
- Created: 2014-05-20T22:01:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-27T07:08:49.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T17:31:13.232Z (3 months ago)
- Language: JavaScript
- Homepage: http://lumberjs.com
- Size: 262 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 RequestCrafted with <3 by [John Otander](http://www.johnotander.com) ([@4lpine](https://twitter.com/4lpine)).