# Flot [![Build status](https://travis-ci.org/flot/flot.png)](https://travis-ci.org/flot/flot)
## About ##
Flot is a Javascript plotting library for jQuery.
Read more at the website: <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 browsers that support the HTML5 canvas tag are
supported.
For support for Internet Explorer < 9, you can use [Excanvas]
[excanvas], a canvas emulator; this is used in the examples bundled
with Flot. You just include the excanvas script like this:
```html
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="excanvas.min.js"></script><![endif]-->
```
If it's not working on your development IE 6.0, check that it has
support for VML which Excanvas is relying on. It appears that some
stripped down versions used for test environments on virtual machines
lack the VML support.
You can also try using [Flashcanvas][flashcanvas], which uses Flash to
do the emulation. Although Flash can be a bit slower to load than VML,
if you've got a lot of points, the Flash version can be much faster
overall. Flot contains some wrapper code for activating Excanvas which
Flashcanvas is compatible with.
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:
```html
<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:
```html
<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:
```js
$.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](API.md). Here's a quick example that'll draw a line
from (0, 0) to (1, 1):
```js
$.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.
## What's with the name? ##
First: it's pronounced with a short o, like "plot". Not like "flawed".
So "Flot" rhymes with "plot".
And if you look up "flot" in a Danish-to-English dictionary, some of
the words that come up are "good-looking", "attractive", "stylish",
"smart", "impressive", "extravagant". One of the main goals with Flot
is pretty looks.
## Notes about the examples ##
In order to have a useful, functional example of time-series plots using time
zones, date.js from [timezone-js][timezone-js] (released under the Apache 2.0
license) and the [Olson][olson] time zone database (released to the public
domain) have been included in the examples directory. They are used in
examples/axes-time-zones/index.html.
[excanvas]: http://code.google.com/p/explorercanvas/
[flashcanvas]: http://code.google.com/p/flashcanvas/
[timezone-js]: https://github.com/mde/timezone-js
[olson]: http://ftp.iana.org/time-zones
没有合适的资源?快使用搜索试试~ 我知道了~
flot-flot-v0.8.3-2-g958e5fd.zip_ flot
共97个文件
html:28个
js:21个
json:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 138 浏览量
2022-09-19
21:19:26
上传
评论
收藏 557KB ZIP 举报
温馨提示
基于JS的图表控件,功能强大,好用,目前文档也日益变多
资源推荐
资源详情
资源评论
收起资源包目录
flot-flot-v0.8.3-2-g958e5fd.zip (97个子文件)
flot-flot-958e5fd
.travis.yml 35B
jquery.js 260KB
jquery.flot.errorbars.js 12KB
jquery.flot.crosshair.js 5KB
jquery.flot.js 120KB
jquery.colorhelpers.js 6KB
package.json 154B
excanvas.js 41KB
jquery.flot.image.js 7KB
NEWS.md 39KB
jquery.flot.time.js 11KB
component.json 114B
jquery.flot.symbol.js 2KB
jquery.flot.navigate.js 14KB
CONTRIBUTING.md 3KB
flot.jquery.json 837B
PLUGINS.md 4KB
FAQ.md 3KB
jquery.flot.stack.js 7KB
examples
series-types
index.html 2KB
annotating
index.html 3KB
axes-time-zones
index.html 3KB
tz
solar87 19KB
australasia 68KB
asia 111KB
northamerica 133KB
africa 45KB
factory 393B
europe 119KB
iso3166.tab 4KB
systemv 2KB
yearistype.sh 680B
pacificnew 1KB
backward 4KB
antarctica 15KB
etcetera 3KB
solar89 19KB
southamerica 73KB
leapseconds 3KB
zone.tab 19KB
solar88 19KB
date.js 37KB
image
index.html 2KB
hs-2004-27-a-large-web.jpg 34KB
examples.css 2KB
shared
jquery-ui
jquery-ui.min.css 2KB
jquery-ui.min.js 30KB
background.png 231B
canvas
index.html 25KB
axes-interacting
index.html 3KB
zooming
index.html 3KB
selection
index.html 5KB
realtime
index.html 3KB
series-toggle
index.html 5KB
resize
index.html 2KB
index.html 3KB
percentiles
index.html 7KB
ajax
data-eu-gdp-growth-2.json 99B
data-japan-gdp-growth.json 171B
data-eu-gdp-growth-5.json 177B
data-eu-gdp-growth-1.json 73B
index.html 4KB
data-usa-gdp-growth.json 167B
data-eu-gdp-growth-4.json 151B
data-eu-gdp-growth.json 177B
data-eu-gdp-growth-3.json 125B
axes-time
index.html 18KB
navigate
arrow-right.gif 897B
arrow-left.gif 891B
arrow-down.gif 916B
arrow-up.gif 916B
index.html 4KB
symbols
index.html 2KB
stacking
index.html 3KB
tracking
index.html 3KB
threshold
index.html 2KB
interacting
index.html 3KB
basic-options
index.html 2KB
visitors
index.html 5KB
series-errorbars
index.html 3KB
categories
index.html 2KB
basic-usage
index.html 2KB
axes-multiple
index.html 25KB
series-pie
index.html 28KB
jquery.flot.categories.js 6KB
.gitignore 40B
excanvas.min.js 19KB
jquery.flot.pie.js 23KB
Makefile 285B
jquery.flot.resize.js 3KB
jquery.flot.threshold.js 4KB
README.md 4KB
jquery.flot.fillbetween.js 5KB
jquery.flot.canvas.js 9KB
jquery.flot.selection.js 13KB
API.md 52KB
LICENSE.txt 1KB
共 97 条
- 1
资源评论
林当时
- 粉丝: 95
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功