# 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
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
一个简单的电子商务项目(网上花店)+管理信息系统.zip (830个子文件)
africa 45KB
antarctica 15KB
asia 111KB
australasia 68KB
backward 4KB
bootstrap.css 187KB
bootstrap.min.css 147KB
weather-icons-wind.min.css 142KB
weather-icons-wind.css 142KB
style.css 116KB
bootstrap.min.css 114KB
material-design-iconic-font.css 83KB
materialdesignicons.min.css 76KB
material-design-iconic-font.min.css 69KB
animate.css 55KB
linea.css 48KB
font-awesome.css 37KB
ie7.css 35KB
font-awesome.css 32KB
weather-icons.css 31KB
font-awesome.min.css 30KB
font-awesome.min.css 27KB
bootstrap-grid.css 25KB
font-awesome.min.css 23KB
weather-icons.min.css 23KB
spinners.css 19KB
bootstrap-grid.min.css 18KB
themify-icons.css 17KB
themify-icons.css 16KB
main.css 16KB
flag-icon.min.css 12KB
simple-line-icons.css 12KB
simple-line-icons.css 12KB
bootstrap-reboot.css 6KB
bootstrap-reboot.min.css 5KB
blue-dark.css 4KB
red-dark.css 4KB
green-dark.css 4KB
megna-dark.css 4KB
purple-dark.css 4KB
default-dark.css 4KB
green.css 4KB
megna.css 4KB
purple.css 4KB
red.css 4KB
blue.css 4KB
pricing.css 3KB
default.css 3KB
flexslider.css 3KB
jquery-ui.min.css 2KB
examples.css 2KB
weather-icons-core.css 2KB
owl.theme.css 2KB
owl.carousel.css 1KB
weather-icons-variables.css 0B
variables-moon.css 0B
variables-day.css 0B
variables-neutral.css 0B
variables-time.css 0B
variables-night.css 0B
variables-beaufort.css 0B
variables-misc.css 0B
variables-wind-names.css 0B
variables-direction.css 0B
materialdesignicons-webfont.eot 255KB
fontawesome-webfont.eot 162KB
weathericons-regular-webfont.eot 97KB
themify.eot 77KB
fontawesome-webfont.eot 69KB
fontawesome-webfont.eot 59KB
Simple-Line-Icons.eot 52KB
Material-Design-Iconic-Font.eot 41KB
linea-basic-elaboration-10.eot 23KB
linea-weather-10.eot 21KB
linea-basic-10.eot 21KB
linea-software-10.eot 16KB
linea-arrows-10.eot 16KB
linea-ecommerce-10.eot 16KB
linea-music-10.eot 6KB
etcetera 3KB
europe 119KB
factory 393B
loading.gif 5KB
arrow-down.gif 916B
arrow-up.gif 916B
arrow-right.gif 897B
arrow-left.gif 891B
.gitattributes 65B
.gitignore 293B
.gitignore 40B
.gitignore 38B
index.html 28KB
index.html 25KB
index.html 25KB
index.html 18KB
index.html 7KB
index.html 5KB
index.html 5KB
index.html 5KB
index.html 4KB
共 830 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
博士僧小星
- 粉丝: 1924
- 资源: 5892
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功