Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
48 changes: 48 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
*
* cssplot
* Simple, css-only plotting
* https://github.com/asciimoo/cssplot
* demo: http://asciimoo.github.io/cssplot/
*
*/
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
dist: {
options: {
compress: true
},
files: {
'build/cssplot.base.css': 'src/cssplot.base.less',
'build/cssplot.full.css': 'src/cssplot.full.less',
'build/cssplot.group.css': 'src/cssplot.group.less',
'build/cssplot.animations.css': 'src/cssplot.animations.less'
}
}
},
watch: {
options: {
livereload: true
},
css: {
files: ['src/*.less'],
tasks: ['newer:less'],
options: {
spawn: false
}
},
html: {
files: ['*.html'],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('default', ['newer:less','watch']);
};
23 changes: 0 additions & 23 deletions Makefile

This file was deleted.

34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,41 @@ Alternatively `cssplot.base.css` can be used alone with the following modificati
<img src="docs/images/cssplot_scatter_plot.png"/>
</div>

### Animated Graphs

For animated charts, add the `data-cp-transition` attribute to the `plot-container`; the values are: `fade` and `grow` and they're the two types of animation availables. Then, each point in the graph must have the `data-cp-delay` attribute with a value that must be a number higher than zero and represents the delay of the animation (in miliseconds).

```html
<div class="bar-plot">
<ul class="plot-container" data-cp-transition="0.3">
<li data-cp-delay="1" data-cp-size="1"></li>
<li data-cp-delay="2" data-cp-size="2"></li>
<li data-cp-delay="3" data-cp-size="4"></li>
<li data-cp-delay="4" data-cp-size="8"></li>
<li data-cp-delay="5" data-cp-size="16"></li>
</ul>
</div>
```

## Build
Using **GruntJS**.

Clone this repo and install dependencies:

$ npm install

Then run:

$ grunt

It will keep *watching* your changes while you save them and if you have [Livereload](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) extension your browser will refresh each time you save your .less file.

## Conceptions

- [ ] Pie chart
- [ ] Stacked bar chart
- [ ] Line chart
- [ ] Axis/scale support
- [ ] Live demo
- [ ] Better build script
- [X] Live demo
- [X] Better build script
- [X] Animated charts
1 change: 1 addition & 0 deletions build/cssplot.animations.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 1 addition & 77 deletions build/cssplot.base.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading