GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - flot/flot: Attractive JavaScript charts for jQuery

BranchesTags
Open more actions menu

Latest commit

 

History

1,087 Commits
1,087 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
docs
docs
 
 
examples
examples
 
 
lib
lib
 
 
source
source
 
 
tests
tests
 
 
.dont-break.json
.dont-break.json
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.travis.yml
.travis.yml
 
 
API.md
API.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
FAQ.md
FAQ.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
build.js
build.js
 
 
flot-2.1.3.tgz
flot-2.1.3.tgz
 
 
gulpfile.js
gulpfile.js
 
 
jquery.event.drag.LICENSE.txt
jquery.event.drag.LICENSE.txt
 
 
jquery.mousewheel.LICENSE.txt
jquery.mousewheel.LICENSE.txt
 
 
karma.conf.js
karma.conf.js
 
 
legend.css
legend.css
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
update_docs.js
update_docs.js
 
 

Repository files navigation

flot Build Status CircleCI Coverage Status Greenkeeper badge

About

flot is a JavaScript plotting library for engineering and scientific applications derived from Flot: http://www.flotcharts.org/

Take a look at the the examples in examples/index.html; they should give a good impression of what flot can do, and the source code of the examples is probably the fastest way to learn how to use flot.

Installation

Just include the JavaScript file after you've included jQuery.

Generally, all modern browsers are supported.

You need at least jQuery 1.2.6, but try at least 1.3.2 for interactive charts because of performance improvements in event handling.

Basic usage

Create a placeholder div to put the graph in:

<div id="placeholder"></div>

You need to set the width and height of this div, otherwise the plot library doesn't know how to scale the graph. You can do it inline like this:

<div id="placeholder" style="width:600px;height:300px"></div>

You can also do it with an external stylesheet. Make sure that the placeholder isn't within something with a display:none CSS property - in that case, Flot has trouble measuring label dimensions which results in garbled looks and might have trouble measuring the placeholder dimensions which is fatal (it'll throw an exception).

Then when the div is ready in the DOM, which is usually on document ready, run the plot function:

$.plot($("#placeholder"), data, options);

Here, data is an array of data series and options is an object with settings if you want to customize the plot. Take a look at the examples for some ideas of what to put in or look at the API reference. Here's a quick example that'll draw a line from (0, 0) to (1, 1):

$.plot($("#placeholder"), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } });

The plot function immediately draws the chart and then returns a plot object with a couple of methods.

Documentation and examples

API Documentation is available here: API reference

About how the plugins work: Plugins

High level overview on how interactions are handled internally: Interactions

Examples are included in the examples folder of this repository, but they can be tried out online as well: Examples

CircleCI

CircleCI is used in this repo to run dont-break, which checks if the current version of flot breaks unit tests on specified dependent projects.

About

Attractive JavaScript charts for jQuery

www.flotcharts.org/

Resources

Readme
MIT license

Contributing

Contributing
Activity
Custom properties

Stars

5.9k stars

Watchers

267 watching

Forks

1.5k forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.