🌜
🌞
flotr2

flotr2

v0.1.0

A library for drawing HTML5 charts and graphs.

npm install flotr2

README

Flotr2

The Canvas graphing library.

Google Groups

http://groups.google.com/group/flotr2/

Please fork http://jsfiddle.net/cesutherland/ZFBj5/ with your question or bug reproduction case.

API

The API consists of a primary draw method which accepts a configuration object, helper methods, and several microlibs.

Example

  var
    // Container div:
    container = document.getElementById("flotr-example-graph"),
    // First data series:
    d1 = [[0, 3], [4, 8], [8, 5], [9, 13]],
    // Second data series:
    d2 = [],
    // A couple flotr configuration options:
    options = {
      xaxis: {
        minorTickFreq: 4
      }, 
      grid: {
        minorVerticalLines: true
      }
    },
    i, graph;

  // Generated second data set:
  for (i = 0; i < 14; i += 0.5) {
    d2.push([i, Math.sin(i)]);
  }

  // Draw the graph:
  graph = Flotr.draw(
    container,  // Container element
    [ d1, d2 ], // Array of data series
    options     // Configuration options
  );

Microlibs

Extending

Flotr may be extended by adding new plugins and graph types.

Graph Types

Graph types define how a particular chart is rendered. Examples include line, bar, pie.

Existing graph types are found in js/types/.

Plugins

Plugins extend the core of flotr with new functionality. They can add interactions, new decorations, etc. Examples include titles, labels and selection.

The plugins included are found in js/plugins/.

Development

This project uses smoosh to build and jasmine with js-imagediff to test. Tests may be executed by jasmine-headless-webkit with cd spec; jasmine-headless-webkit -j jasmine.yml -c or by a browser by navigating to flotr2/spec/SpecRunner.html.

Shoutouts

Thanks to Bas Wenneker, Fabien Ménager and others for all the work on the original Flotr. Thanks to Jochen Berger and Jordan Santell for their contributions to Flotr2.

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
2,458
Community Interest
3,144
Number of Forks
543

Maintenance

Commits
10/219/2201
Last Commit
Jul 21, 2014
Open Issues
124
Closed Issues
115
Open Pull Requests
24
Closed Pull Requests
22

Versions

Versions Released
10/219/2201
Latest Version Released
Dec 17, 2016
Current Tags
latest0.1.0

Dependencies

Dependencies (0)
Dev Dependencies (1)

Contributors

cesutherland
cesutherland
Commits: 784
jochenberger
jochenberger
Commits: 35
jsantell
jsantell
Commits: 12
silverma
silverma
Commits: 3
ioguix
ioguix
Commits: 3
fresham
fresham
Commits: 3
sdvoynikov
sdvoynikov
Commits: 3
fiznool
fiznool
Commits: 2
splitfeed
splitfeed
Commits: 2
jgillman
jgillman
Commits: 2
omahlama
omahlama
Commits: 2
esamattis
esamattis
Commits: 1
karbassi
karbassi
Commits: 1
lievenjanssen
lievenjanssen
Commits: 1
K0den
K0den
Commits: 1