GithubHelp home page GithubHelp logo

shawnbot / sparky Goto Github PK

View Code? Open in Web Editor NEW
249.0 18.0 27.0 257 KB

Because life is too short for ugly sparklines.

Home Page: http://prag.ma/code/sparky/

License: MIT License

JavaScript 99.10% CSS 0.90%

sparky's Introduction

Sparklines are intense, simple, word-sized graphics. Sparky is a JavaScript
library for drawing them dynamically in your web browser.

This project isn't actively developed, but feel free to fork, modify or fix,
and I'll (@shawnbot) happily accept pull requests. Enjoy!

sparky's People

Contributors

bcleland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparky's Issues

bars set is recursive

the paper set for bars seems to be recursive
On line 225 :

bars.push(bars);

should probably be :

bars.push(bar);

Back Button in Chrome

In Chrome 23.0.1271.95 m when you visit another site then hit the back button, the sparklines do not render.

Add to NPM?

Are you open to adding this to NPM for use with something like browserify? Or at least just installing into node_modules via npm?

it fails when there are data points that are ALL equal

Error: Problem parsing d="M,0,0" raphael.js:5773
$ raphael.js:5773
setFillAndStroke raphael.js:6111
R._engine.path raphael.js:6416
paperproto.path raphael.js:3723
sparky.sparkline

It fails like this for any set of data points that has all the same value, ie: [2,2,2,2,2,2].

A slight variation like [1.999, 2, 2, 2, 2, 2] works.

ALSO:

I'm sure you meant sparky.presets here: https://github.com/shawnbot/sparky/blob/master/src/sparky.js#L116

Great library though. Thanks!

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.