new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Flot",
|
||||
"version": "0.8.3",
|
||||
"main": "jquery.flot.js",
|
||||
"dependencies": {
|
||||
"jquery": ">= 1.2.6"
|
||||
},
|
||||
"homepage": "https://github.com/flot/flot",
|
||||
"_release": "0.8.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.8.3",
|
||||
"commit": "453b017cc5acfd75e252b93e8635f57f4196d45d"
|
||||
},
|
||||
"_source": "git://github.com/flot/flot.git",
|
||||
"_target": "~0.8.3",
|
||||
"_originalSource": "flot",
|
||||
"_direct": true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
*.min.js
|
||||
!excanvas.min.js
|
||||
node_modules/
|
||||
@@ -0,0 +1,3 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,98 @@
|
||||
## Contributing to Flot ##
|
||||
|
||||
We welcome all contributions, but following these guidelines results in less
|
||||
work for us, and a faster and better response.
|
||||
|
||||
### Issues ###
|
||||
|
||||
Issues are not a way to ask general questions about Flot. If you see unexpected
|
||||
behavior but are not 100% certain that it is a bug, please try posting to the
|
||||
[forum](http://groups.google.com/group/flot-graphs) first, and confirm that
|
||||
what you see is really a Flot problem before creating a new issue for it. When
|
||||
reporting a bug, please include a working demonstration of the problem, if
|
||||
possible, or at least a clear description of the options you're using and the
|
||||
environment (browser and version, jQuery version, other libraries) that you're
|
||||
running under.
|
||||
|
||||
If you have suggestions for new features, or changes to existing ones, we'd
|
||||
love to hear them! Please submit each suggestion as a separate new issue.
|
||||
|
||||
If you would like to work on an existing issue, please make sure it is not
|
||||
already assigned to someone else. If an issue is assigned to someone, that
|
||||
person has already started working on it. So, pick unassigned issues to prevent
|
||||
duplicated effort.
|
||||
|
||||
### Pull Requests ###
|
||||
|
||||
To make merging as easy as possible, please keep these rules in mind:
|
||||
|
||||
1. Submit new features or architectural changes to the *<version>-work*
|
||||
branch for the next major release. Submit bug fixes to the master branch.
|
||||
|
||||
2. Divide larger changes into a series of small, logical commits with
|
||||
descriptive messages.
|
||||
|
||||
3. Rebase, if necessary, before submitting your pull request, to reduce the
|
||||
work we need to do to merge it.
|
||||
|
||||
4. Format your code according to the style guidelines below.
|
||||
|
||||
### Flot Style Guidelines ###
|
||||
|
||||
Flot follows the [jQuery Core Style Guidelines](http://docs.jquery.com/JQuery_Core_Style_Guidelines),
|
||||
with the following updates and exceptions:
|
||||
|
||||
#### Spacing ####
|
||||
|
||||
Use four-space indents, no tabs. Do not add horizontal space around parameter
|
||||
lists, loop definitions, or array/object indices. For example:
|
||||
|
||||
```js
|
||||
for ( var i = 0; i < data.length; i++ ) { // This block is wrong!
|
||||
if ( data[ i ] > 1 ) {
|
||||
data[ i ] = 2;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.length; i++) { // This block is correct!
|
||||
if (data[i] > 1) {
|
||||
data[i] = 2;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Comments ####
|
||||
|
||||
Use [jsDoc](http://usejsdoc.org) comments for all file and function headers.
|
||||
Use // for all inline and block comments, regardless of length.
|
||||
|
||||
All // comment blocks should have an empty line above *and* below them. For
|
||||
example:
|
||||
|
||||
```js
|
||||
var a = 5;
|
||||
|
||||
// We're going to loop here
|
||||
// TODO: Make this loop faster, better, stronger!
|
||||
|
||||
for (var x = 0; x < 10; x++) {}
|
||||
```
|
||||
|
||||
#### Wrapping ####
|
||||
|
||||
Block comments should be wrapped at 80 characters.
|
||||
|
||||
Code should attempt to wrap at 80 characters, but may run longer if wrapping
|
||||
would hurt readability more than having to scroll horizontally. This is a
|
||||
judgement call made on a situational basis.
|
||||
|
||||
Statements containing complex logic should not be wrapped arbitrarily if they
|
||||
do not exceed 80 characters. For example:
|
||||
|
||||
```js
|
||||
if (a == 1 && // This block is wrong!
|
||||
b == 2 &&
|
||||
c == 3) {}
|
||||
|
||||
if (a == 1 && b == 2 && c == 3) {} // This block is correct!
|
||||
```
|
||||
@@ -0,0 +1,75 @@
|
||||
## Frequently asked questions ##
|
||||
|
||||
#### How much data can Flot cope with? ####
|
||||
|
||||
Flot will happily draw everything you send to it so the answer
|
||||
depends on the browser. The excanvas emulation used for IE (built with
|
||||
VML) makes IE by far the slowest browser so be sure to test with that
|
||||
if IE users are in your target group (for large plots in IE, you can
|
||||
also check out Flashcanvas which may be faster).
|
||||
|
||||
1000 points is not a problem, but as soon as you start having more
|
||||
points than the pixel width, you should probably start thinking about
|
||||
downsampling/aggregation as this is near the resolution limit of the
|
||||
chart anyway. If you downsample server-side, you also save bandwidth.
|
||||
|
||||
|
||||
#### Flot isn't working when I'm using JSON data as source! ####
|
||||
|
||||
Actually, Flot loves JSON data, you just got the format wrong.
|
||||
Double check that you're not inputting strings instead of numbers,
|
||||
like [["0", "-2.13"], ["5", "4.3"]]. This is most common mistake, and
|
||||
the error might not show up immediately because Javascript can do some
|
||||
conversion automatically.
|
||||
|
||||
|
||||
#### Can I export the graph? ####
|
||||
|
||||
You can grab the image rendered by the canvas element used by Flot
|
||||
as a PNG or JPEG (remember to set a background). Note that it won't
|
||||
include anything not drawn in the canvas (such as the legend). And it
|
||||
doesn't work with excanvas which uses VML, but you could try
|
||||
Flashcanvas.
|
||||
|
||||
|
||||
#### The bars are all tiny in time mode? ####
|
||||
|
||||
It's not really possible to determine the bar width automatically.
|
||||
So you have to set the width with the barWidth option which is NOT in
|
||||
pixels, but in the units of the x axis (or the y axis for horizontal
|
||||
bars). For time mode that's milliseconds so the default value of 1
|
||||
makes the bars 1 millisecond wide.
|
||||
|
||||
|
||||
#### Can I use Flot with libraries like Mootools or Prototype? ####
|
||||
|
||||
Yes, Flot supports it out of the box and it's easy! Just use jQuery
|
||||
instead of $, e.g. call jQuery.plot instead of $.plot and use
|
||||
jQuery(something) instead of $(something). As a convenience, you can
|
||||
put in a DOM element for the graph placeholder where the examples and
|
||||
the API documentation are using jQuery objects.
|
||||
|
||||
Depending on how you include jQuery, you may have to add one line of
|
||||
code to prevent jQuery from overwriting functions from the other
|
||||
libraries, see the documentation in jQuery ("Using jQuery with other
|
||||
libraries") for details.
|
||||
|
||||
|
||||
#### Flot doesn't work with [insert name of Javascript UI framework]! ####
|
||||
|
||||
Flot is using standard HTML to make charts. If this is not working,
|
||||
it's probably because the framework you're using is doing something
|
||||
weird with the DOM or with the CSS that is interfering with Flot.
|
||||
|
||||
A common problem is that there's display:none on a container until the
|
||||
user does something. Many tab widgets work this way, and there's
|
||||
nothing wrong with it - you just can't call Flot inside a display:none
|
||||
container as explained in the README so you need to hold off the Flot
|
||||
call until the container is actually displayed (or use
|
||||
visibility:hidden instead of display:none or move the container
|
||||
off-screen).
|
||||
|
||||
If you find there's a specific thing we can do to Flot to help, feel
|
||||
free to submit a bug report. Otherwise, you're welcome to ask for help
|
||||
on the forum/mailing list, but please don't submit a bug report to
|
||||
Flot.
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Makefile for generating minified files
|
||||
|
||||
.PHONY: all
|
||||
|
||||
# we cheat and process all .js files instead of an exhaustive list
|
||||
all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js)))
|
||||
|
||||
%.min.js: %.js
|
||||
yui-compressor $< -o $@
|
||||
|
||||
test:
|
||||
./node_modules/.bin/jshint *jquery.flot.js
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,143 @@
|
||||
## Writing plugins ##
|
||||
|
||||
All you need to do to make a new plugin is creating an init function
|
||||
and a set of options (if needed), stuffing it into an object and
|
||||
putting it in the $.plot.plugins array. For example:
|
||||
|
||||
```js
|
||||
function myCoolPluginInit(plot) {
|
||||
plot.coolstring = "Hello!";
|
||||
};
|
||||
|
||||
$.plot.plugins.push({ init: myCoolPluginInit, options: { ... } });
|
||||
|
||||
// if $.plot is called, it will return a plot object with the
|
||||
// attribute "coolstring"
|
||||
```
|
||||
|
||||
Now, given that the plugin might run in many different places, it's
|
||||
a good idea to avoid leaking names. The usual trick here is wrap the
|
||||
above lines in an anonymous function which is called immediately, like
|
||||
this: (function () { inner code ... })(). To make it even more robust
|
||||
in case $ is not bound to jQuery but some other Javascript library, we
|
||||
can write it as
|
||||
|
||||
```js
|
||||
(function ($) {
|
||||
// plugin definition
|
||||
// ...
|
||||
})(jQuery);
|
||||
```
|
||||
|
||||
There's a complete example below, but you should also check out the
|
||||
plugins bundled with Flot.
|
||||
|
||||
|
||||
## Complete example ##
|
||||
|
||||
Here is a simple debug plugin which alerts each of the series in the
|
||||
plot. It has a single option that control whether it is enabled and
|
||||
how much info to output:
|
||||
|
||||
```js
|
||||
(function ($) {
|
||||
function init(plot) {
|
||||
var debugLevel = 1;
|
||||
|
||||
function checkDebugEnabled(plot, options) {
|
||||
if (options.debug) {
|
||||
debugLevel = options.debug;
|
||||
plot.hooks.processDatapoints.push(alertSeries);
|
||||
}
|
||||
}
|
||||
|
||||
function alertSeries(plot, series, datapoints) {
|
||||
var msg = "series " + series.label;
|
||||
if (debugLevel > 1) {
|
||||
msg += " with " + series.data.length + " points";
|
||||
alert(msg);
|
||||
}
|
||||
}
|
||||
|
||||
plot.hooks.processOptions.push(checkDebugEnabled);
|
||||
}
|
||||
|
||||
var options = { debug: 0 };
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "simpledebug",
|
||||
version: "0.1"
|
||||
});
|
||||
})(jQuery);
|
||||
```
|
||||
|
||||
We also define "name" and "version". It's not used by Flot, but might
|
||||
be helpful for other plugins in resolving dependencies.
|
||||
|
||||
Put the above in a file named "jquery.flot.debug.js", include it in an
|
||||
HTML page and then it can be used with:
|
||||
|
||||
```js
|
||||
$.plot($("#placeholder"), [...], { debug: 2 });
|
||||
```
|
||||
|
||||
This simple plugin illustrates a couple of points:
|
||||
|
||||
- It uses the anonymous function trick to avoid name pollution.
|
||||
- It can be enabled/disabled through an option.
|
||||
- Variables in the init function can be used to store plot-specific
|
||||
state between the hooks.
|
||||
|
||||
The two last points are important because there may be multiple plots
|
||||
on the same page, and you'd want to make sure they are not mixed up.
|
||||
|
||||
|
||||
## Shutting down a plugin ##
|
||||
|
||||
Each plot object has a shutdown hook which is run when plot.shutdown()
|
||||
is called. This usually mostly happens in case another plot is made on
|
||||
top of an existing one.
|
||||
|
||||
The purpose of the hook is to give you a chance to unbind any event
|
||||
handlers you've registered and remove any extra DOM things you've
|
||||
inserted.
|
||||
|
||||
The problem with event handlers is that you can have registered a
|
||||
handler which is run in some point in the future, e.g. with
|
||||
setTimeout(). Meanwhile, the plot may have been shutdown and removed,
|
||||
but because your event handler is still referencing it, it can't be
|
||||
garbage collected yet, and worse, if your handler eventually runs, it
|
||||
may overwrite stuff on a completely different plot.
|
||||
|
||||
|
||||
## Some hints on the options ##
|
||||
|
||||
Plugins should always support appropriate options to enable/disable
|
||||
them because the plugin user may have several plots on the same page
|
||||
where only one should use the plugin. In most cases it's probably a
|
||||
good idea if the plugin is turned off rather than on per default, just
|
||||
like most of the powerful features in Flot.
|
||||
|
||||
If the plugin needs options that are specific to each series, like the
|
||||
points or lines options in core Flot, you can put them in "series" in
|
||||
the options object, e.g.
|
||||
|
||||
```js
|
||||
var options = {
|
||||
series: {
|
||||
downsample: {
|
||||
algorithm: null,
|
||||
maxpoints: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then they will be copied by Flot into each series, providing default
|
||||
values in case none are specified.
|
||||
|
||||
Think hard and long about naming the options. These names are going to
|
||||
be public API, and code is going to depend on them if the plugin is
|
||||
successful.
|
||||
@@ -0,0 +1,110 @@
|
||||
# Flot [](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
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Flot",
|
||||
"version": "0.8.3",
|
||||
"main": "jquery.flot.js",
|
||||
"dependencies": {
|
||||
"jquery": ">= 1.2.6"
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Template Name: Admin Template
|
||||
Author: Wrappixel
|
||||
|
||||
File: scss
|
||||
*/
|
||||
@import url("https://fonts.googleapis.com/css?family=Rubik:300,400,500,600,700");
|
||||
/*Theme Colors*/
|
||||
/**
|
||||
* Table Of Content
|
||||
*
|
||||
* 1. Color system
|
||||
* 2. Options
|
||||
* 3. Body
|
||||
* 4. Typography
|
||||
* 5. Breadcrumbs
|
||||
* 6. Cards
|
||||
* 7. Dropdowns
|
||||
* 8. Buttons
|
||||
* 9. Typography
|
||||
* 10. Progress bars
|
||||
* 11. Tables
|
||||
* 12. Forms
|
||||
* 14. Component
|
||||
*/
|
||||
/*==============================================================
|
||||
flot chart
|
||||
============================================================== */
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 300px; }
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9]
|
||||
]
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9],
|
||||
[2001, 2.0],
|
||||
[2002, 1.2]
|
||||
]
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9],
|
||||
[2001, 2.0],
|
||||
[2002, 1.2],
|
||||
[2003, 1.3],
|
||||
[2004, 2.5]
|
||||
]
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9],
|
||||
[2001, 2.0],
|
||||
[2002, 1.2],
|
||||
[2003, 1.3],
|
||||
[2004, 2.5],
|
||||
[2005, 2.0],
|
||||
[2006, 3.1]
|
||||
]
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9],
|
||||
[2001, 2.0],
|
||||
[2002, 1.2],
|
||||
[2003, 1.3],
|
||||
[2004, 2.5],
|
||||
[2005, 2.0],
|
||||
[2006, 3.1],
|
||||
[2007, 2.9],
|
||||
[2008, 0.9]
|
||||
]
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [
|
||||
[1999, 3.0],
|
||||
[2000, 3.9],
|
||||
[2001, 2.0],
|
||||
[2002, 1.2],
|
||||
[2003, 1.3],
|
||||
[2004, 2.5],
|
||||
[2005, 2.0],
|
||||
[2006, 3.1],
|
||||
[2007, 2.9],
|
||||
[2008, 0.9]
|
||||
]
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "Japan",
|
||||
"data": [
|
||||
[1999, -0.1],
|
||||
[2000, 2.9],
|
||||
[2001, 0.2],
|
||||
[2002, 0.3],
|
||||
[2003, 1.4],
|
||||
[2004, 2.7],
|
||||
[2005, 1.9],
|
||||
[2006, 2.0],
|
||||
[2007, 2.3],
|
||||
[2008, -0.7]
|
||||
]
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"label": "USA",
|
||||
"data": [
|
||||
[1999, 4.4],
|
||||
[2000, 3.7],
|
||||
[2001, 0.8],
|
||||
[2002, 1.6],
|
||||
[2003, 2.5],
|
||||
[2004, 3.6],
|
||||
[2005, 2.9],
|
||||
[2006, 2.8],
|
||||
[2007, 2.0],
|
||||
[2008, 1.1]
|
||||
]
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: AJAX</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var options = {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
points: {
|
||||
show: true,
|
||||
},
|
||||
xaxis: {
|
||||
tickDecimals: 0,
|
||||
tickSize: 1,
|
||||
},
|
||||
};
|
||||
|
||||
var data = [];
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
|
||||
// Fetch one series, adding to what we already have
|
||||
|
||||
var alreadyFetched = {};
|
||||
|
||||
$("button.fetchSeries").click(function () {
|
||||
var button = $(this);
|
||||
|
||||
// Find the URL in the link right next to us, then fetch the data
|
||||
|
||||
var dataurl = button.siblings("a").attr("href");
|
||||
|
||||
function onDataReceived(series) {
|
||||
// Extract the first coordinate pair; jQuery has parsed it, so
|
||||
// the data is now just an ordinary JavaScript object
|
||||
|
||||
var firstcoordinate =
|
||||
"(" + series.data[0][0] + ", " + series.data[0][1] + ")";
|
||||
button
|
||||
.siblings("span")
|
||||
.text(
|
||||
"Fetched " + series.label + ", first point: " + firstcoordinate
|
||||
);
|
||||
|
||||
// Push the new data onto our existing data array
|
||||
|
||||
if (!alreadyFetched[series.label]) {
|
||||
alreadyFetched[series.label] = true;
|
||||
data.push(series);
|
||||
}
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: dataurl,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: onDataReceived,
|
||||
});
|
||||
});
|
||||
|
||||
// Initiate a recurring data update
|
||||
|
||||
$("button.dataUpdate").click(function () {
|
||||
data = [];
|
||||
alreadyFetched = {};
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
|
||||
var iteration = 0;
|
||||
|
||||
function fetchData() {
|
||||
++iteration;
|
||||
|
||||
function onDataReceived(series) {
|
||||
// Load all the data in one pass; if we only got partial
|
||||
// data we could merge it with what we already have.
|
||||
|
||||
data = [series];
|
||||
$.plot("#placeholder", data, options);
|
||||
}
|
||||
|
||||
// Normally we call the same URL - a script connected to a
|
||||
// database - but in this case we only have static example
|
||||
// files, so we need to modify the URL.
|
||||
|
||||
$.ajax({
|
||||
url: "data-eu-gdp-growth-" + iteration + ".json",
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: onDataReceived,
|
||||
});
|
||||
|
||||
if (iteration < 5) {
|
||||
setTimeout(fetchData, 1000);
|
||||
} else {
|
||||
data = [];
|
||||
alreadyFetched = {};
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(fetchData, 1000);
|
||||
});
|
||||
|
||||
// Load the first series by default, so we don't have an empty plot
|
||||
|
||||
$("button.fetchSeries:first").click();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>AJAX</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Example of loading data dynamically with AJAX. Percentage change in GDP
|
||||
(source:
|
||||
<a
|
||||
href="http://epp.eurostat.ec.europa.eu/tgm/table.do?tab=table&init=1&plugin=1&language=en&pcode=tsieb020"
|
||||
>Eurostat</a
|
||||
>). Click the buttons below:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The data is fetched over HTTP, in this case directly from text files.
|
||||
Usually the URL would point to some web server handler (e.g. a PHP page
|
||||
or Java/.NET/Python/Ruby on Rails handler) that extracts it from a
|
||||
database and serializes it to JSON.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">First dataset</button>
|
||||
[ <a href="data-eu-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">Second dataset</button>
|
||||
[ <a href="data-japan-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">Third dataset</button>
|
||||
[ <a href="data-usa-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you combine AJAX with setTimeout, you can poll the server for new
|
||||
data.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="dataUpdate">Poll for data</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Adding Annotations</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var data = [{ data: d1, label: "Pressure", color: "#333" }];
|
||||
|
||||
var markings = [
|
||||
{ color: "#f6f6f6", yaxis: { from: 1 } },
|
||||
{ color: "#f6f6f6", yaxis: { to: -1 } },
|
||||
{ color: "#000", lineWidth: 1, xaxis: { from: 2, to: 2 } },
|
||||
{ color: "#000", lineWidth: 1, xaxis: { from: 8, to: 8 } },
|
||||
];
|
||||
|
||||
var placeholder = $("#placeholder");
|
||||
|
||||
var plot = $.plot(placeholder, data, {
|
||||
bars: { show: true, barWidth: 0.5, fill: 0.9 },
|
||||
xaxis: { ticks: [], autoscaleMargin: 0.02 },
|
||||
yaxis: { min: -2, max: 2 },
|
||||
grid: { markings: markings },
|
||||
});
|
||||
|
||||
var o = plot.pointOffset({ x: 2, y: -1.2 });
|
||||
|
||||
// Append it to the placeholder that Flot already uses for positioning
|
||||
|
||||
placeholder.append(
|
||||
"<div style='position:absolute;left:" +
|
||||
(o.left + 4) +
|
||||
"px;top:" +
|
||||
o.top +
|
||||
"px;color:#666;font-size:smaller'>Warming up</div>"
|
||||
);
|
||||
|
||||
o = plot.pointOffset({ x: 8, y: -1.2 });
|
||||
placeholder.append(
|
||||
"<div style='position:absolute;left:" +
|
||||
(o.left + 4) +
|
||||
"px;top:" +
|
||||
o.top +
|
||||
"px;color:#666;font-size:smaller'>Actual measurements</div>"
|
||||
);
|
||||
|
||||
// Draw a little arrow on top of the last label to demonstrate canvas
|
||||
// drawing
|
||||
|
||||
var ctx = plot.getCanvas().getContext("2d");
|
||||
ctx.beginPath();
|
||||
o.left += 4;
|
||||
ctx.moveTo(o.left, o.top);
|
||||
ctx.lineTo(o.left, o.top - 10);
|
||||
ctx.lineTo(o.left + 10, o.top - 5);
|
||||
ctx.lineTo(o.left, o.top);
|
||||
ctx.fillStyle = "#000";
|
||||
ctx.fill();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Adding Annotations</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Flot has support for simple background decorations such as lines and
|
||||
rectangles. They can be useful for marking up certain areas. You can
|
||||
easily add any HTML you need with standard DOM manipulation, e.g. for
|
||||
labels. For drawing custom shapes there is also direct access to the
|
||||
canvas.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Interacting with axes</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
function generate(start, end, fn) {
|
||||
var res = [];
|
||||
for (var i = 0; i <= 100; ++i) {
|
||||
var x = start + (i / 100) * (end - start);
|
||||
res.push([x, fn(x)]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
var data = [
|
||||
{
|
||||
data: generate(0, 10, function (x) {
|
||||
return Math.sqrt(x);
|
||||
}),
|
||||
xaxis: 1,
|
||||
yaxis: 1,
|
||||
},
|
||||
{
|
||||
data: generate(0, 10, function (x) {
|
||||
return Math.sin(x);
|
||||
}),
|
||||
xaxis: 1,
|
||||
yaxis: 2,
|
||||
},
|
||||
{
|
||||
data: generate(0, 10, function (x) {
|
||||
return Math.cos(x);
|
||||
}),
|
||||
xaxis: 1,
|
||||
yaxis: 3,
|
||||
},
|
||||
{
|
||||
data: generate(2, 10, function (x) {
|
||||
return Math.tan(x);
|
||||
}),
|
||||
xaxis: 2,
|
||||
yaxis: 4,
|
||||
},
|
||||
];
|
||||
|
||||
var plot = $.plot("#placeholder", data, {
|
||||
xaxes: [{ position: "bottom" }, { position: "top" }],
|
||||
yaxes: [
|
||||
{ position: "left" },
|
||||
{ position: "left" },
|
||||
{ position: "right" },
|
||||
{ position: "left" },
|
||||
],
|
||||
});
|
||||
|
||||
// Create a div for each axis
|
||||
|
||||
$.each(plot.getAxes(), function (i, axis) {
|
||||
if (!axis.show) return;
|
||||
|
||||
var box = axis.box;
|
||||
|
||||
$(
|
||||
"<div class='axisTarget' style='position:absolute; left:" +
|
||||
box.left +
|
||||
"px; top:" +
|
||||
box.top +
|
||||
"px; width:" +
|
||||
box.width +
|
||||
"px; height:" +
|
||||
box.height +
|
||||
"px'></div>"
|
||||
)
|
||||
.data("axis.direction", axis.direction)
|
||||
.data("axis.n", axis.n)
|
||||
.css({ backgroundColor: "#f00", opacity: 0, cursor: "pointer" })
|
||||
.appendTo(plot.getPlaceholder())
|
||||
.hover(
|
||||
function () {
|
||||
$(this).css({ opacity: 0.1 });
|
||||
},
|
||||
function () {
|
||||
$(this).css({ opacity: 0 });
|
||||
}
|
||||
)
|
||||
.click(function () {
|
||||
$("#click").text(
|
||||
"You clicked the " + axis.direction + axis.n + "axis!"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Interacting with axes</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With multiple axes, you sometimes need to interact with them. A simple
|
||||
way to do this is to draw the plot, deduce the axis placements and
|
||||
insert a couple of divs on top to catch events.
|
||||
</p>
|
||||
|
||||
<p>Try clicking an axis.</p>
|
||||
|
||||
<p id="click"></p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+1056
File diff suppressed because it is too large
Load Diff
Vendored
+1235
File diff suppressed because it is too large
Load Diff
Vendored
+123
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Time zones</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.time.js"
|
||||
></script>
|
||||
<script language="javascript" type="text/javascript" src="date.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
timezoneJS.timezone.zoneFileBasePath = "tz";
|
||||
timezoneJS.timezone.defaultZoneFile = [];
|
||||
timezoneJS.timezone.init({ async: false });
|
||||
|
||||
var d = [
|
||||
[Date.UTC(2011, 2, 12, 14, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 12, 15, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 12, 16, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 12, 17, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 12, 18, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 12, 19, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 12, 20, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 12, 21, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 12, 22, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 12, 23, 0, 0), 6],
|
||||
[Date.UTC(2011, 2, 13, 0, 0, 0), 5],
|
||||
[Date.UTC(2011, 2, 13, 1, 0, 0), 6],
|
||||
[Date.UTC(2011, 2, 13, 2, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 13, 3, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 13, 4, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 13, 5, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 13, 6, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 13, 7, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 13, 8, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 13, 9, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 13, 10, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 13, 11, 0, 0), 29],
|
||||
[Date.UTC(2011, 2, 13, 12, 0, 0), 29.5],
|
||||
[Date.UTC(2011, 2, 13, 13, 0, 0), 29],
|
||||
[Date.UTC(2011, 2, 13, 14, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 13, 15, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 13, 16, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 13, 17, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 13, 18, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 13, 19, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 13, 20, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 13, 21, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 13, 22, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 13, 23, 0, 0), 6],
|
||||
];
|
||||
|
||||
var plot = $.plot("#placeholderUTC", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
},
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholderLocal", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
timezone: "browser",
|
||||
},
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholderChicago", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
timezone: "America/Chicago",
|
||||
},
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Time zones</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<h3>UTC</h3>
|
||||
<div class="demo-container" style="height: 300px">
|
||||
<div id="placeholderUTC" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<h3>Browser</h3>
|
||||
<div class="demo-container" style="height: 300px">
|
||||
<div id="placeholderLocal" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<h3>Chicago</h3>
|
||||
<div class="demo-container" style="height: 300px">
|
||||
<div id="placeholderChicago" class="demo-placeholder"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+1181
File diff suppressed because it is too large
Load Diff
Vendored
+413
@@ -0,0 +1,413 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# From Paul Eggert (1999-11-15):
|
||||
# To keep things manageable, we list only locations occupied year-round; see
|
||||
# <a href="http://www.comnap.aq/comnap/comnap.nsf/P/Stations/">
|
||||
# COMNAP - Stations and Bases
|
||||
# </a>
|
||||
# and
|
||||
# <a href="http://www.spri.cam.ac.uk/bob/periant.htm">
|
||||
# Summary of the Peri-Antarctic Islands (1998-07-23)
|
||||
# </a>
|
||||
# for information.
|
||||
# Unless otherwise specified, we have no time zone information.
|
||||
#
|
||||
# Except for the French entries,
|
||||
# I made up all time zone abbreviations mentioned here; corrections welcome!
|
||||
# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
|
||||
# These rules are stolen from the `southamerica' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
|
||||
Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S
|
||||
Rule ArgAQ 1967 only - Apr 2 0:00 0 -
|
||||
Rule ArgAQ 1967 1968 - Oct Sun>=1 0:00 1:00 S
|
||||
Rule ArgAQ 1968 1969 - Apr Sun>=1 0:00 0 -
|
||||
Rule ArgAQ 1974 only - Jan 23 0:00 1:00 S
|
||||
Rule ArgAQ 1974 only - May 1 0:00 0 -
|
||||
Rule ChileAQ 1972 1986 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1974 1987 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1987 only - Apr 12 3:00u 0 -
|
||||
Rule ChileAQ 1988 1989 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1988 only - Oct Sun>=1 4:00u 1:00 S
|
||||
Rule ChileAQ 1989 only - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1990 only - Mar 18 3:00u 0 -
|
||||
Rule ChileAQ 1990 only - Sep 16 4:00u 1:00 S
|
||||
Rule ChileAQ 1991 1996 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1991 1997 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1997 only - Mar 30 3:00u 0 -
|
||||
Rule ChileAQ 1998 only - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1998 only - Sep 27 4:00u 1:00 S
|
||||
Rule ChileAQ 1999 only - Apr 4 3:00u 0 -
|
||||
Rule ChileAQ 1999 2010 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 2000 2007 - Mar Sun>=9 3:00u 0 -
|
||||
# N.B.: the end of March 29 in Chile is March 30 in Universal time,
|
||||
# which is used below in specifying the transition.
|
||||
Rule ChileAQ 2008 only - Mar 30 3:00u 0 -
|
||||
Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S
|
||||
Rule ChileAQ 2012 only - Apr Sun>=23 3:00u 0 -
|
||||
Rule ChileAQ 2012 only - Sep Sun>=2 4:00u 1:00 S
|
||||
Rule ChileAQ 2013 max - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2013 max - Oct Sun>=9 4:00u 1:00 S
|
||||
|
||||
# These rules are stolen from the `australasia' file.
|
||||
Rule AusAQ 1917 only - Jan 1 0:01 1:00 -
|
||||
Rule AusAQ 1917 only - Mar 25 2:00 0 -
|
||||
Rule AusAQ 1942 only - Jan 1 2:00 1:00 -
|
||||
Rule AusAQ 1942 only - Mar 29 2:00 0 -
|
||||
Rule AusAQ 1942 only - Sep 27 2:00 1:00 -
|
||||
Rule AusAQ 1943 1944 - Mar lastSun 2:00 0 -
|
||||
Rule AusAQ 1943 only - Oct 3 2:00 1:00 -
|
||||
Rule ATAQ 1967 only - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1968 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1968 1985 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1969 1971 - Mar Sun>=8 2:00s 0 -
|
||||
Rule ATAQ 1972 only - Feb lastSun 2:00s 0 -
|
||||
Rule ATAQ 1973 1981 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1982 1983 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1984 1986 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1986 only - Oct Sun>=15 2:00s 1:00 -
|
||||
Rule ATAQ 1987 1990 - Mar Sun>=15 2:00s 0 -
|
||||
Rule ATAQ 1987 only - Oct Sun>=22 2:00s 1:00 -
|
||||
Rule ATAQ 1988 1990 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1991 1999 - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1991 2005 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2000 only - Aug lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 2001 max - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 2006 only - Apr Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 2007 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2008 max - Apr Sun>=1 2:00s 0 -
|
||||
|
||||
# Argentina - year-round bases
|
||||
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
|
||||
# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
|
||||
# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
|
||||
# Marambio, Seymour I, -6414-05637, since 1969-10-29
|
||||
# Orcadas, Laurie I, -6016-04444, since 1904-02-22
|
||||
# San Martin, Debenham I, -6807-06708, since 1951-03-21
|
||||
# (except 1960-03 / 1976-03-21)
|
||||
|
||||
# Australia - territories
|
||||
# Heard Island, McDonald Islands (uninhabited)
|
||||
# previously sealers and scientific personnel wintered
|
||||
# <a href="http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html">
|
||||
# Margaret Turner reports
|
||||
# </a> (1999-09-30) that they're UTC+5, with no DST;
|
||||
# presumably this is when they have visitors.
|
||||
#
|
||||
# year-round bases
|
||||
# Casey, Bailey Peninsula, -6617+11032, since 1969
|
||||
# Davis, Vestfold Hills, -6835+07759, since 1957-01-13
|
||||
# (except 1964-11 - 1969-02)
|
||||
# Mawson, Holme Bay, -6736+06253, since 1954-02-13
|
||||
|
||||
# From Steffen Thorsen (2009-03-11):
|
||||
# Three Australian stations in Antarctica have changed their time zone:
|
||||
# Casey moved from UTC+8 to UTC+11
|
||||
# Davis moved from UTC+7 to UTC+5
|
||||
# Mawson moved from UTC+6 to UTC+5
|
||||
# The changes occurred on 2009-10-18 at 02:00 (local times).
|
||||
#
|
||||
# Government source: (Australian Antarctic Division)
|
||||
# <a href="http://www.aad.gov.au/default.asp?casid=37079">
|
||||
# http://www.aad.gov.au/default.asp?casid=37079
|
||||
# </a>
|
||||
#
|
||||
# We have more background information here:
|
||||
# <a href="http://www.timeanddate.com/news/time/antarctica-new-times.html">
|
||||
# http://www.timeanddate.com/news/time/antarctica-new-times.html
|
||||
# </a>
|
||||
|
||||
# From Steffen Thorsen (2010-03-10):
|
||||
# We got these changes from the Australian Antarctic Division:
|
||||
# - Macquarie Island will stay on UTC+11 for winter and therefore not
|
||||
# switch back from daylight savings time when other parts of Australia do
|
||||
# on 4 April.
|
||||
#
|
||||
# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
|
||||
# The change to UTC+11 is being considered as a regular summer thing but
|
||||
# has not been decided yet.
|
||||
#
|
||||
# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
|
||||
# 20:00 UTC.
|
||||
#
|
||||
# - Mawson station stays on UTC+5.
|
||||
#
|
||||
# In addition to the Rule changes for Casey/Davis, it means that Macquarie
|
||||
# will no longer be like Hobart and will have to have its own Zone created.
|
||||
#
|
||||
# Background:
|
||||
# <a href="http://www.timeanddate.com/news/time/antartica-time-changes-2010.html">
|
||||
# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
|
||||
# </a>
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Casey 0 - zzz 1969
|
||||
8:00 - WST 2009 Oct 18 2:00
|
||||
# Western (Aus) Standard Time
|
||||
11:00 - CAST 2010 Mar 5 2:00
|
||||
# Casey Time
|
||||
8:00 - WST 2011 Oct 28 2:00
|
||||
11:00 - CAST 2012 Feb 21 17:00u
|
||||
8:00 - WST
|
||||
Zone Antarctica/Davis 0 - zzz 1957 Jan 13
|
||||
7:00 - DAVT 1964 Nov # Davis Time
|
||||
0 - zzz 1969 Feb
|
||||
7:00 - DAVT 2009 Oct 18 2:00
|
||||
5:00 - DAVT 2010 Mar 10 20:00u
|
||||
7:00 - DAVT 2011 Oct 28 2:00
|
||||
5:00 - DAVT 2012 Feb 21 20:00u
|
||||
7:00 - DAVT
|
||||
Zone Antarctica/Mawson 0 - zzz 1954 Feb 13
|
||||
6:00 - MAWT 2009 Oct 18 2:00
|
||||
# Mawson Time
|
||||
5:00 - MAWT
|
||||
Zone Antarctica/Macquarie 0 - zzz 1911
|
||||
10:00 - EST 1916 Oct 1 2:00
|
||||
10:00 1:00 EST 1917 Feb
|
||||
10:00 AusAQ EST 1967
|
||||
10:00 ATAQ EST 2010 Apr 4 3:00
|
||||
11:00 - MIST # Macquarie Island Time
|
||||
# References:
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html">
|
||||
# Casey Weather (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html">
|
||||
# Davis Station, Antarctica (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html">
|
||||
# Mawson Station, Antarctica (1998-02-25)
|
||||
# </a>
|
||||
|
||||
# Brazil - year-round base
|
||||
# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
|
||||
|
||||
# Chile - year-round bases and towns
|
||||
# Escudero, South Shetland Is, -621157-0585735, since 1994
|
||||
# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
|
||||
# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
|
||||
# Capitan Arturo Prat, -6230-05941
|
||||
# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
|
||||
# These locations have always used Santiago time; use TZ='America/Santiago'.
|
||||
|
||||
# China - year-round bases
|
||||
# Great Wall, King George Island, -6213-05858, since 1985-02-20
|
||||
# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
|
||||
|
||||
# France - year-round bases
|
||||
#
|
||||
# From Antoine Leca (1997-01-20):
|
||||
# Time data are from Nicole Pailleau at the IFRTP
|
||||
# (French Institute for Polar Research and Technology).
|
||||
# She confirms that French Southern Territories and Terre Adelie bases
|
||||
# don't observe daylight saving time, even if Terre Adelie supplies came
|
||||
# from Tasmania.
|
||||
#
|
||||
# French Southern Territories with year-round inhabitants
|
||||
#
|
||||
# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
|
||||
# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
|
||||
# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
|
||||
# whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
|
||||
#
|
||||
# St Paul Island - near Amsterdam, uninhabited
|
||||
# fishing stations operated variously 1819/1931
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Francais
|
||||
5:00 - TFT # ISO code TF Time
|
||||
#
|
||||
# year-round base in the main continent
|
||||
# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
|
||||
#
|
||||
# Another base at Port-Martin, 50km east, began operation in 1947.
|
||||
# It was destroyed by fire on 1952-01-14.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/DumontDUrville 0 - zzz 1947
|
||||
10:00 - PMT 1952 Jan 14 # Port-Martin Time
|
||||
0 - zzz 1956 Nov
|
||||
10:00 - DDUT # Dumont-d'Urville Time
|
||||
# Reference:
|
||||
# <a href="http://en.wikipedia.org/wiki/Dumont_d'Urville_Station">
|
||||
# Dumont d'Urville Station (2005-12-05)
|
||||
# </a>
|
||||
|
||||
# Germany - year-round base
|
||||
# Georg von Neumayer, -7039-00815
|
||||
|
||||
# India - year-round base
|
||||
# Dakshin Gangotri, -7005+01200
|
||||
|
||||
# Japan - year-round bases
|
||||
# Dome Fuji, -7719+03942
|
||||
# Syowa, -690022+0393524
|
||||
#
|
||||
# From Hideyuki Suzuki (1999-02-06):
|
||||
# In all Japanese stations, +0300 is used as the standard time.
|
||||
#
|
||||
# Syowa station, which is the first antarctic station of Japan,
|
||||
# was established on 1957-01-29. Since Syowa station is still the main
|
||||
# station of Japan, it's appropriate for the principal location.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
|
||||
3:00 - SYOT # Syowa Time
|
||||
# See:
|
||||
# <a href="http://www.nipr.ac.jp/english/ara01.html">
|
||||
# NIPR Antarctic Research Activities (1999-08-17)
|
||||
# </a>
|
||||
|
||||
# S Korea - year-round base
|
||||
# King Sejong, King George Island, -6213-05847, since 1988
|
||||
|
||||
# New Zealand - claims
|
||||
# Balleny Islands (never inhabited)
|
||||
# Scott Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
|
||||
#
|
||||
# These rules for New Zealand are stolen from the `australasia' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
|
||||
Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D
|
||||
Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D
|
||||
Rule NZAQ 1975 only - Feb 23 2:00s 0 S
|
||||
Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S
|
||||
Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S
|
||||
Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
|
||||
|
||||
# Norway - territories
|
||||
# Bouvet (never inhabited)
|
||||
#
|
||||
# claims
|
||||
# Peter I Island (never inhabited)
|
||||
|
||||
# Poland - year-round base
|
||||
# Arctowski, King George Island, -620945-0582745, since 1977
|
||||
|
||||
# Russia - year-round bases
|
||||
# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
|
||||
# Mirny, Davis coast, -6633+09301, since 1956-02
|
||||
# Molodezhnaya, Alasheyev Bay, -6740+04551,
|
||||
# year-round from 1962-02 to 1999-07-01
|
||||
# Novolazarevskaya, Queen Maud Land, -7046+01150,
|
||||
# year-round from 1960/61 to 1992
|
||||
|
||||
# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
|
||||
# <a href="http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP">
|
||||
# From Craig Mundell (1994-12-15)</a>:
|
||||
# Vostok, which is one of the Russian stations, is set on the same
|
||||
# time as Moscow, Russia.
|
||||
#
|
||||
# From Lee Hotz (2001-03-08):
|
||||
# I queried the folks at Columbia who spent the summer at Vostok and this is
|
||||
# what they had to say about time there:
|
||||
# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# time, which is 12 hours ahead of GMT. The Russian Station Vostok was
|
||||
# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
|
||||
# of GMT). This is a time zone I think two hours east of Moscow. The
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT.''
|
||||
#
|
||||
# From Paul Eggert (2001-05-04):
|
||||
# This seems to be hopelessly confusing, so I asked Lee Hotz about it
|
||||
# in person. He said that some Antartic locations set their local
|
||||
# time so that noon is the warmest part of the day, and that this
|
||||
# changes during the year and does not necessarily correspond to mean
|
||||
# solar noon. So the Vostok time might have been whatever the clocks
|
||||
# happened to be during their visit. So we still don't really know what time
|
||||
# it is at Vostok. But we'll guess UTC+6.
|
||||
#
|
||||
Zone Antarctica/Vostok 0 - zzz 1957 Dec 16
|
||||
6:00 - VOST # Vostok time
|
||||
|
||||
# S Africa - year-round bases
|
||||
# Marion Island, -4653+03752
|
||||
# Sanae, -7141-00250
|
||||
|
||||
# UK
|
||||
#
|
||||
# British Antarctic Territories (BAT) claims
|
||||
# South Orkney Islands
|
||||
# scientific station from 1903
|
||||
# whaling station at Signy I 1920/1926
|
||||
# South Shetland Islands
|
||||
#
|
||||
# year-round bases
|
||||
# Bird Island, South Georgia, -5400-03803, since 1983
|
||||
# Deception Island, -6259-06034, whaling station 1912/1931,
|
||||
# scientific station 1943/1967,
|
||||
# previously sealers and a scientific expedition wintered by accident,
|
||||
# and a garrison was deployed briefly
|
||||
# Halley, Coates Land, -7535-02604, since 1956-01-06
|
||||
# Halley is on a moving ice shelf and is periodically relocated
|
||||
# so that it is never more than 10km from its nominal location.
|
||||
# Rothera, Adelaide Island, -6734-6808, since 1976-12-01
|
||||
#
|
||||
# From Paul Eggert (2002-10-22)
|
||||
# <http://webexhibits.org/daylightsaving/g.html> says Rothera is -03 all year.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Rothera 0 - zzz 1976 Dec 1
|
||||
-3:00 - ROTT # Rothera time
|
||||
|
||||
# Uruguay - year round base
|
||||
# Artigas, King George Island, -621104-0585107
|
||||
|
||||
# USA - year-round bases
|
||||
#
|
||||
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
|
||||
#
|
||||
# From Ethan Dicks (1996-10-06):
|
||||
# It keeps the same time as Punta Arenas, Chile, because, just like us
|
||||
# and the South Pole, that's the other end of their supply line....
|
||||
# I verified with someone who was there that since 1980,
|
||||
# Palmer has followed Chile. Prior to that, before the Falklands War,
|
||||
# Palmer used to be supplied from Argentina.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Palmer 0 - zzz 1965
|
||||
-4:00 ArgAQ AR%sT 1969 Oct 5
|
||||
-3:00 ArgAQ AR%sT 1982 May
|
||||
-4:00 ChileAQ CL%sT
|
||||
#
|
||||
#
|
||||
# McMurdo, Ross Island, since 1955-12
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
12:00 NZAQ NZ%sT
|
||||
#
|
||||
# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Paul Eggert (1996-09-03):
|
||||
# Normally it wouldn't have a separate entry, since it's like the
|
||||
# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
|
||||
#
|
||||
# From Chris Carrier (1996-06-27):
|
||||
# Siple, the first commander of the South Pole station,
|
||||
# stated that he would have liked to have kept GMT at the station,
|
||||
# but that he found it more convenient to keep GMT+12
|
||||
# as supplies for the station were coming from McMurdo Sound,
|
||||
# which was on GMT+12 because New Zealand was on GMT+12 all year
|
||||
# at that time (1957). (Source: Siple's book 90 degrees SOUTH.)
|
||||
#
|
||||
# From Susan Smith
|
||||
# http://www.cybertours.com/whs/pole10.html
|
||||
# (1995-11-13 16:24:56 +1300, no longer available):
|
||||
# We use the same time as McMurdo does.
|
||||
# And they use the same time as Christchurch, NZ does....
|
||||
# One last quirk about South Pole time.
|
||||
# All the electric clocks are usually wrong.
|
||||
# Something about the generators running at 60.1hertz or something
|
||||
# makes all of the clocks run fast. So every couple of days,
|
||||
# we have to go around and set them back 5 minutes or so.
|
||||
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
|
||||
#
|
||||
Link Antarctica/McMurdo Antarctica/South_Pole
|
||||
Vendored
+2717
File diff suppressed because it is too large
Load Diff
Vendored
+1719
File diff suppressed because it is too large
Load Diff
Vendored
+117
@@ -0,0 +1,117 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# This file provides links between current names for time zones
|
||||
# and their old names. Many names changed in late 1993.
|
||||
|
||||
Link Africa/Asmara Africa/Asmera
|
||||
Link Africa/Bamako Africa/Timbuktu
|
||||
Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
|
||||
Link America/Adak America/Atka
|
||||
Link America/Argentina/Buenos_Aires America/Buenos_Aires
|
||||
Link America/Argentina/Catamarca America/Catamarca
|
||||
Link America/Atikokan America/Coral_Harbour
|
||||
Link America/Argentina/Cordoba America/Cordoba
|
||||
Link America/Tijuana America/Ensenada
|
||||
Link America/Indiana/Indianapolis America/Fort_Wayne
|
||||
Link America/Indiana/Indianapolis America/Indianapolis
|
||||
Link America/Argentina/Jujuy America/Jujuy
|
||||
Link America/Indiana/Knox America/Knox_IN
|
||||
Link America/Kentucky/Louisville America/Louisville
|
||||
Link America/Argentina/Mendoza America/Mendoza
|
||||
Link America/Rio_Branco America/Porto_Acre
|
||||
Link America/Argentina/Cordoba America/Rosario
|
||||
Link America/St_Thomas America/Virgin
|
||||
Link Asia/Ashgabat Asia/Ashkhabad
|
||||
Link Asia/Chongqing Asia/Chungking
|
||||
Link Asia/Dhaka Asia/Dacca
|
||||
Link Asia/Kathmandu Asia/Katmandu
|
||||
Link Asia/Kolkata Asia/Calcutta
|
||||
Link Asia/Macau Asia/Macao
|
||||
Link Asia/Jerusalem Asia/Tel_Aviv
|
||||
Link Asia/Ho_Chi_Minh Asia/Saigon
|
||||
Link Asia/Thimphu Asia/Thimbu
|
||||
Link Asia/Makassar Asia/Ujung_Pandang
|
||||
Link Asia/Ulaanbaatar Asia/Ulan_Bator
|
||||
Link Atlantic/Faroe Atlantic/Faeroe
|
||||
Link Europe/Oslo Atlantic/Jan_Mayen
|
||||
Link Australia/Sydney Australia/ACT
|
||||
Link Australia/Sydney Australia/Canberra
|
||||
Link Australia/Lord_Howe Australia/LHI
|
||||
Link Australia/Sydney Australia/NSW
|
||||
Link Australia/Darwin Australia/North
|
||||
Link Australia/Brisbane Australia/Queensland
|
||||
Link Australia/Adelaide Australia/South
|
||||
Link Australia/Hobart Australia/Tasmania
|
||||
Link Australia/Melbourne Australia/Victoria
|
||||
Link Australia/Perth Australia/West
|
||||
Link Australia/Broken_Hill Australia/Yancowinna
|
||||
Link America/Rio_Branco Brazil/Acre
|
||||
Link America/Noronha Brazil/DeNoronha
|
||||
Link America/Sao_Paulo Brazil/East
|
||||
Link America/Manaus Brazil/West
|
||||
Link America/Halifax Canada/Atlantic
|
||||
Link America/Winnipeg Canada/Central
|
||||
Link America/Regina Canada/East-Saskatchewan
|
||||
Link America/Toronto Canada/Eastern
|
||||
Link America/Edmonton Canada/Mountain
|
||||
Link America/St_Johns Canada/Newfoundland
|
||||
Link America/Vancouver Canada/Pacific
|
||||
Link America/Regina Canada/Saskatchewan
|
||||
Link America/Whitehorse Canada/Yukon
|
||||
Link America/Santiago Chile/Continental
|
||||
Link Pacific/Easter Chile/EasterIsland
|
||||
Link America/Havana Cuba
|
||||
Link Africa/Cairo Egypt
|
||||
Link Europe/Dublin Eire
|
||||
Link Europe/London Europe/Belfast
|
||||
Link Europe/Chisinau Europe/Tiraspol
|
||||
Link Europe/London GB
|
||||
Link Europe/London GB-Eire
|
||||
Link Etc/GMT GMT+0
|
||||
Link Etc/GMT GMT-0
|
||||
Link Etc/GMT GMT0
|
||||
Link Etc/GMT Greenwich
|
||||
Link Asia/Hong_Kong Hongkong
|
||||
Link Atlantic/Reykjavik Iceland
|
||||
Link Asia/Tehran Iran
|
||||
Link Asia/Jerusalem Israel
|
||||
Link America/Jamaica Jamaica
|
||||
Link Asia/Tokyo Japan
|
||||
Link Pacific/Kwajalein Kwajalein
|
||||
Link Africa/Tripoli Libya
|
||||
Link America/Tijuana Mexico/BajaNorte
|
||||
Link America/Mazatlan Mexico/BajaSur
|
||||
Link America/Mexico_City Mexico/General
|
||||
Link Pacific/Auckland NZ
|
||||
Link Pacific/Chatham NZ-CHAT
|
||||
Link America/Denver Navajo
|
||||
Link Asia/Shanghai PRC
|
||||
Link Pacific/Pago_Pago Pacific/Samoa
|
||||
Link Pacific/Chuuk Pacific/Yap
|
||||
Link Pacific/Chuuk Pacific/Truk
|
||||
Link Pacific/Pohnpei Pacific/Ponape
|
||||
Link Europe/Warsaw Poland
|
||||
Link Europe/Lisbon Portugal
|
||||
Link Asia/Taipei ROC
|
||||
Link Asia/Seoul ROK
|
||||
Link Asia/Singapore Singapore
|
||||
Link Europe/Istanbul Turkey
|
||||
Link Etc/UCT UCT
|
||||
Link America/Anchorage US/Alaska
|
||||
Link America/Adak US/Aleutian
|
||||
Link America/Phoenix US/Arizona
|
||||
Link America/Chicago US/Central
|
||||
Link America/Indiana/Indianapolis US/East-Indiana
|
||||
Link America/New_York US/Eastern
|
||||
Link Pacific/Honolulu US/Hawaii
|
||||
Link America/Indiana/Knox US/Indiana-Starke
|
||||
Link America/Detroit US/Michigan
|
||||
Link America/Denver US/Mountain
|
||||
Link America/Los_Angeles US/Pacific
|
||||
Link Pacific/Pago_Pago US/Samoa
|
||||
Link Etc/UTC UTC
|
||||
Link Etc/UTC Universal
|
||||
Link Europe/Moscow W-SU
|
||||
Link Etc/UTC Zulu
|
||||
Vendored
+81
@@ -0,0 +1,81 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# These entries are mostly present for historical reasons, so that
|
||||
# people in areas not otherwise covered by the tz files could "zic -l"
|
||||
# to a time zone that was right for their area. These days, the
|
||||
# tz files cover almost all the inhabited world, and the only practical
|
||||
# need now for the entries that are not on UTC are for ships at sea
|
||||
# that cannot use POSIX TZ settings.
|
||||
|
||||
Zone Etc/GMT 0 - GMT
|
||||
Zone Etc/UTC 0 - UTC
|
||||
Zone Etc/UCT 0 - UCT
|
||||
|
||||
# The following link uses older naming conventions,
|
||||
# but it belongs here, not in the file `backward',
|
||||
# as functions like gmtime load the "GMT" file to handle leap seconds properly.
|
||||
# We want this to work even on installations that omit the other older names.
|
||||
Link Etc/GMT GMT
|
||||
|
||||
Link Etc/UTC Etc/Universal
|
||||
Link Etc/UTC Etc/Zulu
|
||||
|
||||
Link Etc/GMT Etc/Greenwich
|
||||
Link Etc/GMT Etc/GMT-0
|
||||
Link Etc/GMT Etc/GMT+0
|
||||
Link Etc/GMT Etc/GMT0
|
||||
|
||||
# We use POSIX-style signs in the Zone names and the output abbreviations,
|
||||
# even though this is the opposite of what many people expect.
|
||||
# POSIX has positive signs west of Greenwich, but many people expect
|
||||
# positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
|
||||
# (i.e. west of Greenwich) even though many people would expect it to
|
||||
# mean 4 hours ahead of UTC (i.e. east of Greenwich).
|
||||
#
|
||||
# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
|
||||
# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
|
||||
# ISO 8601 you can use TZ='<-0400>+4'. Thus the commonly-expected
|
||||
# offset is kept within the angle bracket (and is used for display)
|
||||
# while the POSIX sign is kept outside the angle bracket (and is used
|
||||
# for calculation).
|
||||
#
|
||||
# Do not use a TZ setting like TZ='GMT+4', which is four hours behind
|
||||
# GMT but uses the completely misleading abbreviation "GMT".
|
||||
|
||||
# Earlier incarnations of this package were not POSIX-compliant,
|
||||
# and had lines such as
|
||||
# Zone GMT-12 -12 - GMT-1200
|
||||
# We did not want things to change quietly if someone accustomed to the old
|
||||
# way does a
|
||||
# zic -l GMT-12
|
||||
# so we moved the names into the Etc subdirectory.
|
||||
|
||||
Zone Etc/GMT-14 14 - GMT-14 # 14 hours ahead of GMT
|
||||
Zone Etc/GMT-13 13 - GMT-13
|
||||
Zone Etc/GMT-12 12 - GMT-12
|
||||
Zone Etc/GMT-11 11 - GMT-11
|
||||
Zone Etc/GMT-10 10 - GMT-10
|
||||
Zone Etc/GMT-9 9 - GMT-9
|
||||
Zone Etc/GMT-8 8 - GMT-8
|
||||
Zone Etc/GMT-7 7 - GMT-7
|
||||
Zone Etc/GMT-6 6 - GMT-6
|
||||
Zone Etc/GMT-5 5 - GMT-5
|
||||
Zone Etc/GMT-4 4 - GMT-4
|
||||
Zone Etc/GMT-3 3 - GMT-3
|
||||
Zone Etc/GMT-2 2 - GMT-2
|
||||
Zone Etc/GMT-1 1 - GMT-1
|
||||
Zone Etc/GMT+1 -1 - GMT+1
|
||||
Zone Etc/GMT+2 -2 - GMT+2
|
||||
Zone Etc/GMT+3 -3 - GMT+3
|
||||
Zone Etc/GMT+4 -4 - GMT+4
|
||||
Zone Etc/GMT+5 -5 - GMT+5
|
||||
Zone Etc/GMT+6 -6 - GMT+6
|
||||
Zone Etc/GMT+7 -7 - GMT+7
|
||||
Zone Etc/GMT+8 -8 - GMT+8
|
||||
Zone Etc/GMT+9 -9 - GMT+9
|
||||
Zone Etc/GMT+10 -10 - GMT+10
|
||||
Zone Etc/GMT+11 -11 - GMT+11
|
||||
Zone Etc/GMT+12 -12 - GMT+12
|
||||
Vendored
+2856
File diff suppressed because it is too large
Load Diff
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# For companies who don't want to put time zone specification in
|
||||
# their installation procedures. When users run date, they'll get the message.
|
||||
# Also useful for the "comp.sources" version.
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT
|
||||
Zone Factory 0 - "Local time zone must be set--see zic manual page"
|
||||
Vendored
+276
@@ -0,0 +1,276 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
# ISO 3166 alpha-2 country codes
|
||||
#
|
||||
# From Paul Eggert (2006-09-27):
|
||||
#
|
||||
# This file contains a table with the following columns:
|
||||
# 1. ISO 3166-1 alpha-2 country code, current as of
|
||||
# ISO 3166-1 Newsletter VI-1 (2007-09-21). See:
|
||||
# <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
|
||||
# ISO 3166 Maintenance agency (ISO 3166/MA)
|
||||
# </a>.
|
||||
# 2. The usual English name for the country,
|
||||
# chosen so that alphabetic sorting of subsets produces helpful lists.
|
||||
# This is not the same as the English name in the ISO 3166 tables.
|
||||
#
|
||||
# Columns are separated by a single tab.
|
||||
# The table is sorted by country code.
|
||||
#
|
||||
# Lines beginning with `#' are comments.
|
||||
#
|
||||
# From Arthur David Olson (2011-08-17):
|
||||
# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
|
||||
#
|
||||
#country-
|
||||
#code country name
|
||||
AD Andorra
|
||||
AE United Arab Emirates
|
||||
AF Afghanistan
|
||||
AG Antigua & Barbuda
|
||||
AI Anguilla
|
||||
AL Albania
|
||||
AM Armenia
|
||||
AO Angola
|
||||
AQ Antarctica
|
||||
AR Argentina
|
||||
AS Samoa (American)
|
||||
AT Austria
|
||||
AU Australia
|
||||
AW Aruba
|
||||
AX Aaland Islands
|
||||
AZ Azerbaijan
|
||||
BA Bosnia & Herzegovina
|
||||
BB Barbados
|
||||
BD Bangladesh
|
||||
BE Belgium
|
||||
BF Burkina Faso
|
||||
BG Bulgaria
|
||||
BH Bahrain
|
||||
BI Burundi
|
||||
BJ Benin
|
||||
BL St Barthelemy
|
||||
BM Bermuda
|
||||
BN Brunei
|
||||
BO Bolivia
|
||||
BQ Bonaire Sint Eustatius & Saba
|
||||
BR Brazil
|
||||
BS Bahamas
|
||||
BT Bhutan
|
||||
BV Bouvet Island
|
||||
BW Botswana
|
||||
BY Belarus
|
||||
BZ Belize
|
||||
CA Canada
|
||||
CC Cocos (Keeling) Islands
|
||||
CD Congo (Dem. Rep.)
|
||||
CF Central African Rep.
|
||||
CG Congo (Rep.)
|
||||
CH Switzerland
|
||||
CI Cote d'Ivoire
|
||||
CK Cook Islands
|
||||
CL Chile
|
||||
CM Cameroon
|
||||
CN China
|
||||
CO Colombia
|
||||
CR Costa Rica
|
||||
CU Cuba
|
||||
CV Cape Verde
|
||||
CW Curacao
|
||||
CX Christmas Island
|
||||
CY Cyprus
|
||||
CZ Czech Republic
|
||||
DE Germany
|
||||
DJ Djibouti
|
||||
DK Denmark
|
||||
DM Dominica
|
||||
DO Dominican Republic
|
||||
DZ Algeria
|
||||
EC Ecuador
|
||||
EE Estonia
|
||||
EG Egypt
|
||||
EH Western Sahara
|
||||
ER Eritrea
|
||||
ES Spain
|
||||
ET Ethiopia
|
||||
FI Finland
|
||||
FJ Fiji
|
||||
FK Falkland Islands
|
||||
FM Micronesia
|
||||
FO Faroe Islands
|
||||
FR France
|
||||
GA Gabon
|
||||
GB Britain (UK)
|
||||
GD Grenada
|
||||
GE Georgia
|
||||
GF French Guiana
|
||||
GG Guernsey
|
||||
GH Ghana
|
||||
GI Gibraltar
|
||||
GL Greenland
|
||||
GM Gambia
|
||||
GN Guinea
|
||||
GP Guadeloupe
|
||||
GQ Equatorial Guinea
|
||||
GR Greece
|
||||
GS South Georgia & the South Sandwich Islands
|
||||
GT Guatemala
|
||||
GU Guam
|
||||
GW Guinea-Bissau
|
||||
GY Guyana
|
||||
HK Hong Kong
|
||||
HM Heard Island & McDonald Islands
|
||||
HN Honduras
|
||||
HR Croatia
|
||||
HT Haiti
|
||||
HU Hungary
|
||||
ID Indonesia
|
||||
IE Ireland
|
||||
IL Israel
|
||||
IM Isle of Man
|
||||
IN India
|
||||
IO British Indian Ocean Territory
|
||||
IQ Iraq
|
||||
IR Iran
|
||||
IS Iceland
|
||||
IT Italy
|
||||
JE Jersey
|
||||
JM Jamaica
|
||||
JO Jordan
|
||||
JP Japan
|
||||
KE Kenya
|
||||
KG Kyrgyzstan
|
||||
KH Cambodia
|
||||
KI Kiribati
|
||||
KM Comoros
|
||||
KN St Kitts & Nevis
|
||||
KP Korea (North)
|
||||
KR Korea (South)
|
||||
KW Kuwait
|
||||
KY Cayman Islands
|
||||
KZ Kazakhstan
|
||||
LA Laos
|
||||
LB Lebanon
|
||||
LC St Lucia
|
||||
LI Liechtenstein
|
||||
LK Sri Lanka
|
||||
LR Liberia
|
||||
LS Lesotho
|
||||
LT Lithuania
|
||||
LU Luxembourg
|
||||
LV Latvia
|
||||
LY Libya
|
||||
MA Morocco
|
||||
MC Monaco
|
||||
MD Moldova
|
||||
ME Montenegro
|
||||
MF St Martin (French part)
|
||||
MG Madagascar
|
||||
MH Marshall Islands
|
||||
MK Macedonia
|
||||
ML Mali
|
||||
MM Myanmar (Burma)
|
||||
MN Mongolia
|
||||
MO Macau
|
||||
MP Northern Mariana Islands
|
||||
MQ Martinique
|
||||
MR Mauritania
|
||||
MS Montserrat
|
||||
MT Malta
|
||||
MU Mauritius
|
||||
MV Maldives
|
||||
MW Malawi
|
||||
MX Mexico
|
||||
MY Malaysia
|
||||
MZ Mozambique
|
||||
NA Namibia
|
||||
NC New Caledonia
|
||||
NE Niger
|
||||
NF Norfolk Island
|
||||
NG Nigeria
|
||||
NI Nicaragua
|
||||
NL Netherlands
|
||||
NO Norway
|
||||
NP Nepal
|
||||
NR Nauru
|
||||
NU Niue
|
||||
NZ New Zealand
|
||||
OM Oman
|
||||
PA Panama
|
||||
PE Peru
|
||||
PF French Polynesia
|
||||
PG Papua New Guinea
|
||||
PH Philippines
|
||||
PK Pakistan
|
||||
PL Poland
|
||||
PM St Pierre & Miquelon
|
||||
PN Pitcairn
|
||||
PR Puerto Rico
|
||||
PS Palestine
|
||||
PT Portugal
|
||||
PW Palau
|
||||
PY Paraguay
|
||||
QA Qatar
|
||||
RE Reunion
|
||||
RO Romania
|
||||
RS Serbia
|
||||
RU Russia
|
||||
RW Rwanda
|
||||
SA Saudi Arabia
|
||||
SB Solomon Islands
|
||||
SC Seychelles
|
||||
SD Sudan
|
||||
SE Sweden
|
||||
SG Singapore
|
||||
SH St Helena
|
||||
SI Slovenia
|
||||
SJ Svalbard & Jan Mayen
|
||||
SK Slovakia
|
||||
SL Sierra Leone
|
||||
SM San Marino
|
||||
SN Senegal
|
||||
SO Somalia
|
||||
SR Suriname
|
||||
SS South Sudan
|
||||
ST Sao Tome & Principe
|
||||
SV El Salvador
|
||||
SX Sint Maarten
|
||||
SY Syria
|
||||
SZ Swaziland
|
||||
TC Turks & Caicos Is
|
||||
TD Chad
|
||||
TF French Southern & Antarctic Lands
|
||||
TG Togo
|
||||
TH Thailand
|
||||
TJ Tajikistan
|
||||
TK Tokelau
|
||||
TL East Timor
|
||||
TM Turkmenistan
|
||||
TN Tunisia
|
||||
TO Tonga
|
||||
TR Turkey
|
||||
TT Trinidad & Tobago
|
||||
TV Tuvalu
|
||||
TW Taiwan
|
||||
TZ Tanzania
|
||||
UA Ukraine
|
||||
UG Uganda
|
||||
UM US minor outlying islands
|
||||
US United States
|
||||
UY Uruguay
|
||||
UZ Uzbekistan
|
||||
VA Vatican City
|
||||
VC St Vincent
|
||||
VE Venezuela
|
||||
VG Virgin Islands (UK)
|
||||
VI Virgin Islands (US)
|
||||
VN Vietnam
|
||||
VU Vanuatu
|
||||
WF Wallis & Futuna
|
||||
WS Samoa (western)
|
||||
YE Yemen
|
||||
YT Mayotte
|
||||
ZA South Africa
|
||||
ZM Zambia
|
||||
ZW Zimbabwe
|
||||
Vendored
+100
@@ -0,0 +1,100 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Allowance for leapseconds added to each timezone file.
|
||||
|
||||
# The International Earth Rotation Service periodically uses leap seconds
|
||||
# to keep UTC to within 0.9 s of UT1
|
||||
# (which measures the true angular orientation of the earth in space); see
|
||||
# Terry J Quinn, The BIPM and the accurate measure of time,
|
||||
# Proc IEEE 79, 7 (July 1991), 894-905.
|
||||
# There were no leap seconds before 1972, because the official mechanism
|
||||
# accounting for the discrepancy between atomic time and the earth's rotation
|
||||
# did not exist until the early 1970s.
|
||||
|
||||
# The correction (+ or -) is made at the given time, so lines
|
||||
# will typically look like:
|
||||
# Leap YEAR MON DAY 23:59:60 + R/S
|
||||
# or
|
||||
# Leap YEAR MON DAY 23:59:59 - R/S
|
||||
|
||||
# If the leapsecond is Rolling (R) the given time is local time
|
||||
# If the leapsecond is Stationary (S) the given time is UTC
|
||||
|
||||
# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
|
||||
Leap 1972 Jun 30 23:59:60 + S
|
||||
Leap 1972 Dec 31 23:59:60 + S
|
||||
Leap 1973 Dec 31 23:59:60 + S
|
||||
Leap 1974 Dec 31 23:59:60 + S
|
||||
Leap 1975 Dec 31 23:59:60 + S
|
||||
Leap 1976 Dec 31 23:59:60 + S
|
||||
Leap 1977 Dec 31 23:59:60 + S
|
||||
Leap 1978 Dec 31 23:59:60 + S
|
||||
Leap 1979 Dec 31 23:59:60 + S
|
||||
Leap 1981 Jun 30 23:59:60 + S
|
||||
Leap 1982 Jun 30 23:59:60 + S
|
||||
Leap 1983 Jun 30 23:59:60 + S
|
||||
Leap 1985 Jun 30 23:59:60 + S
|
||||
Leap 1987 Dec 31 23:59:60 + S
|
||||
Leap 1989 Dec 31 23:59:60 + S
|
||||
Leap 1990 Dec 31 23:59:60 + S
|
||||
Leap 1992 Jun 30 23:59:60 + S
|
||||
Leap 1993 Jun 30 23:59:60 + S
|
||||
Leap 1994 Jun 30 23:59:60 + S
|
||||
Leap 1995 Dec 31 23:59:60 + S
|
||||
Leap 1997 Jun 30 23:59:60 + S
|
||||
Leap 1998 Dec 31 23:59:60 + S
|
||||
Leap 2005 Dec 31 23:59:60 + S
|
||||
Leap 2008 Dec 31 23:59:60 + S
|
||||
Leap 2012 Jun 30 23:59:60 + S
|
||||
|
||||
# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
|
||||
#
|
||||
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
|
||||
#
|
||||
#
|
||||
# SERVICE DE LA ROTATION TERRESTRE
|
||||
# OBSERVATOIRE DE PARIS
|
||||
# 61, Av. de l'Observatoire 75014 PARIS (France)
|
||||
# Tel. : 33 (0) 1 40 51 22 26
|
||||
# FAX : 33 (0) 1 40 51 22 91
|
||||
# e-mail : (E-Mail Removed)
|
||||
# http://hpiers.obspm.fr/eop-pc
|
||||
#
|
||||
# Paris, 5 January 2012
|
||||
#
|
||||
#
|
||||
# Bulletin C 43
|
||||
#
|
||||
# To authorities responsible
|
||||
# for the measurement and
|
||||
# distribution of time
|
||||
#
|
||||
#
|
||||
# UTC TIME STEP
|
||||
# on the 1st of July 2012
|
||||
#
|
||||
#
|
||||
# A positive leap second will be introduced at the end of June 2012.
|
||||
# The sequence of dates of the UTC second markers will be:
|
||||
#
|
||||
# 2012 June 30, 23h 59m 59s
|
||||
# 2012 June 30, 23h 59m 60s
|
||||
# 2012 July 1, 0h 0m 0s
|
||||
#
|
||||
# The difference between UTC and the International Atomic Time TAI is:
|
||||
#
|
||||
# from 2009 January 1, 0h UTC, to 2012 July 1 0h UTC : UTC-TAI = - 34s
|
||||
# from 2012 July 1, 0h UTC, until further notice : UTC-TAI = - 35s
|
||||
#
|
||||
# Leap seconds can be introduced in UTC at the end of the months of December
|
||||
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
|
||||
# six months, either to announce a time step in UTC or to confirm that there
|
||||
# will be no time step at the next possible date.
|
||||
#
|
||||
#
|
||||
# Daniel GAMBIS
|
||||
# Head
|
||||
# Earth Orientation Center of IERS
|
||||
# Observatoire de Paris, France
|
||||
Vendored
+3235
File diff suppressed because it is too large
Load Diff
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# From Arthur David Olson (1989-04-05):
|
||||
# On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill
|
||||
# establishing "Pacific Presidential Election Time"; it was not acted on
|
||||
# by the Senate or signed into law by the President.
|
||||
# You might want to change the "PE" (Presidential Election) below to
|
||||
# "Q" (Quadrennial) to maintain three-character zone abbreviations.
|
||||
# If you're really conservative, you might want to change it to "D".
|
||||
# Avoid "L" (Leap Year), which won't be true in 2100.
|
||||
|
||||
# If Presidential Election Time is ever established, replace "XXXX" below
|
||||
# with the year the law takes effect and uncomment the "##" lines.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
## Rule Twilite XXXX max - Apr Sun>=1 2:00 1:00 D
|
||||
## Rule Twilite XXXX max uspres Oct lastSun 2:00 1:00 PE
|
||||
## Rule Twilite XXXX max uspres Nov Sun>=7 2:00 0 S
|
||||
## Rule Twilite XXXX max nonpres Oct lastSun 2:00 0 S
|
||||
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
## Zone America/Los_Angeles-PET -8:00 US P%sT XXXX
|
||||
## -8:00 Twilite P%sT
|
||||
|
||||
# For now...
|
||||
Link America/Los_Angeles US/Pacific-New ##
|
||||
Vendored
+390
@@ -0,0 +1,390 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# So much for footnotes about Saudi Arabia.
|
||||
# Apparent noon times below are for Riyadh; your mileage will vary.
|
||||
# Times were computed using formulas in the U.S. Naval Observatory's
|
||||
# Almanac for Computers 1987; the formulas "will give EqT to an accuracy of
|
||||
# [plus or minus two] seconds during the current year."
|
||||
#
|
||||
# Rounding to the nearest five seconds results in fewer than
|
||||
# 256 different "time types"--a limit that's faced because time types are
|
||||
# stored on disk as unsigned chars.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule sol87 1987 only - Jan 1 12:03:20s -0:03:20 -
|
||||
Rule sol87 1987 only - Jan 2 12:03:50s -0:03:50 -
|
||||
Rule sol87 1987 only - Jan 3 12:04:15s -0:04:15 -
|
||||
Rule sol87 1987 only - Jan 4 12:04:45s -0:04:45 -
|
||||
Rule sol87 1987 only - Jan 5 12:05:10s -0:05:10 -
|
||||
Rule sol87 1987 only - Jan 6 12:05:40s -0:05:40 -
|
||||
Rule sol87 1987 only - Jan 7 12:06:05s -0:06:05 -
|
||||
Rule sol87 1987 only - Jan 8 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Jan 9 12:06:55s -0:06:55 -
|
||||
Rule sol87 1987 only - Jan 10 12:07:20s -0:07:20 -
|
||||
Rule sol87 1987 only - Jan 11 12:07:45s -0:07:45 -
|
||||
Rule sol87 1987 only - Jan 12 12:08:10s -0:08:10 -
|
||||
Rule sol87 1987 only - Jan 13 12:08:30s -0:08:30 -
|
||||
Rule sol87 1987 only - Jan 14 12:08:55s -0:08:55 -
|
||||
Rule sol87 1987 only - Jan 15 12:09:15s -0:09:15 -
|
||||
Rule sol87 1987 only - Jan 16 12:09:35s -0:09:35 -
|
||||
Rule sol87 1987 only - Jan 17 12:09:55s -0:09:55 -
|
||||
Rule sol87 1987 only - Jan 18 12:10:15s -0:10:15 -
|
||||
Rule sol87 1987 only - Jan 19 12:10:35s -0:10:35 -
|
||||
Rule sol87 1987 only - Jan 20 12:10:55s -0:10:55 -
|
||||
Rule sol87 1987 only - Jan 21 12:11:10s -0:11:10 -
|
||||
Rule sol87 1987 only - Jan 22 12:11:30s -0:11:30 -
|
||||
Rule sol87 1987 only - Jan 23 12:11:45s -0:11:45 -
|
||||
Rule sol87 1987 only - Jan 24 12:12:00s -0:12:00 -
|
||||
Rule sol87 1987 only - Jan 25 12:12:15s -0:12:15 -
|
||||
Rule sol87 1987 only - Jan 26 12:12:30s -0:12:30 -
|
||||
Rule sol87 1987 only - Jan 27 12:12:40s -0:12:40 -
|
||||
Rule sol87 1987 only - Jan 28 12:12:55s -0:12:55 -
|
||||
Rule sol87 1987 only - Jan 29 12:13:05s -0:13:05 -
|
||||
Rule sol87 1987 only - Jan 30 12:13:15s -0:13:15 -
|
||||
Rule sol87 1987 only - Jan 31 12:13:25s -0:13:25 -
|
||||
Rule sol87 1987 only - Feb 1 12:13:35s -0:13:35 -
|
||||
Rule sol87 1987 only - Feb 2 12:13:40s -0:13:40 -
|
||||
Rule sol87 1987 only - Feb 3 12:13:50s -0:13:50 -
|
||||
Rule sol87 1987 only - Feb 4 12:13:55s -0:13:55 -
|
||||
Rule sol87 1987 only - Feb 5 12:14:00s -0:14:00 -
|
||||
Rule sol87 1987 only - Feb 6 12:14:05s -0:14:05 -
|
||||
Rule sol87 1987 only - Feb 7 12:14:10s -0:14:10 -
|
||||
Rule sol87 1987 only - Feb 8 12:14:10s -0:14:10 -
|
||||
Rule sol87 1987 only - Feb 9 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 10 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 11 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 12 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 13 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 14 12:14:15s -0:14:15 -
|
||||
Rule sol87 1987 only - Feb 15 12:14:10s -0:14:10 -
|
||||
Rule sol87 1987 only - Feb 16 12:14:10s -0:14:10 -
|
||||
Rule sol87 1987 only - Feb 17 12:14:05s -0:14:05 -
|
||||
Rule sol87 1987 only - Feb 18 12:14:00s -0:14:00 -
|
||||
Rule sol87 1987 only - Feb 19 12:13:55s -0:13:55 -
|
||||
Rule sol87 1987 only - Feb 20 12:13:50s -0:13:50 -
|
||||
Rule sol87 1987 only - Feb 21 12:13:45s -0:13:45 -
|
||||
Rule sol87 1987 only - Feb 22 12:13:35s -0:13:35 -
|
||||
Rule sol87 1987 only - Feb 23 12:13:30s -0:13:30 -
|
||||
Rule sol87 1987 only - Feb 24 12:13:20s -0:13:20 -
|
||||
Rule sol87 1987 only - Feb 25 12:13:10s -0:13:10 -
|
||||
Rule sol87 1987 only - Feb 26 12:13:00s -0:13:00 -
|
||||
Rule sol87 1987 only - Feb 27 12:12:50s -0:12:50 -
|
||||
Rule sol87 1987 only - Feb 28 12:12:40s -0:12:40 -
|
||||
Rule sol87 1987 only - Mar 1 12:12:30s -0:12:30 -
|
||||
Rule sol87 1987 only - Mar 2 12:12:20s -0:12:20 -
|
||||
Rule sol87 1987 only - Mar 3 12:12:05s -0:12:05 -
|
||||
Rule sol87 1987 only - Mar 4 12:11:55s -0:11:55 -
|
||||
Rule sol87 1987 only - Mar 5 12:11:40s -0:11:40 -
|
||||
Rule sol87 1987 only - Mar 6 12:11:25s -0:11:25 -
|
||||
Rule sol87 1987 only - Mar 7 12:11:15s -0:11:15 -
|
||||
Rule sol87 1987 only - Mar 8 12:11:00s -0:11:00 -
|
||||
Rule sol87 1987 only - Mar 9 12:10:45s -0:10:45 -
|
||||
Rule sol87 1987 only - Mar 10 12:10:30s -0:10:30 -
|
||||
Rule sol87 1987 only - Mar 11 12:10:15s -0:10:15 -
|
||||
Rule sol87 1987 only - Mar 12 12:09:55s -0:09:55 -
|
||||
Rule sol87 1987 only - Mar 13 12:09:40s -0:09:40 -
|
||||
Rule sol87 1987 only - Mar 14 12:09:25s -0:09:25 -
|
||||
Rule sol87 1987 only - Mar 15 12:09:10s -0:09:10 -
|
||||
Rule sol87 1987 only - Mar 16 12:08:50s -0:08:50 -
|
||||
Rule sol87 1987 only - Mar 17 12:08:35s -0:08:35 -
|
||||
Rule sol87 1987 only - Mar 18 12:08:15s -0:08:15 -
|
||||
Rule sol87 1987 only - Mar 19 12:08:00s -0:08:00 -
|
||||
Rule sol87 1987 only - Mar 20 12:07:40s -0:07:40 -
|
||||
Rule sol87 1987 only - Mar 21 12:07:25s -0:07:25 -
|
||||
Rule sol87 1987 only - Mar 22 12:07:05s -0:07:05 -
|
||||
Rule sol87 1987 only - Mar 23 12:06:50s -0:06:50 -
|
||||
Rule sol87 1987 only - Mar 24 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Mar 25 12:06:10s -0:06:10 -
|
||||
Rule sol87 1987 only - Mar 26 12:05:55s -0:05:55 -
|
||||
Rule sol87 1987 only - Mar 27 12:05:35s -0:05:35 -
|
||||
Rule sol87 1987 only - Mar 28 12:05:15s -0:05:15 -
|
||||
Rule sol87 1987 only - Mar 29 12:05:00s -0:05:00 -
|
||||
Rule sol87 1987 only - Mar 30 12:04:40s -0:04:40 -
|
||||
Rule sol87 1987 only - Mar 31 12:04:25s -0:04:25 -
|
||||
Rule sol87 1987 only - Apr 1 12:04:05s -0:04:05 -
|
||||
Rule sol87 1987 only - Apr 2 12:03:45s -0:03:45 -
|
||||
Rule sol87 1987 only - Apr 3 12:03:30s -0:03:30 -
|
||||
Rule sol87 1987 only - Apr 4 12:03:10s -0:03:10 -
|
||||
Rule sol87 1987 only - Apr 5 12:02:55s -0:02:55 -
|
||||
Rule sol87 1987 only - Apr 6 12:02:35s -0:02:35 -
|
||||
Rule sol87 1987 only - Apr 7 12:02:20s -0:02:20 -
|
||||
Rule sol87 1987 only - Apr 8 12:02:05s -0:02:05 -
|
||||
Rule sol87 1987 only - Apr 9 12:01:45s -0:01:45 -
|
||||
Rule sol87 1987 only - Apr 10 12:01:30s -0:01:30 -
|
||||
Rule sol87 1987 only - Apr 11 12:01:15s -0:01:15 -
|
||||
Rule sol87 1987 only - Apr 12 12:00:55s -0:00:55 -
|
||||
Rule sol87 1987 only - Apr 13 12:00:40s -0:00:40 -
|
||||
Rule sol87 1987 only - Apr 14 12:00:25s -0:00:25 -
|
||||
Rule sol87 1987 only - Apr 15 12:00:10s -0:00:10 -
|
||||
Rule sol87 1987 only - Apr 16 11:59:55s 0:00:05 -
|
||||
Rule sol87 1987 only - Apr 17 11:59:45s 0:00:15 -
|
||||
Rule sol87 1987 only - Apr 18 11:59:30s 0:00:30 -
|
||||
Rule sol87 1987 only - Apr 19 11:59:15s 0:00:45 -
|
||||
Rule sol87 1987 only - Apr 20 11:59:05s 0:00:55 -
|
||||
Rule sol87 1987 only - Apr 21 11:58:50s 0:01:10 -
|
||||
Rule sol87 1987 only - Apr 22 11:58:40s 0:01:20 -
|
||||
Rule sol87 1987 only - Apr 23 11:58:25s 0:01:35 -
|
||||
Rule sol87 1987 only - Apr 24 11:58:15s 0:01:45 -
|
||||
Rule sol87 1987 only - Apr 25 11:58:05s 0:01:55 -
|
||||
Rule sol87 1987 only - Apr 26 11:57:55s 0:02:05 -
|
||||
Rule sol87 1987 only - Apr 27 11:57:45s 0:02:15 -
|
||||
Rule sol87 1987 only - Apr 28 11:57:35s 0:02:25 -
|
||||
Rule sol87 1987 only - Apr 29 11:57:25s 0:02:35 -
|
||||
Rule sol87 1987 only - Apr 30 11:57:15s 0:02:45 -
|
||||
Rule sol87 1987 only - May 1 11:57:10s 0:02:50 -
|
||||
Rule sol87 1987 only - May 2 11:57:00s 0:03:00 -
|
||||
Rule sol87 1987 only - May 3 11:56:55s 0:03:05 -
|
||||
Rule sol87 1987 only - May 4 11:56:50s 0:03:10 -
|
||||
Rule sol87 1987 only - May 5 11:56:45s 0:03:15 -
|
||||
Rule sol87 1987 only - May 6 11:56:40s 0:03:20 -
|
||||
Rule sol87 1987 only - May 7 11:56:35s 0:03:25 -
|
||||
Rule sol87 1987 only - May 8 11:56:30s 0:03:30 -
|
||||
Rule sol87 1987 only - May 9 11:56:25s 0:03:35 -
|
||||
Rule sol87 1987 only - May 10 11:56:25s 0:03:35 -
|
||||
Rule sol87 1987 only - May 11 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 12 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 13 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 14 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 15 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 16 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 17 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 18 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - May 19 11:56:25s 0:03:35 -
|
||||
Rule sol87 1987 only - May 20 11:56:25s 0:03:35 -
|
||||
Rule sol87 1987 only - May 21 11:56:30s 0:03:30 -
|
||||
Rule sol87 1987 only - May 22 11:56:35s 0:03:25 -
|
||||
Rule sol87 1987 only - May 23 11:56:40s 0:03:20 -
|
||||
Rule sol87 1987 only - May 24 11:56:45s 0:03:15 -
|
||||
Rule sol87 1987 only - May 25 11:56:50s 0:03:10 -
|
||||
Rule sol87 1987 only - May 26 11:56:55s 0:03:05 -
|
||||
Rule sol87 1987 only - May 27 11:57:00s 0:03:00 -
|
||||
Rule sol87 1987 only - May 28 11:57:10s 0:02:50 -
|
||||
Rule sol87 1987 only - May 29 11:57:15s 0:02:45 -
|
||||
Rule sol87 1987 only - May 30 11:57:25s 0:02:35 -
|
||||
Rule sol87 1987 only - May 31 11:57:30s 0:02:30 -
|
||||
Rule sol87 1987 only - Jun 1 11:57:40s 0:02:20 -
|
||||
Rule sol87 1987 only - Jun 2 11:57:50s 0:02:10 -
|
||||
Rule sol87 1987 only - Jun 3 11:58:00s 0:02:00 -
|
||||
Rule sol87 1987 only - Jun 4 11:58:10s 0:01:50 -
|
||||
Rule sol87 1987 only - Jun 5 11:58:20s 0:01:40 -
|
||||
Rule sol87 1987 only - Jun 6 11:58:30s 0:01:30 -
|
||||
Rule sol87 1987 only - Jun 7 11:58:40s 0:01:20 -
|
||||
Rule sol87 1987 only - Jun 8 11:58:50s 0:01:10 -
|
||||
Rule sol87 1987 only - Jun 9 11:59:05s 0:00:55 -
|
||||
Rule sol87 1987 only - Jun 10 11:59:15s 0:00:45 -
|
||||
Rule sol87 1987 only - Jun 11 11:59:30s 0:00:30 -
|
||||
Rule sol87 1987 only - Jun 12 11:59:40s 0:00:20 -
|
||||
Rule sol87 1987 only - Jun 13 11:59:50s 0:00:10 -
|
||||
Rule sol87 1987 only - Jun 14 12:00:05s -0:00:05 -
|
||||
Rule sol87 1987 only - Jun 15 12:00:15s -0:00:15 -
|
||||
Rule sol87 1987 only - Jun 16 12:00:30s -0:00:30 -
|
||||
Rule sol87 1987 only - Jun 17 12:00:45s -0:00:45 -
|
||||
Rule sol87 1987 only - Jun 18 12:00:55s -0:00:55 -
|
||||
Rule sol87 1987 only - Jun 19 12:01:10s -0:01:10 -
|
||||
Rule sol87 1987 only - Jun 20 12:01:20s -0:01:20 -
|
||||
Rule sol87 1987 only - Jun 21 12:01:35s -0:01:35 -
|
||||
Rule sol87 1987 only - Jun 22 12:01:50s -0:01:50 -
|
||||
Rule sol87 1987 only - Jun 23 12:02:00s -0:02:00 -
|
||||
Rule sol87 1987 only - Jun 24 12:02:15s -0:02:15 -
|
||||
Rule sol87 1987 only - Jun 25 12:02:25s -0:02:25 -
|
||||
Rule sol87 1987 only - Jun 26 12:02:40s -0:02:40 -
|
||||
Rule sol87 1987 only - Jun 27 12:02:50s -0:02:50 -
|
||||
Rule sol87 1987 only - Jun 28 12:03:05s -0:03:05 -
|
||||
Rule sol87 1987 only - Jun 29 12:03:15s -0:03:15 -
|
||||
Rule sol87 1987 only - Jun 30 12:03:30s -0:03:30 -
|
||||
Rule sol87 1987 only - Jul 1 12:03:40s -0:03:40 -
|
||||
Rule sol87 1987 only - Jul 2 12:03:50s -0:03:50 -
|
||||
Rule sol87 1987 only - Jul 3 12:04:05s -0:04:05 -
|
||||
Rule sol87 1987 only - Jul 4 12:04:15s -0:04:15 -
|
||||
Rule sol87 1987 only - Jul 5 12:04:25s -0:04:25 -
|
||||
Rule sol87 1987 only - Jul 6 12:04:35s -0:04:35 -
|
||||
Rule sol87 1987 only - Jul 7 12:04:45s -0:04:45 -
|
||||
Rule sol87 1987 only - Jul 8 12:04:55s -0:04:55 -
|
||||
Rule sol87 1987 only - Jul 9 12:05:05s -0:05:05 -
|
||||
Rule sol87 1987 only - Jul 10 12:05:15s -0:05:15 -
|
||||
Rule sol87 1987 only - Jul 11 12:05:20s -0:05:20 -
|
||||
Rule sol87 1987 only - Jul 12 12:05:30s -0:05:30 -
|
||||
Rule sol87 1987 only - Jul 13 12:05:40s -0:05:40 -
|
||||
Rule sol87 1987 only - Jul 14 12:05:45s -0:05:45 -
|
||||
Rule sol87 1987 only - Jul 15 12:05:50s -0:05:50 -
|
||||
Rule sol87 1987 only - Jul 16 12:06:00s -0:06:00 -
|
||||
Rule sol87 1987 only - Jul 17 12:06:05s -0:06:05 -
|
||||
Rule sol87 1987 only - Jul 18 12:06:10s -0:06:10 -
|
||||
Rule sol87 1987 only - Jul 19 12:06:15s -0:06:15 -
|
||||
Rule sol87 1987 only - Jul 20 12:06:15s -0:06:15 -
|
||||
Rule sol87 1987 only - Jul 21 12:06:20s -0:06:20 -
|
||||
Rule sol87 1987 only - Jul 22 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Jul 23 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Jul 24 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Jul 25 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Jul 26 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Jul 27 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Jul 28 12:06:30s -0:06:30 -
|
||||
Rule sol87 1987 only - Jul 29 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Jul 30 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Jul 31 12:06:25s -0:06:25 -
|
||||
Rule sol87 1987 only - Aug 1 12:06:20s -0:06:20 -
|
||||
Rule sol87 1987 only - Aug 2 12:06:15s -0:06:15 -
|
||||
Rule sol87 1987 only - Aug 3 12:06:10s -0:06:10 -
|
||||
Rule sol87 1987 only - Aug 4 12:06:05s -0:06:05 -
|
||||
Rule sol87 1987 only - Aug 5 12:06:00s -0:06:00 -
|
||||
Rule sol87 1987 only - Aug 6 12:05:55s -0:05:55 -
|
||||
Rule sol87 1987 only - Aug 7 12:05:50s -0:05:50 -
|
||||
Rule sol87 1987 only - Aug 8 12:05:40s -0:05:40 -
|
||||
Rule sol87 1987 only - Aug 9 12:05:35s -0:05:35 -
|
||||
Rule sol87 1987 only - Aug 10 12:05:25s -0:05:25 -
|
||||
Rule sol87 1987 only - Aug 11 12:05:15s -0:05:15 -
|
||||
Rule sol87 1987 only - Aug 12 12:05:05s -0:05:05 -
|
||||
Rule sol87 1987 only - Aug 13 12:04:55s -0:04:55 -
|
||||
Rule sol87 1987 only - Aug 14 12:04:45s -0:04:45 -
|
||||
Rule sol87 1987 only - Aug 15 12:04:35s -0:04:35 -
|
||||
Rule sol87 1987 only - Aug 16 12:04:25s -0:04:25 -
|
||||
Rule sol87 1987 only - Aug 17 12:04:10s -0:04:10 -
|
||||
Rule sol87 1987 only - Aug 18 12:04:00s -0:04:00 -
|
||||
Rule sol87 1987 only - Aug 19 12:03:45s -0:03:45 -
|
||||
Rule sol87 1987 only - Aug 20 12:03:30s -0:03:30 -
|
||||
Rule sol87 1987 only - Aug 21 12:03:15s -0:03:15 -
|
||||
Rule sol87 1987 only - Aug 22 12:03:00s -0:03:00 -
|
||||
Rule sol87 1987 only - Aug 23 12:02:45s -0:02:45 -
|
||||
Rule sol87 1987 only - Aug 24 12:02:30s -0:02:30 -
|
||||
Rule sol87 1987 only - Aug 25 12:02:15s -0:02:15 -
|
||||
Rule sol87 1987 only - Aug 26 12:02:00s -0:02:00 -
|
||||
Rule sol87 1987 only - Aug 27 12:01:40s -0:01:40 -
|
||||
Rule sol87 1987 only - Aug 28 12:01:25s -0:01:25 -
|
||||
Rule sol87 1987 only - Aug 29 12:01:05s -0:01:05 -
|
||||
Rule sol87 1987 only - Aug 30 12:00:50s -0:00:50 -
|
||||
Rule sol87 1987 only - Aug 31 12:00:30s -0:00:30 -
|
||||
Rule sol87 1987 only - Sep 1 12:00:10s -0:00:10 -
|
||||
Rule sol87 1987 only - Sep 2 11:59:50s 0:00:10 -
|
||||
Rule sol87 1987 only - Sep 3 11:59:35s 0:00:25 -
|
||||
Rule sol87 1987 only - Sep 4 11:59:15s 0:00:45 -
|
||||
Rule sol87 1987 only - Sep 5 11:58:55s 0:01:05 -
|
||||
Rule sol87 1987 only - Sep 6 11:58:35s 0:01:25 -
|
||||
Rule sol87 1987 only - Sep 7 11:58:15s 0:01:45 -
|
||||
Rule sol87 1987 only - Sep 8 11:57:55s 0:02:05 -
|
||||
Rule sol87 1987 only - Sep 9 11:57:30s 0:02:30 -
|
||||
Rule sol87 1987 only - Sep 10 11:57:10s 0:02:50 -
|
||||
Rule sol87 1987 only - Sep 11 11:56:50s 0:03:10 -
|
||||
Rule sol87 1987 only - Sep 12 11:56:30s 0:03:30 -
|
||||
Rule sol87 1987 only - Sep 13 11:56:10s 0:03:50 -
|
||||
Rule sol87 1987 only - Sep 14 11:55:45s 0:04:15 -
|
||||
Rule sol87 1987 only - Sep 15 11:55:25s 0:04:35 -
|
||||
Rule sol87 1987 only - Sep 16 11:55:05s 0:04:55 -
|
||||
Rule sol87 1987 only - Sep 17 11:54:45s 0:05:15 -
|
||||
Rule sol87 1987 only - Sep 18 11:54:20s 0:05:40 -
|
||||
Rule sol87 1987 only - Sep 19 11:54:00s 0:06:00 -
|
||||
Rule sol87 1987 only - Sep 20 11:53:40s 0:06:20 -
|
||||
Rule sol87 1987 only - Sep 21 11:53:15s 0:06:45 -
|
||||
Rule sol87 1987 only - Sep 22 11:52:55s 0:07:05 -
|
||||
Rule sol87 1987 only - Sep 23 11:52:35s 0:07:25 -
|
||||
Rule sol87 1987 only - Sep 24 11:52:15s 0:07:45 -
|
||||
Rule sol87 1987 only - Sep 25 11:51:55s 0:08:05 -
|
||||
Rule sol87 1987 only - Sep 26 11:51:35s 0:08:25 -
|
||||
Rule sol87 1987 only - Sep 27 11:51:10s 0:08:50 -
|
||||
Rule sol87 1987 only - Sep 28 11:50:50s 0:09:10 -
|
||||
Rule sol87 1987 only - Sep 29 11:50:30s 0:09:30 -
|
||||
Rule sol87 1987 only - Sep 30 11:50:10s 0:09:50 -
|
||||
Rule sol87 1987 only - Oct 1 11:49:50s 0:10:10 -
|
||||
Rule sol87 1987 only - Oct 2 11:49:35s 0:10:25 -
|
||||
Rule sol87 1987 only - Oct 3 11:49:15s 0:10:45 -
|
||||
Rule sol87 1987 only - Oct 4 11:48:55s 0:11:05 -
|
||||
Rule sol87 1987 only - Oct 5 11:48:35s 0:11:25 -
|
||||
Rule sol87 1987 only - Oct 6 11:48:20s 0:11:40 -
|
||||
Rule sol87 1987 only - Oct 7 11:48:00s 0:12:00 -
|
||||
Rule sol87 1987 only - Oct 8 11:47:45s 0:12:15 -
|
||||
Rule sol87 1987 only - Oct 9 11:47:25s 0:12:35 -
|
||||
Rule sol87 1987 only - Oct 10 11:47:10s 0:12:50 -
|
||||
Rule sol87 1987 only - Oct 11 11:46:55s 0:13:05 -
|
||||
Rule sol87 1987 only - Oct 12 11:46:40s 0:13:20 -
|
||||
Rule sol87 1987 only - Oct 13 11:46:25s 0:13:35 -
|
||||
Rule sol87 1987 only - Oct 14 11:46:10s 0:13:50 -
|
||||
Rule sol87 1987 only - Oct 15 11:45:55s 0:14:05 -
|
||||
Rule sol87 1987 only - Oct 16 11:45:45s 0:14:15 -
|
||||
Rule sol87 1987 only - Oct 17 11:45:30s 0:14:30 -
|
||||
Rule sol87 1987 only - Oct 18 11:45:20s 0:14:40 -
|
||||
Rule sol87 1987 only - Oct 19 11:45:05s 0:14:55 -
|
||||
Rule sol87 1987 only - Oct 20 11:44:55s 0:15:05 -
|
||||
Rule sol87 1987 only - Oct 21 11:44:45s 0:15:15 -
|
||||
Rule sol87 1987 only - Oct 22 11:44:35s 0:15:25 -
|
||||
Rule sol87 1987 only - Oct 23 11:44:25s 0:15:35 -
|
||||
Rule sol87 1987 only - Oct 24 11:44:20s 0:15:40 -
|
||||
Rule sol87 1987 only - Oct 25 11:44:10s 0:15:50 -
|
||||
Rule sol87 1987 only - Oct 26 11:44:05s 0:15:55 -
|
||||
Rule sol87 1987 only - Oct 27 11:43:55s 0:16:05 -
|
||||
Rule sol87 1987 only - Oct 28 11:43:50s 0:16:10 -
|
||||
Rule sol87 1987 only - Oct 29 11:43:45s 0:16:15 -
|
||||
Rule sol87 1987 only - Oct 30 11:43:45s 0:16:15 -
|
||||
Rule sol87 1987 only - Oct 31 11:43:40s 0:16:20 -
|
||||
Rule sol87 1987 only - Nov 1 11:43:40s 0:16:20 -
|
||||
Rule sol87 1987 only - Nov 2 11:43:35s 0:16:25 -
|
||||
Rule sol87 1987 only - Nov 3 11:43:35s 0:16:25 -
|
||||
Rule sol87 1987 only - Nov 4 11:43:35s 0:16:25 -
|
||||
Rule sol87 1987 only - Nov 5 11:43:35s 0:16:25 -
|
||||
Rule sol87 1987 only - Nov 6 11:43:40s 0:16:20 -
|
||||
Rule sol87 1987 only - Nov 7 11:43:40s 0:16:20 -
|
||||
Rule sol87 1987 only - Nov 8 11:43:45s 0:16:15 -
|
||||
Rule sol87 1987 only - Nov 9 11:43:50s 0:16:10 -
|
||||
Rule sol87 1987 only - Nov 10 11:43:55s 0:16:05 -
|
||||
Rule sol87 1987 only - Nov 11 11:44:00s 0:16:00 -
|
||||
Rule sol87 1987 only - Nov 12 11:44:05s 0:15:55 -
|
||||
Rule sol87 1987 only - Nov 13 11:44:15s 0:15:45 -
|
||||
Rule sol87 1987 only - Nov 14 11:44:20s 0:15:40 -
|
||||
Rule sol87 1987 only - Nov 15 11:44:30s 0:15:30 -
|
||||
Rule sol87 1987 only - Nov 16 11:44:40s 0:15:20 -
|
||||
Rule sol87 1987 only - Nov 17 11:44:50s 0:15:10 -
|
||||
Rule sol87 1987 only - Nov 18 11:45:05s 0:14:55 -
|
||||
Rule sol87 1987 only - Nov 19 11:45:15s 0:14:45 -
|
||||
Rule sol87 1987 only - Nov 20 11:45:30s 0:14:30 -
|
||||
Rule sol87 1987 only - Nov 21 11:45:45s 0:14:15 -
|
||||
Rule sol87 1987 only - Nov 22 11:46:00s 0:14:00 -
|
||||
Rule sol87 1987 only - Nov 23 11:46:15s 0:13:45 -
|
||||
Rule sol87 1987 only - Nov 24 11:46:30s 0:13:30 -
|
||||
Rule sol87 1987 only - Nov 25 11:46:50s 0:13:10 -
|
||||
Rule sol87 1987 only - Nov 26 11:47:10s 0:12:50 -
|
||||
Rule sol87 1987 only - Nov 27 11:47:25s 0:12:35 -
|
||||
Rule sol87 1987 only - Nov 28 11:47:45s 0:12:15 -
|
||||
Rule sol87 1987 only - Nov 29 11:48:05s 0:11:55 -
|
||||
Rule sol87 1987 only - Nov 30 11:48:30s 0:11:30 -
|
||||
Rule sol87 1987 only - Dec 1 11:48:50s 0:11:10 -
|
||||
Rule sol87 1987 only - Dec 2 11:49:10s 0:10:50 -
|
||||
Rule sol87 1987 only - Dec 3 11:49:35s 0:10:25 -
|
||||
Rule sol87 1987 only - Dec 4 11:50:00s 0:10:00 -
|
||||
Rule sol87 1987 only - Dec 5 11:50:25s 0:09:35 -
|
||||
Rule sol87 1987 only - Dec 6 11:50:50s 0:09:10 -
|
||||
Rule sol87 1987 only - Dec 7 11:51:15s 0:08:45 -
|
||||
Rule sol87 1987 only - Dec 8 11:51:40s 0:08:20 -
|
||||
Rule sol87 1987 only - Dec 9 11:52:05s 0:07:55 -
|
||||
Rule sol87 1987 only - Dec 10 11:52:30s 0:07:30 -
|
||||
Rule sol87 1987 only - Dec 11 11:53:00s 0:07:00 -
|
||||
Rule sol87 1987 only - Dec 12 11:53:25s 0:06:35 -
|
||||
Rule sol87 1987 only - Dec 13 11:53:55s 0:06:05 -
|
||||
Rule sol87 1987 only - Dec 14 11:54:25s 0:05:35 -
|
||||
Rule sol87 1987 only - Dec 15 11:54:50s 0:05:10 -
|
||||
Rule sol87 1987 only - Dec 16 11:55:20s 0:04:40 -
|
||||
Rule sol87 1987 only - Dec 17 11:55:50s 0:04:10 -
|
||||
Rule sol87 1987 only - Dec 18 11:56:20s 0:03:40 -
|
||||
Rule sol87 1987 only - Dec 19 11:56:50s 0:03:10 -
|
||||
Rule sol87 1987 only - Dec 20 11:57:20s 0:02:40 -
|
||||
Rule sol87 1987 only - Dec 21 11:57:50s 0:02:10 -
|
||||
Rule sol87 1987 only - Dec 22 11:58:20s 0:01:40 -
|
||||
Rule sol87 1987 only - Dec 23 11:58:50s 0:01:10 -
|
||||
Rule sol87 1987 only - Dec 24 11:59:20s 0:00:40 -
|
||||
Rule sol87 1987 only - Dec 25 11:59:50s 0:00:10 -
|
||||
Rule sol87 1987 only - Dec 26 12:00:20s -0:00:20 -
|
||||
Rule sol87 1987 only - Dec 27 12:00:45s -0:00:45 -
|
||||
Rule sol87 1987 only - Dec 28 12:01:15s -0:01:15 -
|
||||
Rule sol87 1987 only - Dec 29 12:01:45s -0:01:45 -
|
||||
Rule sol87 1987 only - Dec 30 12:02:15s -0:02:15 -
|
||||
Rule sol87 1987 only - Dec 31 12:02:45s -0:02:45 -
|
||||
|
||||
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
|
||||
# Before and after 1987, we'll operate on local mean solar time.
|
||||
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
Zone Asia/Riyadh87 3:07:04 - zzz 1987
|
||||
3:07:04 sol87 zzz 1988
|
||||
3:07:04 - zzz
|
||||
# For backward compatibility...
|
||||
Link Asia/Riyadh87 Mideast/Riyadh87
|
||||
Vendored
+390
@@ -0,0 +1,390 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Apparent noon times below are for Riyadh; they're a bit off for other places.
|
||||
# Times were computed using formulas in the U.S. Naval Observatory's
|
||||
# Almanac for Computers 1988; the formulas "will give EqT to an accuracy of
|
||||
# [plus or minus two] seconds during the current year."
|
||||
#
|
||||
# Rounding to the nearest five seconds results in fewer than
|
||||
# 256 different "time types"--a limit that's faced because time types are
|
||||
# stored on disk as unsigned chars.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule sol88 1988 only - Jan 1 12:03:15s -0:03:15 -
|
||||
Rule sol88 1988 only - Jan 2 12:03:40s -0:03:40 -
|
||||
Rule sol88 1988 only - Jan 3 12:04:10s -0:04:10 -
|
||||
Rule sol88 1988 only - Jan 4 12:04:40s -0:04:40 -
|
||||
Rule sol88 1988 only - Jan 5 12:05:05s -0:05:05 -
|
||||
Rule sol88 1988 only - Jan 6 12:05:30s -0:05:30 -
|
||||
Rule sol88 1988 only - Jan 7 12:06:00s -0:06:00 -
|
||||
Rule sol88 1988 only - Jan 8 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jan 9 12:06:50s -0:06:50 -
|
||||
Rule sol88 1988 only - Jan 10 12:07:15s -0:07:15 -
|
||||
Rule sol88 1988 only - Jan 11 12:07:40s -0:07:40 -
|
||||
Rule sol88 1988 only - Jan 12 12:08:05s -0:08:05 -
|
||||
Rule sol88 1988 only - Jan 13 12:08:25s -0:08:25 -
|
||||
Rule sol88 1988 only - Jan 14 12:08:50s -0:08:50 -
|
||||
Rule sol88 1988 only - Jan 15 12:09:10s -0:09:10 -
|
||||
Rule sol88 1988 only - Jan 16 12:09:30s -0:09:30 -
|
||||
Rule sol88 1988 only - Jan 17 12:09:50s -0:09:50 -
|
||||
Rule sol88 1988 only - Jan 18 12:10:10s -0:10:10 -
|
||||
Rule sol88 1988 only - Jan 19 12:10:30s -0:10:30 -
|
||||
Rule sol88 1988 only - Jan 20 12:10:50s -0:10:50 -
|
||||
Rule sol88 1988 only - Jan 21 12:11:05s -0:11:05 -
|
||||
Rule sol88 1988 only - Jan 22 12:11:25s -0:11:25 -
|
||||
Rule sol88 1988 only - Jan 23 12:11:40s -0:11:40 -
|
||||
Rule sol88 1988 only - Jan 24 12:11:55s -0:11:55 -
|
||||
Rule sol88 1988 only - Jan 25 12:12:10s -0:12:10 -
|
||||
Rule sol88 1988 only - Jan 26 12:12:25s -0:12:25 -
|
||||
Rule sol88 1988 only - Jan 27 12:12:40s -0:12:40 -
|
||||
Rule sol88 1988 only - Jan 28 12:12:50s -0:12:50 -
|
||||
Rule sol88 1988 only - Jan 29 12:13:00s -0:13:00 -
|
||||
Rule sol88 1988 only - Jan 30 12:13:10s -0:13:10 -
|
||||
Rule sol88 1988 only - Jan 31 12:13:20s -0:13:20 -
|
||||
Rule sol88 1988 only - Feb 1 12:13:30s -0:13:30 -
|
||||
Rule sol88 1988 only - Feb 2 12:13:40s -0:13:40 -
|
||||
Rule sol88 1988 only - Feb 3 12:13:45s -0:13:45 -
|
||||
Rule sol88 1988 only - Feb 4 12:13:55s -0:13:55 -
|
||||
Rule sol88 1988 only - Feb 5 12:14:00s -0:14:00 -
|
||||
Rule sol88 1988 only - Feb 6 12:14:05s -0:14:05 -
|
||||
Rule sol88 1988 only - Feb 7 12:14:10s -0:14:10 -
|
||||
Rule sol88 1988 only - Feb 8 12:14:10s -0:14:10 -
|
||||
Rule sol88 1988 only - Feb 9 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 10 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 11 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 12 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 13 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 14 12:14:15s -0:14:15 -
|
||||
Rule sol88 1988 only - Feb 15 12:14:10s -0:14:10 -
|
||||
Rule sol88 1988 only - Feb 16 12:14:10s -0:14:10 -
|
||||
Rule sol88 1988 only - Feb 17 12:14:05s -0:14:05 -
|
||||
Rule sol88 1988 only - Feb 18 12:14:00s -0:14:00 -
|
||||
Rule sol88 1988 only - Feb 19 12:13:55s -0:13:55 -
|
||||
Rule sol88 1988 only - Feb 20 12:13:50s -0:13:50 -
|
||||
Rule sol88 1988 only - Feb 21 12:13:45s -0:13:45 -
|
||||
Rule sol88 1988 only - Feb 22 12:13:40s -0:13:40 -
|
||||
Rule sol88 1988 only - Feb 23 12:13:30s -0:13:30 -
|
||||
Rule sol88 1988 only - Feb 24 12:13:20s -0:13:20 -
|
||||
Rule sol88 1988 only - Feb 25 12:13:15s -0:13:15 -
|
||||
Rule sol88 1988 only - Feb 26 12:13:05s -0:13:05 -
|
||||
Rule sol88 1988 only - Feb 27 12:12:55s -0:12:55 -
|
||||
Rule sol88 1988 only - Feb 28 12:12:45s -0:12:45 -
|
||||
Rule sol88 1988 only - Feb 29 12:12:30s -0:12:30 -
|
||||
Rule sol88 1988 only - Mar 1 12:12:20s -0:12:20 -
|
||||
Rule sol88 1988 only - Mar 2 12:12:10s -0:12:10 -
|
||||
Rule sol88 1988 only - Mar 3 12:11:55s -0:11:55 -
|
||||
Rule sol88 1988 only - Mar 4 12:11:45s -0:11:45 -
|
||||
Rule sol88 1988 only - Mar 5 12:11:30s -0:11:30 -
|
||||
Rule sol88 1988 only - Mar 6 12:11:15s -0:11:15 -
|
||||
Rule sol88 1988 only - Mar 7 12:11:00s -0:11:00 -
|
||||
Rule sol88 1988 only - Mar 8 12:10:45s -0:10:45 -
|
||||
Rule sol88 1988 only - Mar 9 12:10:30s -0:10:30 -
|
||||
Rule sol88 1988 only - Mar 10 12:10:15s -0:10:15 -
|
||||
Rule sol88 1988 only - Mar 11 12:10:00s -0:10:00 -
|
||||
Rule sol88 1988 only - Mar 12 12:09:45s -0:09:45 -
|
||||
Rule sol88 1988 only - Mar 13 12:09:30s -0:09:30 -
|
||||
Rule sol88 1988 only - Mar 14 12:09:10s -0:09:10 -
|
||||
Rule sol88 1988 only - Mar 15 12:08:55s -0:08:55 -
|
||||
Rule sol88 1988 only - Mar 16 12:08:40s -0:08:40 -
|
||||
Rule sol88 1988 only - Mar 17 12:08:20s -0:08:20 -
|
||||
Rule sol88 1988 only - Mar 18 12:08:05s -0:08:05 -
|
||||
Rule sol88 1988 only - Mar 19 12:07:45s -0:07:45 -
|
||||
Rule sol88 1988 only - Mar 20 12:07:30s -0:07:30 -
|
||||
Rule sol88 1988 only - Mar 21 12:07:10s -0:07:10 -
|
||||
Rule sol88 1988 only - Mar 22 12:06:50s -0:06:50 -
|
||||
Rule sol88 1988 only - Mar 23 12:06:35s -0:06:35 -
|
||||
Rule sol88 1988 only - Mar 24 12:06:15s -0:06:15 -
|
||||
Rule sol88 1988 only - Mar 25 12:06:00s -0:06:00 -
|
||||
Rule sol88 1988 only - Mar 26 12:05:40s -0:05:40 -
|
||||
Rule sol88 1988 only - Mar 27 12:05:20s -0:05:20 -
|
||||
Rule sol88 1988 only - Mar 28 12:05:05s -0:05:05 -
|
||||
Rule sol88 1988 only - Mar 29 12:04:45s -0:04:45 -
|
||||
Rule sol88 1988 only - Mar 30 12:04:25s -0:04:25 -
|
||||
Rule sol88 1988 only - Mar 31 12:04:10s -0:04:10 -
|
||||
Rule sol88 1988 only - Apr 1 12:03:50s -0:03:50 -
|
||||
Rule sol88 1988 only - Apr 2 12:03:35s -0:03:35 -
|
||||
Rule sol88 1988 only - Apr 3 12:03:15s -0:03:15 -
|
||||
Rule sol88 1988 only - Apr 4 12:03:00s -0:03:00 -
|
||||
Rule sol88 1988 only - Apr 5 12:02:40s -0:02:40 -
|
||||
Rule sol88 1988 only - Apr 6 12:02:25s -0:02:25 -
|
||||
Rule sol88 1988 only - Apr 7 12:02:05s -0:02:05 -
|
||||
Rule sol88 1988 only - Apr 8 12:01:50s -0:01:50 -
|
||||
Rule sol88 1988 only - Apr 9 12:01:35s -0:01:35 -
|
||||
Rule sol88 1988 only - Apr 10 12:01:15s -0:01:15 -
|
||||
Rule sol88 1988 only - Apr 11 12:01:00s -0:01:00 -
|
||||
Rule sol88 1988 only - Apr 12 12:00:45s -0:00:45 -
|
||||
Rule sol88 1988 only - Apr 13 12:00:30s -0:00:30 -
|
||||
Rule sol88 1988 only - Apr 14 12:00:15s -0:00:15 -
|
||||
Rule sol88 1988 only - Apr 15 12:00:00s 0:00:00 -
|
||||
Rule sol88 1988 only - Apr 16 11:59:45s 0:00:15 -
|
||||
Rule sol88 1988 only - Apr 17 11:59:30s 0:00:30 -
|
||||
Rule sol88 1988 only - Apr 18 11:59:20s 0:00:40 -
|
||||
Rule sol88 1988 only - Apr 19 11:59:05s 0:00:55 -
|
||||
Rule sol88 1988 only - Apr 20 11:58:55s 0:01:05 -
|
||||
Rule sol88 1988 only - Apr 21 11:58:40s 0:01:20 -
|
||||
Rule sol88 1988 only - Apr 22 11:58:30s 0:01:30 -
|
||||
Rule sol88 1988 only - Apr 23 11:58:15s 0:01:45 -
|
||||
Rule sol88 1988 only - Apr 24 11:58:05s 0:01:55 -
|
||||
Rule sol88 1988 only - Apr 25 11:57:55s 0:02:05 -
|
||||
Rule sol88 1988 only - Apr 26 11:57:45s 0:02:15 -
|
||||
Rule sol88 1988 only - Apr 27 11:57:35s 0:02:25 -
|
||||
Rule sol88 1988 only - Apr 28 11:57:30s 0:02:30 -
|
||||
Rule sol88 1988 only - Apr 29 11:57:20s 0:02:40 -
|
||||
Rule sol88 1988 only - Apr 30 11:57:10s 0:02:50 -
|
||||
Rule sol88 1988 only - May 1 11:57:05s 0:02:55 -
|
||||
Rule sol88 1988 only - May 2 11:56:55s 0:03:05 -
|
||||
Rule sol88 1988 only - May 3 11:56:50s 0:03:10 -
|
||||
Rule sol88 1988 only - May 4 11:56:45s 0:03:15 -
|
||||
Rule sol88 1988 only - May 5 11:56:40s 0:03:20 -
|
||||
Rule sol88 1988 only - May 6 11:56:35s 0:03:25 -
|
||||
Rule sol88 1988 only - May 7 11:56:30s 0:03:30 -
|
||||
Rule sol88 1988 only - May 8 11:56:25s 0:03:35 -
|
||||
Rule sol88 1988 only - May 9 11:56:25s 0:03:35 -
|
||||
Rule sol88 1988 only - May 10 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 11 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 12 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 13 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 14 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 15 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 16 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 17 11:56:20s 0:03:40 -
|
||||
Rule sol88 1988 only - May 18 11:56:25s 0:03:35 -
|
||||
Rule sol88 1988 only - May 19 11:56:25s 0:03:35 -
|
||||
Rule sol88 1988 only - May 20 11:56:30s 0:03:30 -
|
||||
Rule sol88 1988 only - May 21 11:56:35s 0:03:25 -
|
||||
Rule sol88 1988 only - May 22 11:56:40s 0:03:20 -
|
||||
Rule sol88 1988 only - May 23 11:56:45s 0:03:15 -
|
||||
Rule sol88 1988 only - May 24 11:56:50s 0:03:10 -
|
||||
Rule sol88 1988 only - May 25 11:56:55s 0:03:05 -
|
||||
Rule sol88 1988 only - May 26 11:57:00s 0:03:00 -
|
||||
Rule sol88 1988 only - May 27 11:57:05s 0:02:55 -
|
||||
Rule sol88 1988 only - May 28 11:57:15s 0:02:45 -
|
||||
Rule sol88 1988 only - May 29 11:57:20s 0:02:40 -
|
||||
Rule sol88 1988 only - May 30 11:57:30s 0:02:30 -
|
||||
Rule sol88 1988 only - May 31 11:57:40s 0:02:20 -
|
||||
Rule sol88 1988 only - Jun 1 11:57:50s 0:02:10 -
|
||||
Rule sol88 1988 only - Jun 2 11:57:55s 0:02:05 -
|
||||
Rule sol88 1988 only - Jun 3 11:58:05s 0:01:55 -
|
||||
Rule sol88 1988 only - Jun 4 11:58:15s 0:01:45 -
|
||||
Rule sol88 1988 only - Jun 5 11:58:30s 0:01:30 -
|
||||
Rule sol88 1988 only - Jun 6 11:58:40s 0:01:20 -
|
||||
Rule sol88 1988 only - Jun 7 11:58:50s 0:01:10 -
|
||||
Rule sol88 1988 only - Jun 8 11:59:00s 0:01:00 -
|
||||
Rule sol88 1988 only - Jun 9 11:59:15s 0:00:45 -
|
||||
Rule sol88 1988 only - Jun 10 11:59:25s 0:00:35 -
|
||||
Rule sol88 1988 only - Jun 11 11:59:35s 0:00:25 -
|
||||
Rule sol88 1988 only - Jun 12 11:59:50s 0:00:10 -
|
||||
Rule sol88 1988 only - Jun 13 12:00:00s 0:00:00 -
|
||||
Rule sol88 1988 only - Jun 14 12:00:15s -0:00:15 -
|
||||
Rule sol88 1988 only - Jun 15 12:00:25s -0:00:25 -
|
||||
Rule sol88 1988 only - Jun 16 12:00:40s -0:00:40 -
|
||||
Rule sol88 1988 only - Jun 17 12:00:55s -0:00:55 -
|
||||
Rule sol88 1988 only - Jun 18 12:01:05s -0:01:05 -
|
||||
Rule sol88 1988 only - Jun 19 12:01:20s -0:01:20 -
|
||||
Rule sol88 1988 only - Jun 20 12:01:30s -0:01:30 -
|
||||
Rule sol88 1988 only - Jun 21 12:01:45s -0:01:45 -
|
||||
Rule sol88 1988 only - Jun 22 12:02:00s -0:02:00 -
|
||||
Rule sol88 1988 only - Jun 23 12:02:10s -0:02:10 -
|
||||
Rule sol88 1988 only - Jun 24 12:02:25s -0:02:25 -
|
||||
Rule sol88 1988 only - Jun 25 12:02:35s -0:02:35 -
|
||||
Rule sol88 1988 only - Jun 26 12:02:50s -0:02:50 -
|
||||
Rule sol88 1988 only - Jun 27 12:03:00s -0:03:00 -
|
||||
Rule sol88 1988 only - Jun 28 12:03:15s -0:03:15 -
|
||||
Rule sol88 1988 only - Jun 29 12:03:25s -0:03:25 -
|
||||
Rule sol88 1988 only - Jun 30 12:03:40s -0:03:40 -
|
||||
Rule sol88 1988 only - Jul 1 12:03:50s -0:03:50 -
|
||||
Rule sol88 1988 only - Jul 2 12:04:00s -0:04:00 -
|
||||
Rule sol88 1988 only - Jul 3 12:04:10s -0:04:10 -
|
||||
Rule sol88 1988 only - Jul 4 12:04:25s -0:04:25 -
|
||||
Rule sol88 1988 only - Jul 5 12:04:35s -0:04:35 -
|
||||
Rule sol88 1988 only - Jul 6 12:04:45s -0:04:45 -
|
||||
Rule sol88 1988 only - Jul 7 12:04:55s -0:04:55 -
|
||||
Rule sol88 1988 only - Jul 8 12:05:05s -0:05:05 -
|
||||
Rule sol88 1988 only - Jul 9 12:05:10s -0:05:10 -
|
||||
Rule sol88 1988 only - Jul 10 12:05:20s -0:05:20 -
|
||||
Rule sol88 1988 only - Jul 11 12:05:30s -0:05:30 -
|
||||
Rule sol88 1988 only - Jul 12 12:05:35s -0:05:35 -
|
||||
Rule sol88 1988 only - Jul 13 12:05:45s -0:05:45 -
|
||||
Rule sol88 1988 only - Jul 14 12:05:50s -0:05:50 -
|
||||
Rule sol88 1988 only - Jul 15 12:05:55s -0:05:55 -
|
||||
Rule sol88 1988 only - Jul 16 12:06:00s -0:06:00 -
|
||||
Rule sol88 1988 only - Jul 17 12:06:05s -0:06:05 -
|
||||
Rule sol88 1988 only - Jul 18 12:06:10s -0:06:10 -
|
||||
Rule sol88 1988 only - Jul 19 12:06:15s -0:06:15 -
|
||||
Rule sol88 1988 only - Jul 20 12:06:20s -0:06:20 -
|
||||
Rule sol88 1988 only - Jul 21 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jul 22 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jul 23 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jul 24 12:06:30s -0:06:30 -
|
||||
Rule sol88 1988 only - Jul 25 12:06:30s -0:06:30 -
|
||||
Rule sol88 1988 only - Jul 26 12:06:30s -0:06:30 -
|
||||
Rule sol88 1988 only - Jul 27 12:06:30s -0:06:30 -
|
||||
Rule sol88 1988 only - Jul 28 12:06:30s -0:06:30 -
|
||||
Rule sol88 1988 only - Jul 29 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jul 30 12:06:25s -0:06:25 -
|
||||
Rule sol88 1988 only - Jul 31 12:06:20s -0:06:20 -
|
||||
Rule sol88 1988 only - Aug 1 12:06:15s -0:06:15 -
|
||||
Rule sol88 1988 only - Aug 2 12:06:15s -0:06:15 -
|
||||
Rule sol88 1988 only - Aug 3 12:06:10s -0:06:10 -
|
||||
Rule sol88 1988 only - Aug 4 12:06:05s -0:06:05 -
|
||||
Rule sol88 1988 only - Aug 5 12:05:55s -0:05:55 -
|
||||
Rule sol88 1988 only - Aug 6 12:05:50s -0:05:50 -
|
||||
Rule sol88 1988 only - Aug 7 12:05:45s -0:05:45 -
|
||||
Rule sol88 1988 only - Aug 8 12:05:35s -0:05:35 -
|
||||
Rule sol88 1988 only - Aug 9 12:05:25s -0:05:25 -
|
||||
Rule sol88 1988 only - Aug 10 12:05:20s -0:05:20 -
|
||||
Rule sol88 1988 only - Aug 11 12:05:10s -0:05:10 -
|
||||
Rule sol88 1988 only - Aug 12 12:05:00s -0:05:00 -
|
||||
Rule sol88 1988 only - Aug 13 12:04:50s -0:04:50 -
|
||||
Rule sol88 1988 only - Aug 14 12:04:35s -0:04:35 -
|
||||
Rule sol88 1988 only - Aug 15 12:04:25s -0:04:25 -
|
||||
Rule sol88 1988 only - Aug 16 12:04:15s -0:04:15 -
|
||||
Rule sol88 1988 only - Aug 17 12:04:00s -0:04:00 -
|
||||
Rule sol88 1988 only - Aug 18 12:03:50s -0:03:50 -
|
||||
Rule sol88 1988 only - Aug 19 12:03:35s -0:03:35 -
|
||||
Rule sol88 1988 only - Aug 20 12:03:20s -0:03:20 -
|
||||
Rule sol88 1988 only - Aug 21 12:03:05s -0:03:05 -
|
||||
Rule sol88 1988 only - Aug 22 12:02:50s -0:02:50 -
|
||||
Rule sol88 1988 only - Aug 23 12:02:35s -0:02:35 -
|
||||
Rule sol88 1988 only - Aug 24 12:02:20s -0:02:20 -
|
||||
Rule sol88 1988 only - Aug 25 12:02:00s -0:02:00 -
|
||||
Rule sol88 1988 only - Aug 26 12:01:45s -0:01:45 -
|
||||
Rule sol88 1988 only - Aug 27 12:01:30s -0:01:30 -
|
||||
Rule sol88 1988 only - Aug 28 12:01:10s -0:01:10 -
|
||||
Rule sol88 1988 only - Aug 29 12:00:50s -0:00:50 -
|
||||
Rule sol88 1988 only - Aug 30 12:00:35s -0:00:35 -
|
||||
Rule sol88 1988 only - Aug 31 12:00:15s -0:00:15 -
|
||||
Rule sol88 1988 only - Sep 1 11:59:55s 0:00:05 -
|
||||
Rule sol88 1988 only - Sep 2 11:59:35s 0:00:25 -
|
||||
Rule sol88 1988 only - Sep 3 11:59:20s 0:00:40 -
|
||||
Rule sol88 1988 only - Sep 4 11:59:00s 0:01:00 -
|
||||
Rule sol88 1988 only - Sep 5 11:58:40s 0:01:20 -
|
||||
Rule sol88 1988 only - Sep 6 11:58:20s 0:01:40 -
|
||||
Rule sol88 1988 only - Sep 7 11:58:00s 0:02:00 -
|
||||
Rule sol88 1988 only - Sep 8 11:57:35s 0:02:25 -
|
||||
Rule sol88 1988 only - Sep 9 11:57:15s 0:02:45 -
|
||||
Rule sol88 1988 only - Sep 10 11:56:55s 0:03:05 -
|
||||
Rule sol88 1988 only - Sep 11 11:56:35s 0:03:25 -
|
||||
Rule sol88 1988 only - Sep 12 11:56:15s 0:03:45 -
|
||||
Rule sol88 1988 only - Sep 13 11:55:50s 0:04:10 -
|
||||
Rule sol88 1988 only - Sep 14 11:55:30s 0:04:30 -
|
||||
Rule sol88 1988 only - Sep 15 11:55:10s 0:04:50 -
|
||||
Rule sol88 1988 only - Sep 16 11:54:50s 0:05:10 -
|
||||
Rule sol88 1988 only - Sep 17 11:54:25s 0:05:35 -
|
||||
Rule sol88 1988 only - Sep 18 11:54:05s 0:05:55 -
|
||||
Rule sol88 1988 only - Sep 19 11:53:45s 0:06:15 -
|
||||
Rule sol88 1988 only - Sep 20 11:53:25s 0:06:35 -
|
||||
Rule sol88 1988 only - Sep 21 11:53:00s 0:07:00 -
|
||||
Rule sol88 1988 only - Sep 22 11:52:40s 0:07:20 -
|
||||
Rule sol88 1988 only - Sep 23 11:52:20s 0:07:40 -
|
||||
Rule sol88 1988 only - Sep 24 11:52:00s 0:08:00 -
|
||||
Rule sol88 1988 only - Sep 25 11:51:40s 0:08:20 -
|
||||
Rule sol88 1988 only - Sep 26 11:51:15s 0:08:45 -
|
||||
Rule sol88 1988 only - Sep 27 11:50:55s 0:09:05 -
|
||||
Rule sol88 1988 only - Sep 28 11:50:35s 0:09:25 -
|
||||
Rule sol88 1988 only - Sep 29 11:50:15s 0:09:45 -
|
||||
Rule sol88 1988 only - Sep 30 11:49:55s 0:10:05 -
|
||||
Rule sol88 1988 only - Oct 1 11:49:35s 0:10:25 -
|
||||
Rule sol88 1988 only - Oct 2 11:49:20s 0:10:40 -
|
||||
Rule sol88 1988 only - Oct 3 11:49:00s 0:11:00 -
|
||||
Rule sol88 1988 only - Oct 4 11:48:40s 0:11:20 -
|
||||
Rule sol88 1988 only - Oct 5 11:48:25s 0:11:35 -
|
||||
Rule sol88 1988 only - Oct 6 11:48:05s 0:11:55 -
|
||||
Rule sol88 1988 only - Oct 7 11:47:50s 0:12:10 -
|
||||
Rule sol88 1988 only - Oct 8 11:47:30s 0:12:30 -
|
||||
Rule sol88 1988 only - Oct 9 11:47:15s 0:12:45 -
|
||||
Rule sol88 1988 only - Oct 10 11:47:00s 0:13:00 -
|
||||
Rule sol88 1988 only - Oct 11 11:46:45s 0:13:15 -
|
||||
Rule sol88 1988 only - Oct 12 11:46:30s 0:13:30 -
|
||||
Rule sol88 1988 only - Oct 13 11:46:15s 0:13:45 -
|
||||
Rule sol88 1988 only - Oct 14 11:46:00s 0:14:00 -
|
||||
Rule sol88 1988 only - Oct 15 11:45:45s 0:14:15 -
|
||||
Rule sol88 1988 only - Oct 16 11:45:35s 0:14:25 -
|
||||
Rule sol88 1988 only - Oct 17 11:45:20s 0:14:40 -
|
||||
Rule sol88 1988 only - Oct 18 11:45:10s 0:14:50 -
|
||||
Rule sol88 1988 only - Oct 19 11:45:00s 0:15:00 -
|
||||
Rule sol88 1988 only - Oct 20 11:44:45s 0:15:15 -
|
||||
Rule sol88 1988 only - Oct 21 11:44:40s 0:15:20 -
|
||||
Rule sol88 1988 only - Oct 22 11:44:30s 0:15:30 -
|
||||
Rule sol88 1988 only - Oct 23 11:44:20s 0:15:40 -
|
||||
Rule sol88 1988 only - Oct 24 11:44:10s 0:15:50 -
|
||||
Rule sol88 1988 only - Oct 25 11:44:05s 0:15:55 -
|
||||
Rule sol88 1988 only - Oct 26 11:44:00s 0:16:00 -
|
||||
Rule sol88 1988 only - Oct 27 11:43:55s 0:16:05 -
|
||||
Rule sol88 1988 only - Oct 28 11:43:50s 0:16:10 -
|
||||
Rule sol88 1988 only - Oct 29 11:43:45s 0:16:15 -
|
||||
Rule sol88 1988 only - Oct 30 11:43:40s 0:16:20 -
|
||||
Rule sol88 1988 only - Oct 31 11:43:40s 0:16:20 -
|
||||
Rule sol88 1988 only - Nov 1 11:43:35s 0:16:25 -
|
||||
Rule sol88 1988 only - Nov 2 11:43:35s 0:16:25 -
|
||||
Rule sol88 1988 only - Nov 3 11:43:35s 0:16:25 -
|
||||
Rule sol88 1988 only - Nov 4 11:43:35s 0:16:25 -
|
||||
Rule sol88 1988 only - Nov 5 11:43:40s 0:16:20 -
|
||||
Rule sol88 1988 only - Nov 6 11:43:40s 0:16:20 -
|
||||
Rule sol88 1988 only - Nov 7 11:43:45s 0:16:15 -
|
||||
Rule sol88 1988 only - Nov 8 11:43:45s 0:16:15 -
|
||||
Rule sol88 1988 only - Nov 9 11:43:50s 0:16:10 -
|
||||
Rule sol88 1988 only - Nov 10 11:44:00s 0:16:00 -
|
||||
Rule sol88 1988 only - Nov 11 11:44:05s 0:15:55 -
|
||||
Rule sol88 1988 only - Nov 12 11:44:10s 0:15:50 -
|
||||
Rule sol88 1988 only - Nov 13 11:44:20s 0:15:40 -
|
||||
Rule sol88 1988 only - Nov 14 11:44:30s 0:15:30 -
|
||||
Rule sol88 1988 only - Nov 15 11:44:40s 0:15:20 -
|
||||
Rule sol88 1988 only - Nov 16 11:44:50s 0:15:10 -
|
||||
Rule sol88 1988 only - Nov 17 11:45:00s 0:15:00 -
|
||||
Rule sol88 1988 only - Nov 18 11:45:15s 0:14:45 -
|
||||
Rule sol88 1988 only - Nov 19 11:45:25s 0:14:35 -
|
||||
Rule sol88 1988 only - Nov 20 11:45:40s 0:14:20 -
|
||||
Rule sol88 1988 only - Nov 21 11:45:55s 0:14:05 -
|
||||
Rule sol88 1988 only - Nov 22 11:46:10s 0:13:50 -
|
||||
Rule sol88 1988 only - Nov 23 11:46:30s 0:13:30 -
|
||||
Rule sol88 1988 only - Nov 24 11:46:45s 0:13:15 -
|
||||
Rule sol88 1988 only - Nov 25 11:47:05s 0:12:55 -
|
||||
Rule sol88 1988 only - Nov 26 11:47:20s 0:12:40 -
|
||||
Rule sol88 1988 only - Nov 27 11:47:40s 0:12:20 -
|
||||
Rule sol88 1988 only - Nov 28 11:48:00s 0:12:00 -
|
||||
Rule sol88 1988 only - Nov 29 11:48:25s 0:11:35 -
|
||||
Rule sol88 1988 only - Nov 30 11:48:45s 0:11:15 -
|
||||
Rule sol88 1988 only - Dec 1 11:49:05s 0:10:55 -
|
||||
Rule sol88 1988 only - Dec 2 11:49:30s 0:10:30 -
|
||||
Rule sol88 1988 only - Dec 3 11:49:55s 0:10:05 -
|
||||
Rule sol88 1988 only - Dec 4 11:50:15s 0:09:45 -
|
||||
Rule sol88 1988 only - Dec 5 11:50:40s 0:09:20 -
|
||||
Rule sol88 1988 only - Dec 6 11:51:05s 0:08:55 -
|
||||
Rule sol88 1988 only - Dec 7 11:51:35s 0:08:25 -
|
||||
Rule sol88 1988 only - Dec 8 11:52:00s 0:08:00 -
|
||||
Rule sol88 1988 only - Dec 9 11:52:25s 0:07:35 -
|
||||
Rule sol88 1988 only - Dec 10 11:52:55s 0:07:05 -
|
||||
Rule sol88 1988 only - Dec 11 11:53:20s 0:06:40 -
|
||||
Rule sol88 1988 only - Dec 12 11:53:50s 0:06:10 -
|
||||
Rule sol88 1988 only - Dec 13 11:54:15s 0:05:45 -
|
||||
Rule sol88 1988 only - Dec 14 11:54:45s 0:05:15 -
|
||||
Rule sol88 1988 only - Dec 15 11:55:15s 0:04:45 -
|
||||
Rule sol88 1988 only - Dec 16 11:55:45s 0:04:15 -
|
||||
Rule sol88 1988 only - Dec 17 11:56:15s 0:03:45 -
|
||||
Rule sol88 1988 only - Dec 18 11:56:40s 0:03:20 -
|
||||
Rule sol88 1988 only - Dec 19 11:57:10s 0:02:50 -
|
||||
Rule sol88 1988 only - Dec 20 11:57:40s 0:02:20 -
|
||||
Rule sol88 1988 only - Dec 21 11:58:10s 0:01:50 -
|
||||
Rule sol88 1988 only - Dec 22 11:58:40s 0:01:20 -
|
||||
Rule sol88 1988 only - Dec 23 11:59:10s 0:00:50 -
|
||||
Rule sol88 1988 only - Dec 24 11:59:40s 0:00:20 -
|
||||
Rule sol88 1988 only - Dec 25 12:00:10s -0:00:10 -
|
||||
Rule sol88 1988 only - Dec 26 12:00:40s -0:00:40 -
|
||||
Rule sol88 1988 only - Dec 27 12:01:10s -0:01:10 -
|
||||
Rule sol88 1988 only - Dec 28 12:01:40s -0:01:40 -
|
||||
Rule sol88 1988 only - Dec 29 12:02:10s -0:02:10 -
|
||||
Rule sol88 1988 only - Dec 30 12:02:35s -0:02:35 -
|
||||
Rule sol88 1988 only - Dec 31 12:03:05s -0:03:05 -
|
||||
|
||||
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
|
||||
# Before and after 1988, we'll operate on local mean solar time.
|
||||
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
Zone Asia/Riyadh88 3:07:04 - zzz 1988
|
||||
3:07:04 sol88 zzz 1989
|
||||
3:07:04 - zzz
|
||||
# For backward compatibility...
|
||||
Link Asia/Riyadh88 Mideast/Riyadh88
|
||||
Vendored
+395
@@ -0,0 +1,395 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Apparent noon times below are for Riyadh; they're a bit off for other places.
|
||||
# Times were computed using a formula provided by the U. S. Naval Observatory:
|
||||
# eqt = -105.8 * sin(l) + 596.2 * sin(2 * l) + 4.4 * sin(3 * l)
|
||||
# -12.7 * sin(4 * l) - 429.0 * cos(l) - 2.1 * cos (2 * l)
|
||||
# + 19.3 * cos(3 * l);
|
||||
# where l is the "mean longitude of the Sun" given by
|
||||
# l = 279.642 degrees + 0.985647 * d
|
||||
# and d is the interval in days from January 0, 0 hours Universal Time
|
||||
# (equaling the day of the year plus the fraction of a day from zero hours).
|
||||
# The accuracy of the formula is plus or minus three seconds.
|
||||
#
|
||||
# Rounding to the nearest five seconds results in fewer than
|
||||
# 256 different "time types"--a limit that's faced because time types are
|
||||
# stored on disk as unsigned chars.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule sol89 1989 only - Jan 1 12:03:35s -0:03:35 -
|
||||
Rule sol89 1989 only - Jan 2 12:04:05s -0:04:05 -
|
||||
Rule sol89 1989 only - Jan 3 12:04:30s -0:04:30 -
|
||||
Rule sol89 1989 only - Jan 4 12:05:00s -0:05:00 -
|
||||
Rule sol89 1989 only - Jan 5 12:05:25s -0:05:25 -
|
||||
Rule sol89 1989 only - Jan 6 12:05:50s -0:05:50 -
|
||||
Rule sol89 1989 only - Jan 7 12:06:15s -0:06:15 -
|
||||
Rule sol89 1989 only - Jan 8 12:06:45s -0:06:45 -
|
||||
Rule sol89 1989 only - Jan 9 12:07:10s -0:07:10 -
|
||||
Rule sol89 1989 only - Jan 10 12:07:35s -0:07:35 -
|
||||
Rule sol89 1989 only - Jan 11 12:07:55s -0:07:55 -
|
||||
Rule sol89 1989 only - Jan 12 12:08:20s -0:08:20 -
|
||||
Rule sol89 1989 only - Jan 13 12:08:45s -0:08:45 -
|
||||
Rule sol89 1989 only - Jan 14 12:09:05s -0:09:05 -
|
||||
Rule sol89 1989 only - Jan 15 12:09:25s -0:09:25 -
|
||||
Rule sol89 1989 only - Jan 16 12:09:45s -0:09:45 -
|
||||
Rule sol89 1989 only - Jan 17 12:10:05s -0:10:05 -
|
||||
Rule sol89 1989 only - Jan 18 12:10:25s -0:10:25 -
|
||||
Rule sol89 1989 only - Jan 19 12:10:45s -0:10:45 -
|
||||
Rule sol89 1989 only - Jan 20 12:11:05s -0:11:05 -
|
||||
Rule sol89 1989 only - Jan 21 12:11:20s -0:11:20 -
|
||||
Rule sol89 1989 only - Jan 22 12:11:35s -0:11:35 -
|
||||
Rule sol89 1989 only - Jan 23 12:11:55s -0:11:55 -
|
||||
Rule sol89 1989 only - Jan 24 12:12:10s -0:12:10 -
|
||||
Rule sol89 1989 only - Jan 25 12:12:20s -0:12:20 -
|
||||
Rule sol89 1989 only - Jan 26 12:12:35s -0:12:35 -
|
||||
Rule sol89 1989 only - Jan 27 12:12:50s -0:12:50 -
|
||||
Rule sol89 1989 only - Jan 28 12:13:00s -0:13:00 -
|
||||
Rule sol89 1989 only - Jan 29 12:13:10s -0:13:10 -
|
||||
Rule sol89 1989 only - Jan 30 12:13:20s -0:13:20 -
|
||||
Rule sol89 1989 only - Jan 31 12:13:30s -0:13:30 -
|
||||
Rule sol89 1989 only - Feb 1 12:13:40s -0:13:40 -
|
||||
Rule sol89 1989 only - Feb 2 12:13:45s -0:13:45 -
|
||||
Rule sol89 1989 only - Feb 3 12:13:55s -0:13:55 -
|
||||
Rule sol89 1989 only - Feb 4 12:14:00s -0:14:00 -
|
||||
Rule sol89 1989 only - Feb 5 12:14:05s -0:14:05 -
|
||||
Rule sol89 1989 only - Feb 6 12:14:10s -0:14:10 -
|
||||
Rule sol89 1989 only - Feb 7 12:14:10s -0:14:10 -
|
||||
Rule sol89 1989 only - Feb 8 12:14:15s -0:14:15 -
|
||||
Rule sol89 1989 only - Feb 9 12:14:15s -0:14:15 -
|
||||
Rule sol89 1989 only - Feb 10 12:14:20s -0:14:20 -
|
||||
Rule sol89 1989 only - Feb 11 12:14:20s -0:14:20 -
|
||||
Rule sol89 1989 only - Feb 12 12:14:20s -0:14:20 -
|
||||
Rule sol89 1989 only - Feb 13 12:14:15s -0:14:15 -
|
||||
Rule sol89 1989 only - Feb 14 12:14:15s -0:14:15 -
|
||||
Rule sol89 1989 only - Feb 15 12:14:10s -0:14:10 -
|
||||
Rule sol89 1989 only - Feb 16 12:14:10s -0:14:10 -
|
||||
Rule sol89 1989 only - Feb 17 12:14:05s -0:14:05 -
|
||||
Rule sol89 1989 only - Feb 18 12:14:00s -0:14:00 -
|
||||
Rule sol89 1989 only - Feb 19 12:13:55s -0:13:55 -
|
||||
Rule sol89 1989 only - Feb 20 12:13:50s -0:13:50 -
|
||||
Rule sol89 1989 only - Feb 21 12:13:40s -0:13:40 -
|
||||
Rule sol89 1989 only - Feb 22 12:13:35s -0:13:35 -
|
||||
Rule sol89 1989 only - Feb 23 12:13:25s -0:13:25 -
|
||||
Rule sol89 1989 only - Feb 24 12:13:15s -0:13:15 -
|
||||
Rule sol89 1989 only - Feb 25 12:13:05s -0:13:05 -
|
||||
Rule sol89 1989 only - Feb 26 12:12:55s -0:12:55 -
|
||||
Rule sol89 1989 only - Feb 27 12:12:45s -0:12:45 -
|
||||
Rule sol89 1989 only - Feb 28 12:12:35s -0:12:35 -
|
||||
Rule sol89 1989 only - Mar 1 12:12:25s -0:12:25 -
|
||||
Rule sol89 1989 only - Mar 2 12:12:10s -0:12:10 -
|
||||
Rule sol89 1989 only - Mar 3 12:12:00s -0:12:00 -
|
||||
Rule sol89 1989 only - Mar 4 12:11:45s -0:11:45 -
|
||||
Rule sol89 1989 only - Mar 5 12:11:35s -0:11:35 -
|
||||
Rule sol89 1989 only - Mar 6 12:11:20s -0:11:20 -
|
||||
Rule sol89 1989 only - Mar 7 12:11:05s -0:11:05 -
|
||||
Rule sol89 1989 only - Mar 8 12:10:50s -0:10:50 -
|
||||
Rule sol89 1989 only - Mar 9 12:10:35s -0:10:35 -
|
||||
Rule sol89 1989 only - Mar 10 12:10:20s -0:10:20 -
|
||||
Rule sol89 1989 only - Mar 11 12:10:05s -0:10:05 -
|
||||
Rule sol89 1989 only - Mar 12 12:09:50s -0:09:50 -
|
||||
Rule sol89 1989 only - Mar 13 12:09:30s -0:09:30 -
|
||||
Rule sol89 1989 only - Mar 14 12:09:15s -0:09:15 -
|
||||
Rule sol89 1989 only - Mar 15 12:09:00s -0:09:00 -
|
||||
Rule sol89 1989 only - Mar 16 12:08:40s -0:08:40 -
|
||||
Rule sol89 1989 only - Mar 17 12:08:25s -0:08:25 -
|
||||
Rule sol89 1989 only - Mar 18 12:08:05s -0:08:05 -
|
||||
Rule sol89 1989 only - Mar 19 12:07:50s -0:07:50 -
|
||||
Rule sol89 1989 only - Mar 20 12:07:30s -0:07:30 -
|
||||
Rule sol89 1989 only - Mar 21 12:07:15s -0:07:15 -
|
||||
Rule sol89 1989 only - Mar 22 12:06:55s -0:06:55 -
|
||||
Rule sol89 1989 only - Mar 23 12:06:35s -0:06:35 -
|
||||
Rule sol89 1989 only - Mar 24 12:06:20s -0:06:20 -
|
||||
Rule sol89 1989 only - Mar 25 12:06:00s -0:06:00 -
|
||||
Rule sol89 1989 only - Mar 26 12:05:40s -0:05:40 -
|
||||
Rule sol89 1989 only - Mar 27 12:05:25s -0:05:25 -
|
||||
Rule sol89 1989 only - Mar 28 12:05:05s -0:05:05 -
|
||||
Rule sol89 1989 only - Mar 29 12:04:50s -0:04:50 -
|
||||
Rule sol89 1989 only - Mar 30 12:04:30s -0:04:30 -
|
||||
Rule sol89 1989 only - Mar 31 12:04:10s -0:04:10 -
|
||||
Rule sol89 1989 only - Apr 1 12:03:55s -0:03:55 -
|
||||
Rule sol89 1989 only - Apr 2 12:03:35s -0:03:35 -
|
||||
Rule sol89 1989 only - Apr 3 12:03:20s -0:03:20 -
|
||||
Rule sol89 1989 only - Apr 4 12:03:00s -0:03:00 -
|
||||
Rule sol89 1989 only - Apr 5 12:02:45s -0:02:45 -
|
||||
Rule sol89 1989 only - Apr 6 12:02:25s -0:02:25 -
|
||||
Rule sol89 1989 only - Apr 7 12:02:10s -0:02:10 -
|
||||
Rule sol89 1989 only - Apr 8 12:01:50s -0:01:50 -
|
||||
Rule sol89 1989 only - Apr 9 12:01:35s -0:01:35 -
|
||||
Rule sol89 1989 only - Apr 10 12:01:20s -0:01:20 -
|
||||
Rule sol89 1989 only - Apr 11 12:01:05s -0:01:05 -
|
||||
Rule sol89 1989 only - Apr 12 12:00:50s -0:00:50 -
|
||||
Rule sol89 1989 only - Apr 13 12:00:35s -0:00:35 -
|
||||
Rule sol89 1989 only - Apr 14 12:00:20s -0:00:20 -
|
||||
Rule sol89 1989 only - Apr 15 12:00:05s -0:00:05 -
|
||||
Rule sol89 1989 only - Apr 16 11:59:50s 0:00:10 -
|
||||
Rule sol89 1989 only - Apr 17 11:59:35s 0:00:25 -
|
||||
Rule sol89 1989 only - Apr 18 11:59:20s 0:00:40 -
|
||||
Rule sol89 1989 only - Apr 19 11:59:10s 0:00:50 -
|
||||
Rule sol89 1989 only - Apr 20 11:58:55s 0:01:05 -
|
||||
Rule sol89 1989 only - Apr 21 11:58:45s 0:01:15 -
|
||||
Rule sol89 1989 only - Apr 22 11:58:30s 0:01:30 -
|
||||
Rule sol89 1989 only - Apr 23 11:58:20s 0:01:40 -
|
||||
Rule sol89 1989 only - Apr 24 11:58:10s 0:01:50 -
|
||||
Rule sol89 1989 only - Apr 25 11:58:00s 0:02:00 -
|
||||
Rule sol89 1989 only - Apr 26 11:57:50s 0:02:10 -
|
||||
Rule sol89 1989 only - Apr 27 11:57:40s 0:02:20 -
|
||||
Rule sol89 1989 only - Apr 28 11:57:30s 0:02:30 -
|
||||
Rule sol89 1989 only - Apr 29 11:57:20s 0:02:40 -
|
||||
Rule sol89 1989 only - Apr 30 11:57:15s 0:02:45 -
|
||||
Rule sol89 1989 only - May 1 11:57:05s 0:02:55 -
|
||||
Rule sol89 1989 only - May 2 11:57:00s 0:03:00 -
|
||||
Rule sol89 1989 only - May 3 11:56:50s 0:03:10 -
|
||||
Rule sol89 1989 only - May 4 11:56:45s 0:03:15 -
|
||||
Rule sol89 1989 only - May 5 11:56:40s 0:03:20 -
|
||||
Rule sol89 1989 only - May 6 11:56:35s 0:03:25 -
|
||||
Rule sol89 1989 only - May 7 11:56:30s 0:03:30 -
|
||||
Rule sol89 1989 only - May 8 11:56:30s 0:03:30 -
|
||||
Rule sol89 1989 only - May 9 11:56:25s 0:03:35 -
|
||||
Rule sol89 1989 only - May 10 11:56:25s 0:03:35 -
|
||||
Rule sol89 1989 only - May 11 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 12 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 13 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 14 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 15 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 16 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 17 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - May 18 11:56:25s 0:03:35 -
|
||||
Rule sol89 1989 only - May 19 11:56:25s 0:03:35 -
|
||||
Rule sol89 1989 only - May 20 11:56:30s 0:03:30 -
|
||||
Rule sol89 1989 only - May 21 11:56:35s 0:03:25 -
|
||||
Rule sol89 1989 only - May 22 11:56:35s 0:03:25 -
|
||||
Rule sol89 1989 only - May 23 11:56:40s 0:03:20 -
|
||||
Rule sol89 1989 only - May 24 11:56:45s 0:03:15 -
|
||||
Rule sol89 1989 only - May 25 11:56:55s 0:03:05 -
|
||||
Rule sol89 1989 only - May 26 11:57:00s 0:03:00 -
|
||||
Rule sol89 1989 only - May 27 11:57:05s 0:02:55 -
|
||||
Rule sol89 1989 only - May 28 11:57:15s 0:02:45 -
|
||||
Rule sol89 1989 only - May 29 11:57:20s 0:02:40 -
|
||||
Rule sol89 1989 only - May 30 11:57:30s 0:02:30 -
|
||||
Rule sol89 1989 only - May 31 11:57:35s 0:02:25 -
|
||||
Rule sol89 1989 only - Jun 1 11:57:45s 0:02:15 -
|
||||
Rule sol89 1989 only - Jun 2 11:57:55s 0:02:05 -
|
||||
Rule sol89 1989 only - Jun 3 11:58:05s 0:01:55 -
|
||||
Rule sol89 1989 only - Jun 4 11:58:15s 0:01:45 -
|
||||
Rule sol89 1989 only - Jun 5 11:58:25s 0:01:35 -
|
||||
Rule sol89 1989 only - Jun 6 11:58:35s 0:01:25 -
|
||||
Rule sol89 1989 only - Jun 7 11:58:45s 0:01:15 -
|
||||
Rule sol89 1989 only - Jun 8 11:59:00s 0:01:00 -
|
||||
Rule sol89 1989 only - Jun 9 11:59:10s 0:00:50 -
|
||||
Rule sol89 1989 only - Jun 10 11:59:20s 0:00:40 -
|
||||
Rule sol89 1989 only - Jun 11 11:59:35s 0:00:25 -
|
||||
Rule sol89 1989 only - Jun 12 11:59:45s 0:00:15 -
|
||||
Rule sol89 1989 only - Jun 13 12:00:00s 0:00:00 -
|
||||
Rule sol89 1989 only - Jun 14 12:00:10s -0:00:10 -
|
||||
Rule sol89 1989 only - Jun 15 12:00:25s -0:00:25 -
|
||||
Rule sol89 1989 only - Jun 16 12:00:35s -0:00:35 -
|
||||
Rule sol89 1989 only - Jun 17 12:00:50s -0:00:50 -
|
||||
Rule sol89 1989 only - Jun 18 12:01:05s -0:01:05 -
|
||||
Rule sol89 1989 only - Jun 19 12:01:15s -0:01:15 -
|
||||
Rule sol89 1989 only - Jun 20 12:01:30s -0:01:30 -
|
||||
Rule sol89 1989 only - Jun 21 12:01:40s -0:01:40 -
|
||||
Rule sol89 1989 only - Jun 22 12:01:55s -0:01:55 -
|
||||
Rule sol89 1989 only - Jun 23 12:02:10s -0:02:10 -
|
||||
Rule sol89 1989 only - Jun 24 12:02:20s -0:02:20 -
|
||||
Rule sol89 1989 only - Jun 25 12:02:35s -0:02:35 -
|
||||
Rule sol89 1989 only - Jun 26 12:02:45s -0:02:45 -
|
||||
Rule sol89 1989 only - Jun 27 12:03:00s -0:03:00 -
|
||||
Rule sol89 1989 only - Jun 28 12:03:10s -0:03:10 -
|
||||
Rule sol89 1989 only - Jun 29 12:03:25s -0:03:25 -
|
||||
Rule sol89 1989 only - Jun 30 12:03:35s -0:03:35 -
|
||||
Rule sol89 1989 only - Jul 1 12:03:45s -0:03:45 -
|
||||
Rule sol89 1989 only - Jul 2 12:04:00s -0:04:00 -
|
||||
Rule sol89 1989 only - Jul 3 12:04:10s -0:04:10 -
|
||||
Rule sol89 1989 only - Jul 4 12:04:20s -0:04:20 -
|
||||
Rule sol89 1989 only - Jul 5 12:04:30s -0:04:30 -
|
||||
Rule sol89 1989 only - Jul 6 12:04:40s -0:04:40 -
|
||||
Rule sol89 1989 only - Jul 7 12:04:50s -0:04:50 -
|
||||
Rule sol89 1989 only - Jul 8 12:05:00s -0:05:00 -
|
||||
Rule sol89 1989 only - Jul 9 12:05:10s -0:05:10 -
|
||||
Rule sol89 1989 only - Jul 10 12:05:20s -0:05:20 -
|
||||
Rule sol89 1989 only - Jul 11 12:05:25s -0:05:25 -
|
||||
Rule sol89 1989 only - Jul 12 12:05:35s -0:05:35 -
|
||||
Rule sol89 1989 only - Jul 13 12:05:40s -0:05:40 -
|
||||
Rule sol89 1989 only - Jul 14 12:05:50s -0:05:50 -
|
||||
Rule sol89 1989 only - Jul 15 12:05:55s -0:05:55 -
|
||||
Rule sol89 1989 only - Jul 16 12:06:00s -0:06:00 -
|
||||
Rule sol89 1989 only - Jul 17 12:06:05s -0:06:05 -
|
||||
Rule sol89 1989 only - Jul 18 12:06:10s -0:06:10 -
|
||||
Rule sol89 1989 only - Jul 19 12:06:15s -0:06:15 -
|
||||
Rule sol89 1989 only - Jul 20 12:06:20s -0:06:20 -
|
||||
Rule sol89 1989 only - Jul 21 12:06:20s -0:06:20 -
|
||||
Rule sol89 1989 only - Jul 22 12:06:25s -0:06:25 -
|
||||
Rule sol89 1989 only - Jul 23 12:06:25s -0:06:25 -
|
||||
Rule sol89 1989 only - Jul 24 12:06:30s -0:06:30 -
|
||||
Rule sol89 1989 only - Jul 25 12:06:30s -0:06:30 -
|
||||
Rule sol89 1989 only - Jul 26 12:06:30s -0:06:30 -
|
||||
Rule sol89 1989 only - Jul 27 12:06:30s -0:06:30 -
|
||||
Rule sol89 1989 only - Jul 28 12:06:30s -0:06:30 -
|
||||
Rule sol89 1989 only - Jul 29 12:06:25s -0:06:25 -
|
||||
Rule sol89 1989 only - Jul 30 12:06:25s -0:06:25 -
|
||||
Rule sol89 1989 only - Jul 31 12:06:20s -0:06:20 -
|
||||
Rule sol89 1989 only - Aug 1 12:06:20s -0:06:20 -
|
||||
Rule sol89 1989 only - Aug 2 12:06:15s -0:06:15 -
|
||||
Rule sol89 1989 only - Aug 3 12:06:10s -0:06:10 -
|
||||
Rule sol89 1989 only - Aug 4 12:06:05s -0:06:05 -
|
||||
Rule sol89 1989 only - Aug 5 12:06:00s -0:06:00 -
|
||||
Rule sol89 1989 only - Aug 6 12:05:50s -0:05:50 -
|
||||
Rule sol89 1989 only - Aug 7 12:05:45s -0:05:45 -
|
||||
Rule sol89 1989 only - Aug 8 12:05:35s -0:05:35 -
|
||||
Rule sol89 1989 only - Aug 9 12:05:30s -0:05:30 -
|
||||
Rule sol89 1989 only - Aug 10 12:05:20s -0:05:20 -
|
||||
Rule sol89 1989 only - Aug 11 12:05:10s -0:05:10 -
|
||||
Rule sol89 1989 only - Aug 12 12:05:00s -0:05:00 -
|
||||
Rule sol89 1989 only - Aug 13 12:04:50s -0:04:50 -
|
||||
Rule sol89 1989 only - Aug 14 12:04:40s -0:04:40 -
|
||||
Rule sol89 1989 only - Aug 15 12:04:30s -0:04:30 -
|
||||
Rule sol89 1989 only - Aug 16 12:04:15s -0:04:15 -
|
||||
Rule sol89 1989 only - Aug 17 12:04:05s -0:04:05 -
|
||||
Rule sol89 1989 only - Aug 18 12:03:50s -0:03:50 -
|
||||
Rule sol89 1989 only - Aug 19 12:03:35s -0:03:35 -
|
||||
Rule sol89 1989 only - Aug 20 12:03:25s -0:03:25 -
|
||||
Rule sol89 1989 only - Aug 21 12:03:10s -0:03:10 -
|
||||
Rule sol89 1989 only - Aug 22 12:02:55s -0:02:55 -
|
||||
Rule sol89 1989 only - Aug 23 12:02:40s -0:02:40 -
|
||||
Rule sol89 1989 only - Aug 24 12:02:20s -0:02:20 -
|
||||
Rule sol89 1989 only - Aug 25 12:02:05s -0:02:05 -
|
||||
Rule sol89 1989 only - Aug 26 12:01:50s -0:01:50 -
|
||||
Rule sol89 1989 only - Aug 27 12:01:30s -0:01:30 -
|
||||
Rule sol89 1989 only - Aug 28 12:01:15s -0:01:15 -
|
||||
Rule sol89 1989 only - Aug 29 12:00:55s -0:00:55 -
|
||||
Rule sol89 1989 only - Aug 30 12:00:40s -0:00:40 -
|
||||
Rule sol89 1989 only - Aug 31 12:00:20s -0:00:20 -
|
||||
Rule sol89 1989 only - Sep 1 12:00:00s 0:00:00 -
|
||||
Rule sol89 1989 only - Sep 2 11:59:45s 0:00:15 -
|
||||
Rule sol89 1989 only - Sep 3 11:59:25s 0:00:35 -
|
||||
Rule sol89 1989 only - Sep 4 11:59:05s 0:00:55 -
|
||||
Rule sol89 1989 only - Sep 5 11:58:45s 0:01:15 -
|
||||
Rule sol89 1989 only - Sep 6 11:58:25s 0:01:35 -
|
||||
Rule sol89 1989 only - Sep 7 11:58:05s 0:01:55 -
|
||||
Rule sol89 1989 only - Sep 8 11:57:45s 0:02:15 -
|
||||
Rule sol89 1989 only - Sep 9 11:57:20s 0:02:40 -
|
||||
Rule sol89 1989 only - Sep 10 11:57:00s 0:03:00 -
|
||||
Rule sol89 1989 only - Sep 11 11:56:40s 0:03:20 -
|
||||
Rule sol89 1989 only - Sep 12 11:56:20s 0:03:40 -
|
||||
Rule sol89 1989 only - Sep 13 11:56:00s 0:04:00 -
|
||||
Rule sol89 1989 only - Sep 14 11:55:35s 0:04:25 -
|
||||
Rule sol89 1989 only - Sep 15 11:55:15s 0:04:45 -
|
||||
Rule sol89 1989 only - Sep 16 11:54:55s 0:05:05 -
|
||||
Rule sol89 1989 only - Sep 17 11:54:35s 0:05:25 -
|
||||
Rule sol89 1989 only - Sep 18 11:54:10s 0:05:50 -
|
||||
Rule sol89 1989 only - Sep 19 11:53:50s 0:06:10 -
|
||||
Rule sol89 1989 only - Sep 20 11:53:30s 0:06:30 -
|
||||
Rule sol89 1989 only - Sep 21 11:53:10s 0:06:50 -
|
||||
Rule sol89 1989 only - Sep 22 11:52:45s 0:07:15 -
|
||||
Rule sol89 1989 only - Sep 23 11:52:25s 0:07:35 -
|
||||
Rule sol89 1989 only - Sep 24 11:52:05s 0:07:55 -
|
||||
Rule sol89 1989 only - Sep 25 11:51:45s 0:08:15 -
|
||||
Rule sol89 1989 only - Sep 26 11:51:25s 0:08:35 -
|
||||
Rule sol89 1989 only - Sep 27 11:51:05s 0:08:55 -
|
||||
Rule sol89 1989 only - Sep 28 11:50:40s 0:09:20 -
|
||||
Rule sol89 1989 only - Sep 29 11:50:20s 0:09:40 -
|
||||
Rule sol89 1989 only - Sep 30 11:50:00s 0:10:00 -
|
||||
Rule sol89 1989 only - Oct 1 11:49:45s 0:10:15 -
|
||||
Rule sol89 1989 only - Oct 2 11:49:25s 0:10:35 -
|
||||
Rule sol89 1989 only - Oct 3 11:49:05s 0:10:55 -
|
||||
Rule sol89 1989 only - Oct 4 11:48:45s 0:11:15 -
|
||||
Rule sol89 1989 only - Oct 5 11:48:30s 0:11:30 -
|
||||
Rule sol89 1989 only - Oct 6 11:48:10s 0:11:50 -
|
||||
Rule sol89 1989 only - Oct 7 11:47:50s 0:12:10 -
|
||||
Rule sol89 1989 only - Oct 8 11:47:35s 0:12:25 -
|
||||
Rule sol89 1989 only - Oct 9 11:47:20s 0:12:40 -
|
||||
Rule sol89 1989 only - Oct 10 11:47:00s 0:13:00 -
|
||||
Rule sol89 1989 only - Oct 11 11:46:45s 0:13:15 -
|
||||
Rule sol89 1989 only - Oct 12 11:46:30s 0:13:30 -
|
||||
Rule sol89 1989 only - Oct 13 11:46:15s 0:13:45 -
|
||||
Rule sol89 1989 only - Oct 14 11:46:00s 0:14:00 -
|
||||
Rule sol89 1989 only - Oct 15 11:45:50s 0:14:10 -
|
||||
Rule sol89 1989 only - Oct 16 11:45:35s 0:14:25 -
|
||||
Rule sol89 1989 only - Oct 17 11:45:20s 0:14:40 -
|
||||
Rule sol89 1989 only - Oct 18 11:45:10s 0:14:50 -
|
||||
Rule sol89 1989 only - Oct 19 11:45:00s 0:15:00 -
|
||||
Rule sol89 1989 only - Oct 20 11:44:50s 0:15:10 -
|
||||
Rule sol89 1989 only - Oct 21 11:44:40s 0:15:20 -
|
||||
Rule sol89 1989 only - Oct 22 11:44:30s 0:15:30 -
|
||||
Rule sol89 1989 only - Oct 23 11:44:20s 0:15:40 -
|
||||
Rule sol89 1989 only - Oct 24 11:44:10s 0:15:50 -
|
||||
Rule sol89 1989 only - Oct 25 11:44:05s 0:15:55 -
|
||||
Rule sol89 1989 only - Oct 26 11:44:00s 0:16:00 -
|
||||
Rule sol89 1989 only - Oct 27 11:43:50s 0:16:10 -
|
||||
Rule sol89 1989 only - Oct 28 11:43:45s 0:16:15 -
|
||||
Rule sol89 1989 only - Oct 29 11:43:40s 0:16:20 -
|
||||
Rule sol89 1989 only - Oct 30 11:43:40s 0:16:20 -
|
||||
Rule sol89 1989 only - Oct 31 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 1 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 2 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 3 11:43:30s 0:16:30 -
|
||||
Rule sol89 1989 only - Nov 4 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 5 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 6 11:43:35s 0:16:25 -
|
||||
Rule sol89 1989 only - Nov 7 11:43:40s 0:16:20 -
|
||||
Rule sol89 1989 only - Nov 8 11:43:45s 0:16:15 -
|
||||
Rule sol89 1989 only - Nov 9 11:43:50s 0:16:10 -
|
||||
Rule sol89 1989 only - Nov 10 11:43:55s 0:16:05 -
|
||||
Rule sol89 1989 only - Nov 11 11:44:00s 0:16:00 -
|
||||
Rule sol89 1989 only - Nov 12 11:44:05s 0:15:55 -
|
||||
Rule sol89 1989 only - Nov 13 11:44:15s 0:15:45 -
|
||||
Rule sol89 1989 only - Nov 14 11:44:25s 0:15:35 -
|
||||
Rule sol89 1989 only - Nov 15 11:44:35s 0:15:25 -
|
||||
Rule sol89 1989 only - Nov 16 11:44:45s 0:15:15 -
|
||||
Rule sol89 1989 only - Nov 17 11:44:55s 0:15:05 -
|
||||
Rule sol89 1989 only - Nov 18 11:45:10s 0:14:50 -
|
||||
Rule sol89 1989 only - Nov 19 11:45:20s 0:14:40 -
|
||||
Rule sol89 1989 only - Nov 20 11:45:35s 0:14:25 -
|
||||
Rule sol89 1989 only - Nov 21 11:45:50s 0:14:10 -
|
||||
Rule sol89 1989 only - Nov 22 11:46:05s 0:13:55 -
|
||||
Rule sol89 1989 only - Nov 23 11:46:25s 0:13:35 -
|
||||
Rule sol89 1989 only - Nov 24 11:46:40s 0:13:20 -
|
||||
Rule sol89 1989 only - Nov 25 11:47:00s 0:13:00 -
|
||||
Rule sol89 1989 only - Nov 26 11:47:20s 0:12:40 -
|
||||
Rule sol89 1989 only - Nov 27 11:47:35s 0:12:25 -
|
||||
Rule sol89 1989 only - Nov 28 11:47:55s 0:12:05 -
|
||||
Rule sol89 1989 only - Nov 29 11:48:20s 0:11:40 -
|
||||
Rule sol89 1989 only - Nov 30 11:48:40s 0:11:20 -
|
||||
Rule sol89 1989 only - Dec 1 11:49:00s 0:11:00 -
|
||||
Rule sol89 1989 only - Dec 2 11:49:25s 0:10:35 -
|
||||
Rule sol89 1989 only - Dec 3 11:49:50s 0:10:10 -
|
||||
Rule sol89 1989 only - Dec 4 11:50:15s 0:09:45 -
|
||||
Rule sol89 1989 only - Dec 5 11:50:35s 0:09:25 -
|
||||
Rule sol89 1989 only - Dec 6 11:51:00s 0:09:00 -
|
||||
Rule sol89 1989 only - Dec 7 11:51:30s 0:08:30 -
|
||||
Rule sol89 1989 only - Dec 8 11:51:55s 0:08:05 -
|
||||
Rule sol89 1989 only - Dec 9 11:52:20s 0:07:40 -
|
||||
Rule sol89 1989 only - Dec 10 11:52:50s 0:07:10 -
|
||||
Rule sol89 1989 only - Dec 11 11:53:15s 0:06:45 -
|
||||
Rule sol89 1989 only - Dec 12 11:53:45s 0:06:15 -
|
||||
Rule sol89 1989 only - Dec 13 11:54:10s 0:05:50 -
|
||||
Rule sol89 1989 only - Dec 14 11:54:40s 0:05:20 -
|
||||
Rule sol89 1989 only - Dec 15 11:55:10s 0:04:50 -
|
||||
Rule sol89 1989 only - Dec 16 11:55:40s 0:04:20 -
|
||||
Rule sol89 1989 only - Dec 17 11:56:05s 0:03:55 -
|
||||
Rule sol89 1989 only - Dec 18 11:56:35s 0:03:25 -
|
||||
Rule sol89 1989 only - Dec 19 11:57:05s 0:02:55 -
|
||||
Rule sol89 1989 only - Dec 20 11:57:35s 0:02:25 -
|
||||
Rule sol89 1989 only - Dec 21 11:58:05s 0:01:55 -
|
||||
Rule sol89 1989 only - Dec 22 11:58:35s 0:01:25 -
|
||||
Rule sol89 1989 only - Dec 23 11:59:05s 0:00:55 -
|
||||
Rule sol89 1989 only - Dec 24 11:59:35s 0:00:25 -
|
||||
Rule sol89 1989 only - Dec 25 12:00:05s -0:00:05 -
|
||||
Rule sol89 1989 only - Dec 26 12:00:35s -0:00:35 -
|
||||
Rule sol89 1989 only - Dec 27 12:01:05s -0:01:05 -
|
||||
Rule sol89 1989 only - Dec 28 12:01:35s -0:01:35 -
|
||||
Rule sol89 1989 only - Dec 29 12:02:00s -0:02:00 -
|
||||
Rule sol89 1989 only - Dec 30 12:02:30s -0:02:30 -
|
||||
Rule sol89 1989 only - Dec 31 12:03:00s -0:03:00 -
|
||||
|
||||
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
|
||||
# Before and after 1989, we'll operate on local mean solar time.
|
||||
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
Zone Asia/Riyadh89 3:07:04 - zzz 1989
|
||||
3:07:04 sol89 zzz 1990
|
||||
3:07:04 - zzz
|
||||
# For backward compatibility...
|
||||
Link Asia/Riyadh89 Mideast/Riyadh89
|
||||
Vendored
+1711
File diff suppressed because it is too large
Load Diff
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Old rules, should the need arise.
|
||||
# No attempt is made to handle Newfoundland, since it cannot be expressed
|
||||
# using the System V "TZ" scheme (half-hour offset), or anything outside
|
||||
# North America (no support for non-standard DST start/end dates), nor
|
||||
# the changes in the DST rules in the US after 1976 (which occurred after
|
||||
# the old rules were written).
|
||||
#
|
||||
# If you need the old rules, uncomment ## lines.
|
||||
# Compile this *without* leap second correction for true conformance.
|
||||
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule SystemV min 1973 - Apr lastSun 2:00 1:00 D
|
||||
Rule SystemV min 1973 - Oct lastSun 2:00 0 S
|
||||
Rule SystemV 1974 only - Jan 6 2:00 1:00 D
|
||||
Rule SystemV 1974 only - Nov lastSun 2:00 0 S
|
||||
Rule SystemV 1975 only - Feb 23 2:00 1:00 D
|
||||
Rule SystemV 1975 only - Oct lastSun 2:00 0 S
|
||||
Rule SystemV 1976 max - Apr lastSun 2:00 1:00 D
|
||||
Rule SystemV 1976 max - Oct lastSun 2:00 0 S
|
||||
|
||||
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
|
||||
## Zone SystemV/AST4ADT -4:00 SystemV A%sT
|
||||
## Zone SystemV/EST5EDT -5:00 SystemV E%sT
|
||||
## Zone SystemV/CST6CDT -6:00 SystemV C%sT
|
||||
## Zone SystemV/MST7MDT -7:00 SystemV M%sT
|
||||
## Zone SystemV/PST8PDT -8:00 SystemV P%sT
|
||||
## Zone SystemV/YST9YDT -9:00 SystemV Y%sT
|
||||
## Zone SystemV/AST4 -4:00 - AST
|
||||
## Zone SystemV/EST5 -5:00 - EST
|
||||
## Zone SystemV/CST6 -6:00 - CST
|
||||
## Zone SystemV/MST7 -7:00 - MST
|
||||
## Zone SystemV/PST8 -8:00 - PST
|
||||
## Zone SystemV/YST9 -9:00 - YST
|
||||
## Zone SystemV/HST10 -10:00 - HST
|
||||
Projects/Panel/Resources/Themes/matrixBt5/vendor/libs/flot/examples/axes-time-zones/tz/yearistype.sh
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
#! /bin/sh
|
||||
|
||||
: 'This file is in the public domain, so clarified as of'
|
||||
: '2006-07-17 by Arthur David Olson.'
|
||||
|
||||
case $#-$1 in
|
||||
2-|2-0*|2-*[!0-9]*)
|
||||
echo "$0: wild year - $1" >&2
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
case $#-$2 in
|
||||
2-even)
|
||||
case $1 in
|
||||
*[24680]) exit 0 ;;
|
||||
*) exit 1 ;;
|
||||
esac ;;
|
||||
2-nonpres|2-nonuspres)
|
||||
case $1 in
|
||||
*[02468][048]|*[13579][26]) exit 1 ;;
|
||||
*) exit 0 ;;
|
||||
esac ;;
|
||||
2-odd)
|
||||
case $1 in
|
||||
*[13579]) exit 0 ;;
|
||||
*) exit 1 ;;
|
||||
esac ;;
|
||||
2-uspres)
|
||||
case $1 in
|
||||
*[02468][048]|*[13579][26]) exit 0 ;;
|
||||
*) exit 1 ;;
|
||||
esac ;;
|
||||
2-*)
|
||||
echo "$0: wild type - $2" >&2 ;;
|
||||
esac
|
||||
|
||||
echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
|
||||
exit 1
|
||||
Vendored
+441
@@ -0,0 +1,441 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
#
|
||||
# TZ zone descriptions
|
||||
#
|
||||
# From Paul Eggert (1996-08-05):
|
||||
#
|
||||
# This file contains a table with the following columns:
|
||||
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
|
||||
# 2. Latitude and longitude of the zone's principal location
|
||||
# in ISO 6709 sign-degrees-minutes-seconds format,
|
||||
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
|
||||
# first latitude (+ is north), then longitude (+ is east).
|
||||
# 3. Zone name used in value of TZ environment variable.
|
||||
# 4. Comments; present if and only if the country has multiple rows.
|
||||
#
|
||||
# Columns are separated by a single tab.
|
||||
# The table is sorted first by country, then an order within the country that
|
||||
# (1) makes some geographical sense, and
|
||||
# (2) puts the most populous zones first, where that does not contradict (1).
|
||||
#
|
||||
# Lines beginning with `#' are comments.
|
||||
#
|
||||
#country-
|
||||
#code coordinates TZ comments
|
||||
AD +4230+00131 Europe/Andorra
|
||||
AE +2518+05518 Asia/Dubai
|
||||
AF +3431+06912 Asia/Kabul
|
||||
AG +1703-06148 America/Antigua
|
||||
AI +1812-06304 America/Anguilla
|
||||
AL +4120+01950 Europe/Tirane
|
||||
AM +4011+04430 Asia/Yerevan
|
||||
AO -0848+01314 Africa/Luanda
|
||||
AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
|
||||
AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
|
||||
AQ -6734-06808 Antarctica/Rothera Rothera Station, Adelaide Island
|
||||
AQ -6448-06406 Antarctica/Palmer Palmer Station, Anvers Island
|
||||
AQ -6736+06253 Antarctica/Mawson Mawson Station, Holme Bay
|
||||
AQ -6835+07758 Antarctica/Davis Davis Station, Vestfold Hills
|
||||
AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
|
||||
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
|
||||
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
|
||||
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
|
||||
AQ -5430+15857 Antarctica/Macquarie Macquarie Island Station, Macquarie Island
|
||||
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
|
||||
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
|
||||
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
|
||||
AR -2411-06518 America/Argentina/Jujuy Jujuy (JY)
|
||||
AR -2649-06513 America/Argentina/Tucuman Tucuman (TM)
|
||||
AR -2828-06547 America/Argentina/Catamarca Catamarca (CT), Chubut (CH)
|
||||
AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR)
|
||||
AR -3132-06831 America/Argentina/San_Juan San Juan (SJ)
|
||||
AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ)
|
||||
AR -3319-06621 America/Argentina/San_Luis San Luis (SL)
|
||||
AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC)
|
||||
AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF)
|
||||
AS -1416-17042 Pacific/Pago_Pago
|
||||
AT +4813+01620 Europe/Vienna
|
||||
AU -3133+15905 Australia/Lord_Howe Lord Howe Island
|
||||
AU -4253+14719 Australia/Hobart Tasmania - most locations
|
||||
AU -3956+14352 Australia/Currie Tasmania - King Island
|
||||
AU -3749+14458 Australia/Melbourne Victoria
|
||||
AU -3352+15113 Australia/Sydney New South Wales - most locations
|
||||
AU -3157+14127 Australia/Broken_Hill New South Wales - Yancowinna
|
||||
AU -2728+15302 Australia/Brisbane Queensland - most locations
|
||||
AU -2016+14900 Australia/Lindeman Queensland - Holiday Islands
|
||||
AU -3455+13835 Australia/Adelaide South Australia
|
||||
AU -1228+13050 Australia/Darwin Northern Territory
|
||||
AU -3157+11551 Australia/Perth Western Australia - most locations
|
||||
AU -3143+12852 Australia/Eucla Western Australia - Eucla area
|
||||
AW +1230-06958 America/Aruba
|
||||
AX +6006+01957 Europe/Mariehamn
|
||||
AZ +4023+04951 Asia/Baku
|
||||
BA +4352+01825 Europe/Sarajevo
|
||||
BB +1306-05937 America/Barbados
|
||||
BD +2343+09025 Asia/Dhaka
|
||||
BE +5050+00420 Europe/Brussels
|
||||
BF +1222-00131 Africa/Ouagadougou
|
||||
BG +4241+02319 Europe/Sofia
|
||||
BH +2623+05035 Asia/Bahrain
|
||||
BI -0323+02922 Africa/Bujumbura
|
||||
BJ +0629+00237 Africa/Porto-Novo
|
||||
BL +1753-06251 America/St_Barthelemy
|
||||
BM +3217-06446 Atlantic/Bermuda
|
||||
BN +0456+11455 Asia/Brunei
|
||||
BO -1630-06809 America/La_Paz
|
||||
BQ +120903-0681636 America/Kralendijk
|
||||
BR -0351-03225 America/Noronha Atlantic islands
|
||||
BR -0127-04829 America/Belem Amapa, E Para
|
||||
BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
|
||||
BR -0803-03454 America/Recife Pernambuco
|
||||
BR -0712-04812 America/Araguaina Tocantins
|
||||
BR -0940-03543 America/Maceio Alagoas, Sergipe
|
||||
BR -1259-03831 America/Bahia Bahia
|
||||
BR -2332-04637 America/Sao_Paulo S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)
|
||||
BR -2027-05437 America/Campo_Grande Mato Grosso do Sul
|
||||
BR -1535-05605 America/Cuiaba Mato Grosso
|
||||
BR -0226-05452 America/Santarem W Para
|
||||
BR -0846-06354 America/Porto_Velho Rondonia
|
||||
BR +0249-06040 America/Boa_Vista Roraima
|
||||
BR -0308-06001 America/Manaus E Amazonas
|
||||
BR -0640-06952 America/Eirunepe W Amazonas
|
||||
BR -0958-06748 America/Rio_Branco Acre
|
||||
BS +2505-07721 America/Nassau
|
||||
BT +2728+08939 Asia/Thimphu
|
||||
BW -2439+02555 Africa/Gaborone
|
||||
BY +5354+02734 Europe/Minsk
|
||||
BZ +1730-08812 America/Belize
|
||||
CA +4734-05243 America/St_Johns Newfoundland Time, including SE Labrador
|
||||
CA +4439-06336 America/Halifax Atlantic Time - Nova Scotia (most places), PEI
|
||||
CA +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971
|
||||
CA +4606-06447 America/Moncton Atlantic Time - New Brunswick
|
||||
CA +5320-06025 America/Goose_Bay Atlantic Time - Labrador - most locations
|
||||
CA +5125-05707 America/Blanc-Sablon Atlantic Standard Time - Quebec - Lower North Shore
|
||||
CA +4531-07334 America/Montreal Eastern Time - Quebec - most locations
|
||||
CA +4339-07923 America/Toronto Eastern Time - Ontario - most locations
|
||||
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
|
||||
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
|
||||
CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut - most locations
|
||||
CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
|
||||
CA +744144-0944945 America/Resolute Central Standard Time - Resolute, Nunavut
|
||||
CA +484531-0913718 America/Atikokan Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
|
||||
CA +624900-0920459 America/Rankin_Inlet Central Time - central Nunavut
|
||||
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
|
||||
CA +4843-09434 America/Rainy_River Central Time - Rainy River & Fort Frances, Ontario
|
||||
CA +5024-10439 America/Regina Central Standard Time - Saskatchewan - most locations
|
||||
CA +5017-10750 America/Swift_Current Central Standard Time - Saskatchewan - midwest
|
||||
CA +5333-11328 America/Edmonton Mountain Time - Alberta, east British Columbia & west Saskatchewan
|
||||
CA +690650-1050310 America/Cambridge_Bay Mountain Time - west Nunavut
|
||||
CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
|
||||
CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories
|
||||
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
|
||||
CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
|
||||
CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
|
||||
CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
|
||||
CA +6404-13925 America/Dawson Pacific Time - north Yukon
|
||||
CC -1210+09655 Indian/Cocos
|
||||
CD -0418+01518 Africa/Kinshasa west Dem. Rep. of Congo
|
||||
CD -1140+02728 Africa/Lubumbashi east Dem. Rep. of Congo
|
||||
CF +0422+01835 Africa/Bangui
|
||||
CG -0416+01517 Africa/Brazzaville
|
||||
CH +4723+00832 Europe/Zurich
|
||||
CI +0519-00402 Africa/Abidjan
|
||||
CK -2114-15946 Pacific/Rarotonga
|
||||
CL -3327-07040 America/Santiago most locations
|
||||
CL -2709-10926 Pacific/Easter Easter Island & Sala y Gomez
|
||||
CM +0403+00942 Africa/Douala
|
||||
CN +3114+12128 Asia/Shanghai east China - Beijing, Guangdong, Shanghai, etc.
|
||||
CN +4545+12641 Asia/Harbin Heilongjiang (except Mohe), Jilin
|
||||
CN +2934+10635 Asia/Chongqing central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
|
||||
CN +4348+08735 Asia/Urumqi most of Tibet & Xinjiang
|
||||
CN +3929+07559 Asia/Kashgar west Tibet & Xinjiang
|
||||
CO +0436-07405 America/Bogota
|
||||
CR +0956-08405 America/Costa_Rica
|
||||
CU +2308-08222 America/Havana
|
||||
CV +1455-02331 Atlantic/Cape_Verde
|
||||
CW +1211-06900 America/Curacao
|
||||
CX -1025+10543 Indian/Christmas
|
||||
CY +3510+03322 Asia/Nicosia
|
||||
CZ +5005+01426 Europe/Prague
|
||||
DE +5230+01322 Europe/Berlin
|
||||
DJ +1136+04309 Africa/Djibouti
|
||||
DK +5540+01235 Europe/Copenhagen
|
||||
DM +1518-06124 America/Dominica
|
||||
DO +1828-06954 America/Santo_Domingo
|
||||
DZ +3647+00303 Africa/Algiers
|
||||
EC -0210-07950 America/Guayaquil mainland
|
||||
EC -0054-08936 Pacific/Galapagos Galapagos Islands
|
||||
EE +5925+02445 Europe/Tallinn
|
||||
EG +3003+03115 Africa/Cairo
|
||||
EH +2709-01312 Africa/El_Aaiun
|
||||
ER +1520+03853 Africa/Asmara
|
||||
ES +4024-00341 Europe/Madrid mainland
|
||||
ES +3553-00519 Africa/Ceuta Ceuta & Melilla
|
||||
ES +2806-01524 Atlantic/Canary Canary Islands
|
||||
ET +0902+03842 Africa/Addis_Ababa
|
||||
FI +6010+02458 Europe/Helsinki
|
||||
FJ -1808+17825 Pacific/Fiji
|
||||
FK -5142-05751 Atlantic/Stanley
|
||||
FM +0725+15147 Pacific/Chuuk Chuuk (Truk) and Yap
|
||||
FM +0658+15813 Pacific/Pohnpei Pohnpei (Ponape)
|
||||
FM +0519+16259 Pacific/Kosrae Kosrae
|
||||
FO +6201-00646 Atlantic/Faroe
|
||||
FR +4852+00220 Europe/Paris
|
||||
GA +0023+00927 Africa/Libreville
|
||||
GB +513030-0000731 Europe/London
|
||||
GD +1203-06145 America/Grenada
|
||||
GE +4143+04449 Asia/Tbilisi
|
||||
GF +0456-05220 America/Cayenne
|
||||
GG +4927-00232 Europe/Guernsey
|
||||
GH +0533-00013 Africa/Accra
|
||||
GI +3608-00521 Europe/Gibraltar
|
||||
GL +6411-05144 America/Godthab most locations
|
||||
GL +7646-01840 America/Danmarkshavn east coast, north of Scoresbysund
|
||||
GL +7029-02158 America/Scoresbysund Scoresbysund / Ittoqqortoormiit
|
||||
GL +7634-06847 America/Thule Thule / Pituffik
|
||||
GM +1328-01639 Africa/Banjul
|
||||
GN +0931-01343 Africa/Conakry
|
||||
GP +1614-06132 America/Guadeloupe
|
||||
GQ +0345+00847 Africa/Malabo
|
||||
GR +3758+02343 Europe/Athens
|
||||
GS -5416-03632 Atlantic/South_Georgia
|
||||
GT +1438-09031 America/Guatemala
|
||||
GU +1328+14445 Pacific/Guam
|
||||
GW +1151-01535 Africa/Bissau
|
||||
GY +0648-05810 America/Guyana
|
||||
HK +2217+11409 Asia/Hong_Kong
|
||||
HN +1406-08713 America/Tegucigalpa
|
||||
HR +4548+01558 Europe/Zagreb
|
||||
HT +1832-07220 America/Port-au-Prince
|
||||
HU +4730+01905 Europe/Budapest
|
||||
ID -0610+10648 Asia/Jakarta Java & Sumatra
|
||||
ID -0002+10920 Asia/Pontianak west & central Borneo
|
||||
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
|
||||
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
|
||||
IE +5320-00615 Europe/Dublin
|
||||
IL +3146+03514 Asia/Jerusalem
|
||||
IM +5409-00428 Europe/Isle_of_Man
|
||||
IN +2232+08822 Asia/Kolkata
|
||||
IO -0720+07225 Indian/Chagos
|
||||
IQ +3321+04425 Asia/Baghdad
|
||||
IR +3540+05126 Asia/Tehran
|
||||
IS +6409-02151 Atlantic/Reykjavik
|
||||
IT +4154+01229 Europe/Rome
|
||||
JE +4912-00207 Europe/Jersey
|
||||
JM +1800-07648 America/Jamaica
|
||||
JO +3157+03556 Asia/Amman
|
||||
JP +353916+1394441 Asia/Tokyo
|
||||
KE -0117+03649 Africa/Nairobi
|
||||
KG +4254+07436 Asia/Bishkek
|
||||
KH +1133+10455 Asia/Phnom_Penh
|
||||
KI +0125+17300 Pacific/Tarawa Gilbert Islands
|
||||
KI -0308-17105 Pacific/Enderbury Phoenix Islands
|
||||
KI +0152-15720 Pacific/Kiritimati Line Islands
|
||||
KM -1141+04316 Indian/Comoro
|
||||
KN +1718-06243 America/St_Kitts
|
||||
KP +3901+12545 Asia/Pyongyang
|
||||
KR +3733+12658 Asia/Seoul
|
||||
KW +2920+04759 Asia/Kuwait
|
||||
KY +1918-08123 America/Cayman
|
||||
KZ +4315+07657 Asia/Almaty most locations
|
||||
KZ +4448+06528 Asia/Qyzylorda Qyzylorda (Kyzylorda, Kzyl-Orda)
|
||||
KZ +5017+05710 Asia/Aqtobe Aqtobe (Aktobe)
|
||||
KZ +4431+05016 Asia/Aqtau Atyrau (Atirau, Gur'yev), Mangghystau (Mankistau)
|
||||
KZ +5113+05121 Asia/Oral West Kazakhstan
|
||||
LA +1758+10236 Asia/Vientiane
|
||||
LB +3353+03530 Asia/Beirut
|
||||
LC +1401-06100 America/St_Lucia
|
||||
LI +4709+00931 Europe/Vaduz
|
||||
LK +0656+07951 Asia/Colombo
|
||||
LR +0618-01047 Africa/Monrovia
|
||||
LS -2928+02730 Africa/Maseru
|
||||
LT +5441+02519 Europe/Vilnius
|
||||
LU +4936+00609 Europe/Luxembourg
|
||||
LV +5657+02406 Europe/Riga
|
||||
LY +3254+01311 Africa/Tripoli
|
||||
MA +3339-00735 Africa/Casablanca
|
||||
MC +4342+00723 Europe/Monaco
|
||||
MD +4700+02850 Europe/Chisinau
|
||||
ME +4226+01916 Europe/Podgorica
|
||||
MF +1804-06305 America/Marigot
|
||||
MG -1855+04731 Indian/Antananarivo
|
||||
MH +0709+17112 Pacific/Majuro most locations
|
||||
MH +0905+16720 Pacific/Kwajalein Kwajalein
|
||||
MK +4159+02126 Europe/Skopje
|
||||
ML +1239-00800 Africa/Bamako
|
||||
MM +1647+09610 Asia/Rangoon
|
||||
MN +4755+10653 Asia/Ulaanbaatar most locations
|
||||
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
|
||||
MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
|
||||
MO +2214+11335 Asia/Macau
|
||||
MP +1512+14545 Pacific/Saipan
|
||||
MQ +1436-06105 America/Martinique
|
||||
MR +1806-01557 Africa/Nouakchott
|
||||
MS +1643-06213 America/Montserrat
|
||||
MT +3554+01431 Europe/Malta
|
||||
MU -2010+05730 Indian/Mauritius
|
||||
MV +0410+07330 Indian/Maldives
|
||||
MW -1547+03500 Africa/Blantyre
|
||||
MX +1924-09909 America/Mexico_City Central Time - most locations
|
||||
MX +2105-08646 America/Cancun Central Time - Quintana Roo
|
||||
MX +2058-08937 America/Merida Central Time - Campeche, Yucatan
|
||||
MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border
|
||||
MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border
|
||||
MX +2313-10625 America/Mazatlan Mountain Time - S Baja, Nayarit, Sinaloa
|
||||
MX +2838-10605 America/Chihuahua Mexican Mountain Time - Chihuahua away from US border
|
||||
MX +2934-10425 America/Ojinaga US Mountain Time - Chihuahua near US border
|
||||
MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora
|
||||
MX +3232-11701 America/Tijuana US Pacific Time - Baja California near US border
|
||||
MX +3018-11452 America/Santa_Isabel Mexican Pacific Time - Baja California away from US border
|
||||
MX +2048-10515 America/Bahia_Banderas Mexican Central Time - Bahia de Banderas
|
||||
MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia
|
||||
MY +0133+11020 Asia/Kuching Sabah & Sarawak
|
||||
MZ -2558+03235 Africa/Maputo
|
||||
NA -2234+01706 Africa/Windhoek
|
||||
NC -2216+16627 Pacific/Noumea
|
||||
NE +1331+00207 Africa/Niamey
|
||||
NF -2903+16758 Pacific/Norfolk
|
||||
NG +0627+00324 Africa/Lagos
|
||||
NI +1209-08617 America/Managua
|
||||
NL +5222+00454 Europe/Amsterdam
|
||||
NO +5955+01045 Europe/Oslo
|
||||
NP +2743+08519 Asia/Kathmandu
|
||||
NR -0031+16655 Pacific/Nauru
|
||||
NU -1901-16955 Pacific/Niue
|
||||
NZ -3652+17446 Pacific/Auckland most locations
|
||||
NZ -4357-17633 Pacific/Chatham Chatham Islands
|
||||
OM +2336+05835 Asia/Muscat
|
||||
PA +0858-07932 America/Panama
|
||||
PE -1203-07703 America/Lima
|
||||
PF -1732-14934 Pacific/Tahiti Society Islands
|
||||
PF -0900-13930 Pacific/Marquesas Marquesas Islands
|
||||
PF -2308-13457 Pacific/Gambier Gambier Islands
|
||||
PG -0930+14710 Pacific/Port_Moresby
|
||||
PH +1435+12100 Asia/Manila
|
||||
PK +2452+06703 Asia/Karachi
|
||||
PL +5215+02100 Europe/Warsaw
|
||||
PM +4703-05620 America/Miquelon
|
||||
PN -2504-13005 Pacific/Pitcairn
|
||||
PR +182806-0660622 America/Puerto_Rico
|
||||
PS +3130+03428 Asia/Gaza Gaza Strip
|
||||
PS +313200+0350542 Asia/Hebron West Bank
|
||||
PT +3843-00908 Europe/Lisbon mainland
|
||||
PT +3238-01654 Atlantic/Madeira Madeira Islands
|
||||
PT +3744-02540 Atlantic/Azores Azores
|
||||
PW +0720+13429 Pacific/Palau
|
||||
PY -2516-05740 America/Asuncion
|
||||
QA +2517+05132 Asia/Qatar
|
||||
RE -2052+05528 Indian/Reunion
|
||||
RO +4426+02606 Europe/Bucharest
|
||||
RS +4450+02030 Europe/Belgrade
|
||||
RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
|
||||
RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
|
||||
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
|
||||
RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia
|
||||
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
|
||||
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
|
||||
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
|
||||
RU +5345+08707 Asia/Novokuznetsk Moscow+03 - Novokuznetsk
|
||||
RU +5601+09250 Asia/Krasnoyarsk Moscow+04 - Yenisei River
|
||||
RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal
|
||||
RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River
|
||||
RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River
|
||||
RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island
|
||||
RU +5934+15048 Asia/Magadan Moscow+08 - Magadan
|
||||
RU +5301+15839 Asia/Kamchatka Moscow+08 - Kamchatka
|
||||
RU +6445+17729 Asia/Anadyr Moscow+08 - Bering Sea
|
||||
RW -0157+03004 Africa/Kigali
|
||||
SA +2438+04643 Asia/Riyadh
|
||||
SB -0932+16012 Pacific/Guadalcanal
|
||||
SC -0440+05528 Indian/Mahe
|
||||
SD +1536+03232 Africa/Khartoum
|
||||
SE +5920+01803 Europe/Stockholm
|
||||
SG +0117+10351 Asia/Singapore
|
||||
SH -1555-00542 Atlantic/St_Helena
|
||||
SI +4603+01431 Europe/Ljubljana
|
||||
SJ +7800+01600 Arctic/Longyearbyen
|
||||
SK +4809+01707 Europe/Bratislava
|
||||
SL +0830-01315 Africa/Freetown
|
||||
SM +4355+01228 Europe/San_Marino
|
||||
SN +1440-01726 Africa/Dakar
|
||||
SO +0204+04522 Africa/Mogadishu
|
||||
SR +0550-05510 America/Paramaribo
|
||||
SS +0451+03136 Africa/Juba
|
||||
ST +0020+00644 Africa/Sao_Tome
|
||||
SV +1342-08912 America/El_Salvador
|
||||
SX +180305-0630250 America/Lower_Princes
|
||||
SY +3330+03618 Asia/Damascus
|
||||
SZ -2618+03106 Africa/Mbabane
|
||||
TC +2128-07108 America/Grand_Turk
|
||||
TD +1207+01503 Africa/Ndjamena
|
||||
TF -492110+0701303 Indian/Kerguelen
|
||||
TG +0608+00113 Africa/Lome
|
||||
TH +1345+10031 Asia/Bangkok
|
||||
TJ +3835+06848 Asia/Dushanbe
|
||||
TK -0922-17114 Pacific/Fakaofo
|
||||
TL -0833+12535 Asia/Dili
|
||||
TM +3757+05823 Asia/Ashgabat
|
||||
TN +3648+01011 Africa/Tunis
|
||||
TO -2110-17510 Pacific/Tongatapu
|
||||
TR +4101+02858 Europe/Istanbul
|
||||
TT +1039-06131 America/Port_of_Spain
|
||||
TV -0831+17913 Pacific/Funafuti
|
||||
TW +2503+12130 Asia/Taipei
|
||||
TZ -0648+03917 Africa/Dar_es_Salaam
|
||||
UA +5026+03031 Europe/Kiev most locations
|
||||
UA +4837+02218 Europe/Uzhgorod Ruthenia
|
||||
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
|
||||
UA +4457+03406 Europe/Simferopol central Crimea
|
||||
UG +0019+03225 Africa/Kampala
|
||||
UM +1645-16931 Pacific/Johnston Johnston Atoll
|
||||
UM +2813-17722 Pacific/Midway Midway Islands
|
||||
UM +1917+16637 Pacific/Wake Wake Island
|
||||
US +404251-0740023 America/New_York Eastern Time
|
||||
US +421953-0830245 America/Detroit Eastern Time - Michigan - most locations
|
||||
US +381515-0854534 America/Kentucky/Louisville Eastern Time - Kentucky - Louisville area
|
||||
US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County
|
||||
US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations
|
||||
US +384038-0873143 America/Indiana/Vincennes Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
|
||||
US +410305-0863611 America/Indiana/Winamac Eastern Time - Indiana - Pulaski County
|
||||
US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County
|
||||
US +382931-0871643 America/Indiana/Petersburg Eastern Time - Indiana - Pike County
|
||||
US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County
|
||||
US +415100-0873900 America/Chicago Central Time
|
||||
US +375711-0864541 America/Indiana/Tell_City Central Time - Indiana - Perry County
|
||||
US +411745-0863730 America/Indiana/Knox Central Time - Indiana - Starke County
|
||||
US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
|
||||
US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County
|
||||
US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota - Morton County (except Mandan area)
|
||||
US +471551-1014640 America/North_Dakota/Beulah Central Time - North Dakota - Mercer County
|
||||
US +394421-1045903 America/Denver Mountain Time
|
||||
US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon
|
||||
US +364708-1084111 America/Shiprock Mountain Time - Navajo
|
||||
US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona
|
||||
US +340308-1181434 America/Los_Angeles Pacific Time
|
||||
US +611305-1495401 America/Anchorage Alaska Time
|
||||
US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle
|
||||
US +571035-1351807 America/Sitka Alaska Time - southeast Alaska panhandle
|
||||
US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck
|
||||
US +643004-1652423 America/Nome Alaska Time - west Alaska
|
||||
US +515248-1763929 America/Adak Aleutian Islands
|
||||
US +550737-1313435 America/Metlakatla Metlakatla Time - Annette Island
|
||||
US +211825-1575130 Pacific/Honolulu Hawaii
|
||||
UY -3453-05611 America/Montevideo
|
||||
UZ +3940+06648 Asia/Samarkand west Uzbekistan
|
||||
UZ +4120+06918 Asia/Tashkent east Uzbekistan
|
||||
VA +415408+0122711 Europe/Vatican
|
||||
VC +1309-06114 America/St_Vincent
|
||||
VE +1030-06656 America/Caracas
|
||||
VG +1827-06437 America/Tortola
|
||||
VI +1821-06456 America/St_Thomas
|
||||
VN +1045+10640 Asia/Ho_Chi_Minh
|
||||
VU -1740+16825 Pacific/Efate
|
||||
WF -1318-17610 Pacific/Wallis
|
||||
WS -1350-17144 Pacific/Apia
|
||||
YE +1245+04512 Asia/Aden
|
||||
YT -1247+04514 Indian/Mayotte
|
||||
ZA -2615+02800 Africa/Johannesburg
|
||||
ZM -1525+02817 Africa/Lusaka
|
||||
ZW -1750+03103 Africa/Harare
|
||||
+760
@@ -0,0 +1,760 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Time Axes</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.time.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d = [
|
||||
[-373597200000, 315.71],
|
||||
[-370918800000, 317.45],
|
||||
[-368326800000, 317.5],
|
||||
[-363056400000, 315.86],
|
||||
[-360378000000, 314.93],
|
||||
[-357699600000, 313.19],
|
||||
[-352429200000, 313.34],
|
||||
[-349837200000, 314.67],
|
||||
[-347158800000, 315.58],
|
||||
[-344480400000, 316.47],
|
||||
[-342061200000, 316.65],
|
||||
[-339382800000, 317.71],
|
||||
[-336790800000, 318.29],
|
||||
[-334112400000, 318.16],
|
||||
[-331520400000, 316.55],
|
||||
[-328842000000, 314.8],
|
||||
[-326163600000, 313.84],
|
||||
[-323571600000, 313.34],
|
||||
[-320893200000, 314.81],
|
||||
[-318301200000, 315.59],
|
||||
[-315622800000, 316.43],
|
||||
[-312944400000, 316.97],
|
||||
[-310438800000, 317.58],
|
||||
[-307760400000, 319.03],
|
||||
[-305168400000, 320.03],
|
||||
[-302490000000, 319.59],
|
||||
[-299898000000, 318.18],
|
||||
[-297219600000, 315.91],
|
||||
[-294541200000, 314.16],
|
||||
[-291949200000, 313.83],
|
||||
[-289270800000, 315.0],
|
||||
[-286678800000, 316.19],
|
||||
[-284000400000, 316.89],
|
||||
[-281322000000, 317.7],
|
||||
[-278902800000, 318.54],
|
||||
[-276224400000, 319.48],
|
||||
[-273632400000, 320.58],
|
||||
[-270954000000, 319.78],
|
||||
[-268362000000, 318.58],
|
||||
[-265683600000, 316.79],
|
||||
[-263005200000, 314.99],
|
||||
[-260413200000, 315.31],
|
||||
[-257734800000, 316.1],
|
||||
[-255142800000, 317.01],
|
||||
[-252464400000, 317.94],
|
||||
[-249786000000, 318.56],
|
||||
[-247366800000, 319.69],
|
||||
[-244688400000, 320.58],
|
||||
[-242096400000, 321.01],
|
||||
[-239418000000, 320.61],
|
||||
[-236826000000, 319.61],
|
||||
[-234147600000, 317.4],
|
||||
[-231469200000, 316.26],
|
||||
[-228877200000, 315.42],
|
||||
[-226198800000, 316.69],
|
||||
[-223606800000, 317.69],
|
||||
[-220928400000, 318.74],
|
||||
[-218250000000, 319.08],
|
||||
[-215830800000, 319.86],
|
||||
[-213152400000, 321.39],
|
||||
[-210560400000, 322.24],
|
||||
[-207882000000, 321.47],
|
||||
[-205290000000, 319.74],
|
||||
[-202611600000, 317.77],
|
||||
[-199933200000, 316.21],
|
||||
[-197341200000, 315.99],
|
||||
[-194662800000, 317.07],
|
||||
[-192070800000, 318.36],
|
||||
[-189392400000, 319.57],
|
||||
[-178938000000, 322.23],
|
||||
[-176259600000, 321.89],
|
||||
[-173667600000, 320.44],
|
||||
[-170989200000, 318.7],
|
||||
[-168310800000, 316.7],
|
||||
[-165718800000, 316.87],
|
||||
[-163040400000, 317.68],
|
||||
[-160448400000, 318.71],
|
||||
[-157770000000, 319.44],
|
||||
[-155091600000, 320.44],
|
||||
[-152672400000, 320.89],
|
||||
[-149994000000, 322.13],
|
||||
[-147402000000, 322.16],
|
||||
[-144723600000, 321.87],
|
||||
[-142131600000, 321.21],
|
||||
[-139453200000, 318.87],
|
||||
[-136774800000, 317.81],
|
||||
[-134182800000, 317.3],
|
||||
[-131504400000, 318.87],
|
||||
[-128912400000, 319.42],
|
||||
[-126234000000, 320.62],
|
||||
[-123555600000, 321.59],
|
||||
[-121136400000, 322.39],
|
||||
[-118458000000, 323.7],
|
||||
[-115866000000, 324.07],
|
||||
[-113187600000, 323.75],
|
||||
[-110595600000, 322.4],
|
||||
[-107917200000, 320.37],
|
||||
[-105238800000, 318.64],
|
||||
[-102646800000, 318.1],
|
||||
[-99968400000, 319.79],
|
||||
[-97376400000, 321.03],
|
||||
[-94698000000, 322.33],
|
||||
[-92019600000, 322.5],
|
||||
[-89600400000, 323.04],
|
||||
[-86922000000, 324.42],
|
||||
[-84330000000, 325.0],
|
||||
[-81651600000, 324.09],
|
||||
[-79059600000, 322.55],
|
||||
[-76381200000, 320.92],
|
||||
[-73702800000, 319.26],
|
||||
[-71110800000, 319.39],
|
||||
[-68432400000, 320.72],
|
||||
[-65840400000, 321.96],
|
||||
[-63162000000, 322.57],
|
||||
[-60483600000, 323.15],
|
||||
[-57978000000, 323.89],
|
||||
[-55299600000, 325.02],
|
||||
[-52707600000, 325.57],
|
||||
[-50029200000, 325.36],
|
||||
[-47437200000, 324.14],
|
||||
[-44758800000, 322.11],
|
||||
[-42080400000, 320.33],
|
||||
[-39488400000, 320.25],
|
||||
[-36810000000, 321.32],
|
||||
[-34218000000, 322.9],
|
||||
[-31539600000, 324.0],
|
||||
[-28861200000, 324.42],
|
||||
[-26442000000, 325.64],
|
||||
[-23763600000, 326.66],
|
||||
[-21171600000, 327.38],
|
||||
[-18493200000, 326.7],
|
||||
[-15901200000, 325.89],
|
||||
[-13222800000, 323.67],
|
||||
[-10544400000, 322.38],
|
||||
[-7952400000, 321.78],
|
||||
[-5274000000, 322.85],
|
||||
[-2682000000, 324.12],
|
||||
[-3600000, 325.06],
|
||||
[2674800000, 325.98],
|
||||
[5094000000, 326.93],
|
||||
[7772400000, 328.13],
|
||||
[10364400000, 328.07],
|
||||
[13042800000, 327.66],
|
||||
[15634800000, 326.35],
|
||||
[18313200000, 324.69],
|
||||
[20991600000, 323.1],
|
||||
[23583600000, 323.07],
|
||||
[26262000000, 324.01],
|
||||
[28854000000, 325.13],
|
||||
[31532400000, 326.17],
|
||||
[34210800000, 326.68],
|
||||
[36630000000, 327.18],
|
||||
[39308400000, 327.78],
|
||||
[41900400000, 328.92],
|
||||
[44578800000, 328.57],
|
||||
[47170800000, 327.37],
|
||||
[49849200000, 325.43],
|
||||
[52527600000, 323.36],
|
||||
[55119600000, 323.56],
|
||||
[57798000000, 324.8],
|
||||
[60390000000, 326.01],
|
||||
[63068400000, 326.77],
|
||||
[65746800000, 327.63],
|
||||
[68252400000, 327.75],
|
||||
[70930800000, 329.72],
|
||||
[73522800000, 330.07],
|
||||
[76201200000, 329.09],
|
||||
[78793200000, 328.05],
|
||||
[81471600000, 326.32],
|
||||
[84150000000, 324.84],
|
||||
[86742000000, 325.2],
|
||||
[89420400000, 326.5],
|
||||
[92012400000, 327.55],
|
||||
[94690800000, 328.54],
|
||||
[97369200000, 329.56],
|
||||
[99788400000, 330.3],
|
||||
[102466800000, 331.5],
|
||||
[105058800000, 332.48],
|
||||
[107737200000, 332.07],
|
||||
[110329200000, 330.87],
|
||||
[113007600000, 329.31],
|
||||
[115686000000, 327.51],
|
||||
[118278000000, 327.18],
|
||||
[120956400000, 328.16],
|
||||
[123548400000, 328.64],
|
||||
[126226800000, 329.35],
|
||||
[128905200000, 330.71],
|
||||
[131324400000, 331.48],
|
||||
[134002800000, 332.65],
|
||||
[136594800000, 333.16],
|
||||
[139273200000, 332.06],
|
||||
[141865200000, 330.99],
|
||||
[144543600000, 329.17],
|
||||
[147222000000, 327.41],
|
||||
[149814000000, 327.2],
|
||||
[152492400000, 328.33],
|
||||
[155084400000, 329.5],
|
||||
[157762800000, 330.68],
|
||||
[160441200000, 331.41],
|
||||
[162860400000, 331.85],
|
||||
[165538800000, 333.29],
|
||||
[168130800000, 333.91],
|
||||
[170809200000, 333.4],
|
||||
[173401200000, 331.78],
|
||||
[176079600000, 329.88],
|
||||
[178758000000, 328.57],
|
||||
[181350000000, 328.46],
|
||||
[184028400000, 329.26],
|
||||
[189298800000, 331.71],
|
||||
[191977200000, 332.76],
|
||||
[194482800000, 333.48],
|
||||
[197161200000, 334.78],
|
||||
[199753200000, 334.78],
|
||||
[202431600000, 334.17],
|
||||
[205023600000, 332.78],
|
||||
[207702000000, 330.64],
|
||||
[210380400000, 328.95],
|
||||
[212972400000, 328.77],
|
||||
[215650800000, 330.23],
|
||||
[218242800000, 331.69],
|
||||
[220921200000, 332.7],
|
||||
[223599600000, 333.24],
|
||||
[226018800000, 334.96],
|
||||
[228697200000, 336.04],
|
||||
[231289200000, 336.82],
|
||||
[233967600000, 336.13],
|
||||
[236559600000, 334.73],
|
||||
[239238000000, 332.52],
|
||||
[241916400000, 331.19],
|
||||
[244508400000, 331.19],
|
||||
[247186800000, 332.35],
|
||||
[249778800000, 333.47],
|
||||
[252457200000, 335.11],
|
||||
[255135600000, 335.26],
|
||||
[257554800000, 336.6],
|
||||
[260233200000, 337.77],
|
||||
[262825200000, 338.0],
|
||||
[265503600000, 337.99],
|
||||
[268095600000, 336.48],
|
||||
[270774000000, 334.37],
|
||||
[273452400000, 332.27],
|
||||
[276044400000, 332.41],
|
||||
[278722800000, 333.76],
|
||||
[281314800000, 334.83],
|
||||
[283993200000, 336.21],
|
||||
[286671600000, 336.64],
|
||||
[289090800000, 338.12],
|
||||
[291769200000, 339.02],
|
||||
[294361200000, 339.02],
|
||||
[297039600000, 339.2],
|
||||
[299631600000, 337.58],
|
||||
[302310000000, 335.55],
|
||||
[304988400000, 333.89],
|
||||
[307580400000, 334.14],
|
||||
[310258800000, 335.26],
|
||||
[312850800000, 336.71],
|
||||
[315529200000, 337.81],
|
||||
[318207600000, 338.29],
|
||||
[320713200000, 340.04],
|
||||
[323391600000, 340.86],
|
||||
[325980000000, 341.47],
|
||||
[328658400000, 341.26],
|
||||
[331250400000, 339.29],
|
||||
[333928800000, 337.6],
|
||||
[336607200000, 336.12],
|
||||
[339202800000, 336.08],
|
||||
[341881200000, 337.22],
|
||||
[344473200000, 338.34],
|
||||
[347151600000, 339.36],
|
||||
[349830000000, 340.51],
|
||||
[352249200000, 341.57],
|
||||
[354924000000, 342.56],
|
||||
[357516000000, 343.01],
|
||||
[360194400000, 342.47],
|
||||
[362786400000, 340.71],
|
||||
[365464800000, 338.52],
|
||||
[368143200000, 336.96],
|
||||
[370738800000, 337.13],
|
||||
[373417200000, 338.58],
|
||||
[376009200000, 339.89],
|
||||
[378687600000, 340.93],
|
||||
[381366000000, 341.69],
|
||||
[383785200000, 342.69],
|
||||
[389052000000, 344.3],
|
||||
[391730400000, 343.43],
|
||||
[394322400000, 341.88],
|
||||
[397000800000, 339.89],
|
||||
[399679200000, 337.95],
|
||||
[402274800000, 338.1],
|
||||
[404953200000, 339.27],
|
||||
[407545200000, 340.67],
|
||||
[410223600000, 341.42],
|
||||
[412902000000, 342.68],
|
||||
[415321200000, 343.46],
|
||||
[417996000000, 345.1],
|
||||
[420588000000, 345.76],
|
||||
[423266400000, 345.36],
|
||||
[425858400000, 343.91],
|
||||
[428536800000, 342.05],
|
||||
[431215200000, 340.0],
|
||||
[433810800000, 340.12],
|
||||
[436489200000, 341.33],
|
||||
[439081200000, 342.94],
|
||||
[441759600000, 343.87],
|
||||
[444438000000, 344.6],
|
||||
[446943600000, 345.2],
|
||||
[452210400000, 347.36],
|
||||
[454888800000, 346.74],
|
||||
[457480800000, 345.41],
|
||||
[460159200000, 343.01],
|
||||
[462837600000, 341.23],
|
||||
[465433200000, 341.52],
|
||||
[468111600000, 342.86],
|
||||
[470703600000, 344.41],
|
||||
[473382000000, 345.09],
|
||||
[476060400000, 345.89],
|
||||
[478479600000, 347.49],
|
||||
[481154400000, 348.0],
|
||||
[483746400000, 348.75],
|
||||
[486424800000, 348.19],
|
||||
[489016800000, 346.54],
|
||||
[491695200000, 344.63],
|
||||
[494373600000, 343.03],
|
||||
[496969200000, 342.92],
|
||||
[499647600000, 344.24],
|
||||
[502239600000, 345.62],
|
||||
[504918000000, 346.43],
|
||||
[507596400000, 346.94],
|
||||
[510015600000, 347.88],
|
||||
[512690400000, 349.57],
|
||||
[515282400000, 350.35],
|
||||
[517960800000, 349.72],
|
||||
[520552800000, 347.78],
|
||||
[523231200000, 345.86],
|
||||
[525909600000, 344.84],
|
||||
[528505200000, 344.32],
|
||||
[531183600000, 345.67],
|
||||
[533775600000, 346.88],
|
||||
[536454000000, 348.19],
|
||||
[539132400000, 348.55],
|
||||
[541551600000, 349.52],
|
||||
[544226400000, 351.12],
|
||||
[546818400000, 351.84],
|
||||
[549496800000, 351.49],
|
||||
[552088800000, 349.82],
|
||||
[554767200000, 347.63],
|
||||
[557445600000, 346.38],
|
||||
[560041200000, 346.49],
|
||||
[562719600000, 347.75],
|
||||
[565311600000, 349.03],
|
||||
[567990000000, 350.2],
|
||||
[570668400000, 351.61],
|
||||
[573174000000, 352.22],
|
||||
[575848800000, 353.53],
|
||||
[578440800000, 354.14],
|
||||
[581119200000, 353.62],
|
||||
[583711200000, 352.53],
|
||||
[586389600000, 350.41],
|
||||
[589068000000, 348.84],
|
||||
[591663600000, 348.94],
|
||||
[594342000000, 350.04],
|
||||
[596934000000, 351.29],
|
||||
[599612400000, 352.72],
|
||||
[602290800000, 353.1],
|
||||
[604710000000, 353.65],
|
||||
[607384800000, 355.43],
|
||||
[609976800000, 355.7],
|
||||
[612655200000, 355.11],
|
||||
[615247200000, 353.79],
|
||||
[617925600000, 351.42],
|
||||
[620604000000, 349.81],
|
||||
[623199600000, 350.11],
|
||||
[625878000000, 351.26],
|
||||
[628470000000, 352.63],
|
||||
[631148400000, 353.64],
|
||||
[633826800000, 354.72],
|
||||
[636246000000, 355.49],
|
||||
[638920800000, 356.09],
|
||||
[641512800000, 357.08],
|
||||
[644191200000, 356.11],
|
||||
[646783200000, 354.7],
|
||||
[649461600000, 352.68],
|
||||
[652140000000, 351.05],
|
||||
[654735600000, 351.36],
|
||||
[657414000000, 352.81],
|
||||
[660006000000, 354.22],
|
||||
[662684400000, 354.85],
|
||||
[665362800000, 355.66],
|
||||
[667782000000, 357.04],
|
||||
[670456800000, 358.4],
|
||||
[673048800000, 359.0],
|
||||
[675727200000, 357.99],
|
||||
[678319200000, 356.0],
|
||||
[680997600000, 353.78],
|
||||
[683676000000, 352.2],
|
||||
[686271600000, 352.22],
|
||||
[688950000000, 353.7],
|
||||
[691542000000, 354.98],
|
||||
[694220400000, 356.09],
|
||||
[696898800000, 356.85],
|
||||
[699404400000, 357.73],
|
||||
[702079200000, 358.91],
|
||||
[704671200000, 359.45],
|
||||
[707349600000, 359.19],
|
||||
[709941600000, 356.72],
|
||||
[712620000000, 354.79],
|
||||
[715298400000, 352.79],
|
||||
[717894000000, 353.2],
|
||||
[720572400000, 354.15],
|
||||
[723164400000, 355.39],
|
||||
[725842800000, 356.77],
|
||||
[728521200000, 357.17],
|
||||
[730940400000, 358.26],
|
||||
[733615200000, 359.16],
|
||||
[736207200000, 360.07],
|
||||
[738885600000, 359.41],
|
||||
[741477600000, 357.44],
|
||||
[744156000000, 355.3],
|
||||
[746834400000, 353.87],
|
||||
[749430000000, 354.04],
|
||||
[752108400000, 355.27],
|
||||
[754700400000, 356.7],
|
||||
[757378800000, 358.0],
|
||||
[760057200000, 358.81],
|
||||
[762476400000, 359.68],
|
||||
[765151200000, 361.13],
|
||||
[767743200000, 361.48],
|
||||
[770421600000, 360.6],
|
||||
[773013600000, 359.2],
|
||||
[775692000000, 357.23],
|
||||
[778370400000, 355.42],
|
||||
[780966000000, 355.89],
|
||||
[783644400000, 357.41],
|
||||
[786236400000, 358.74],
|
||||
[788914800000, 359.73],
|
||||
[791593200000, 360.61],
|
||||
[794012400000, 361.58],
|
||||
[796687200000, 363.05],
|
||||
[799279200000, 363.62],
|
||||
[801957600000, 363.03],
|
||||
[804549600000, 361.55],
|
||||
[807228000000, 358.94],
|
||||
[809906400000, 357.93],
|
||||
[812502000000, 357.8],
|
||||
[815180400000, 359.22],
|
||||
[817772400000, 360.44],
|
||||
[820450800000, 361.83],
|
||||
[823129200000, 362.95],
|
||||
[825634800000, 363.91],
|
||||
[828309600000, 364.28],
|
||||
[830901600000, 364.94],
|
||||
[833580000000, 364.7],
|
||||
[836172000000, 363.31],
|
||||
[838850400000, 361.15],
|
||||
[841528800000, 359.4],
|
||||
[844120800000, 359.34],
|
||||
[846802800000, 360.62],
|
||||
[849394800000, 361.96],
|
||||
[852073200000, 362.81],
|
||||
[854751600000, 363.87],
|
||||
[857170800000, 364.25],
|
||||
[859845600000, 366.02],
|
||||
[862437600000, 366.46],
|
||||
[865116000000, 365.32],
|
||||
[867708000000, 364.07],
|
||||
[870386400000, 361.95],
|
||||
[873064800000, 360.06],
|
||||
[875656800000, 360.49],
|
||||
[878338800000, 362.19],
|
||||
[880930800000, 364.12],
|
||||
[883609200000, 364.99],
|
||||
[886287600000, 365.82],
|
||||
[888706800000, 366.95],
|
||||
[891381600000, 368.42],
|
||||
[893973600000, 369.33],
|
||||
[896652000000, 368.78],
|
||||
[899244000000, 367.59],
|
||||
[901922400000, 365.84],
|
||||
[904600800000, 363.83],
|
||||
[907192800000, 364.18],
|
||||
[909874800000, 365.34],
|
||||
[912466800000, 366.93],
|
||||
[915145200000, 367.94],
|
||||
[917823600000, 368.82],
|
||||
[920242800000, 369.46],
|
||||
[922917600000, 370.77],
|
||||
[925509600000, 370.66],
|
||||
[928188000000, 370.1],
|
||||
[930780000000, 369.08],
|
||||
[933458400000, 366.66],
|
||||
[936136800000, 364.6],
|
||||
[938728800000, 365.17],
|
||||
[941410800000, 366.51],
|
||||
[944002800000, 367.89],
|
||||
[946681200000, 369.04],
|
||||
[949359600000, 369.35],
|
||||
[951865200000, 370.38],
|
||||
[954540000000, 371.63],
|
||||
[957132000000, 371.32],
|
||||
[959810400000, 371.53],
|
||||
[962402400000, 369.75],
|
||||
[965080800000, 368.23],
|
||||
[967759200000, 366.87],
|
||||
[970351200000, 366.94],
|
||||
[973033200000, 368.27],
|
||||
[975625200000, 369.64],
|
||||
[978303600000, 370.46],
|
||||
[980982000000, 371.44],
|
||||
[983401200000, 372.37],
|
||||
[986076000000, 373.33],
|
||||
[988668000000, 373.77],
|
||||
[991346400000, 373.09],
|
||||
[993938400000, 371.51],
|
||||
[996616800000, 369.55],
|
||||
[999295200000, 368.12],
|
||||
[1001887200000, 368.38],
|
||||
[1004569200000, 369.66],
|
||||
[1007161200000, 371.11],
|
||||
[1009839600000, 372.36],
|
||||
[1012518000000, 373.09],
|
||||
[1014937200000, 373.81],
|
||||
[1017612000000, 374.93],
|
||||
[1020204000000, 375.58],
|
||||
[1022882400000, 375.44],
|
||||
[1025474400000, 373.86],
|
||||
[1028152800000, 371.77],
|
||||
[1030831200000, 370.73],
|
||||
[1033423200000, 370.5],
|
||||
[1036105200000, 372.18],
|
||||
[1038697200000, 373.7],
|
||||
[1041375600000, 374.92],
|
||||
[1044054000000, 375.62],
|
||||
[1046473200000, 376.51],
|
||||
[1049148000000, 377.75],
|
||||
[1051740000000, 378.54],
|
||||
[1054418400000, 378.2],
|
||||
[1057010400000, 376.68],
|
||||
[1059688800000, 374.43],
|
||||
[1062367200000, 373.11],
|
||||
[1064959200000, 373.1],
|
||||
[1067641200000, 374.77],
|
||||
[1070233200000, 375.97],
|
||||
[1072911600000, 377.03],
|
||||
[1075590000000, 377.87],
|
||||
[1078095600000, 378.88],
|
||||
[1080770400000, 380.42],
|
||||
[1083362400000, 380.62],
|
||||
[1086040800000, 379.7],
|
||||
[1088632800000, 377.43],
|
||||
[1091311200000, 376.32],
|
||||
[1093989600000, 374.19],
|
||||
[1096581600000, 374.47],
|
||||
[1099263600000, 376.15],
|
||||
[1101855600000, 377.51],
|
||||
[1104534000000, 378.43],
|
||||
[1107212400000, 379.7],
|
||||
[1109631600000, 380.92],
|
||||
[1112306400000, 382.18],
|
||||
[1114898400000, 382.45],
|
||||
[1117576800000, 382.14],
|
||||
[1120168800000, 380.6],
|
||||
[1122847200000, 378.64],
|
||||
[1125525600000, 376.73],
|
||||
[1128117600000, 376.84],
|
||||
[1130799600000, 378.29],
|
||||
[1133391600000, 380.06],
|
||||
[1136070000000, 381.4],
|
||||
[1138748400000, 382.2],
|
||||
[1141167600000, 382.66],
|
||||
[1143842400000, 384.69],
|
||||
[1146434400000, 384.94],
|
||||
[1149112800000, 384.01],
|
||||
[1151704800000, 382.14],
|
||||
[1154383200000, 380.31],
|
||||
[1157061600000, 378.81],
|
||||
[1159653600000, 379.03],
|
||||
[1162335600000, 380.17],
|
||||
[1164927600000, 381.85],
|
||||
[1167606000000, 382.94],
|
||||
[1170284400000, 383.86],
|
||||
[1172703600000, 384.49],
|
||||
[1175378400000, 386.37],
|
||||
[1177970400000, 386.54],
|
||||
[1180648800000, 385.98],
|
||||
[1183240800000, 384.36],
|
||||
[1185919200000, 381.85],
|
||||
[1188597600000, 380.74],
|
||||
[1191189600000, 381.15],
|
||||
[1193871600000, 382.38],
|
||||
[1196463600000, 383.94],
|
||||
[1199142000000, 385.44],
|
||||
];
|
||||
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: { mode: "time" },
|
||||
});
|
||||
|
||||
$("#whole").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: { mode: "time" },
|
||||
});
|
||||
});
|
||||
|
||||
$("#nineties").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
min: new Date(1990, 0, 1).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#latenineties").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "year"],
|
||||
min: new Date(1996, 0, 1).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#ninetyninequarters").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "quarter"],
|
||||
min: new Date(1999, 0, 1).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#ninetynine").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "month"],
|
||||
min: new Date(1999, 0, 1).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#lastweekninetynine").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "day"],
|
||||
min: new Date(1999, 11, 25).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
timeformat: "%a",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#lastdayninetynine").click(function () {
|
||||
$.plot("#placeholder", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
minTickSize: [1, "hour"],
|
||||
min: new Date(1999, 11, 31).getTime(),
|
||||
max: new Date(2000, 0, 1).getTime(),
|
||||
twelveHourClock: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Time Axes</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Monthly mean atmospheric CO<sub>2</sub> in PPM at Mauna Loa, Hawaii
|
||||
(source:
|
||||
<a href="http://www.esrl.noaa.gov/gmd/ccgg/trends/">NOAA/ESRL</a>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you tell Flot that an axis represents time, the data will be
|
||||
interpreted as timestamps and the ticks adjusted and formatted
|
||||
accordingly.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Zoom to: <button id="whole">Whole period</button>
|
||||
<button id="nineties">1990-2000</button>
|
||||
<button id="latenineties">1996-2000</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Zoom to: <button id="ninetyninequarters">1999 by quarter</button>
|
||||
<button id="ninetynine">1999 by month</button>
|
||||
<button id="lastweekninetynine">Last week of 1999</button>
|
||||
<button id="lastdayninetynine">Dec. 31, 1999</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The timestamps must be specified as Javascript timestamps, as
|
||||
milliseconds since January 1, 1970 00:00. This is like Unix timestamps,
|
||||
but in milliseconds instead of seconds (remember to multiply with
|
||||
1000!).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
As an extra caveat, the timestamps are interpreted according to UTC and,
|
||||
by default, displayed as such. You can set the axis "timezone" option to
|
||||
"browser" to display the timestamps in the user's timezone, or, if you
|
||||
use timezoneJS, you can specify a time zone.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 231 B |
Vendored
+110
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Basic Options</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.25) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.25) {
|
||||
d2.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.1) {
|
||||
d3.push([i, Math.tan(i)]);
|
||||
}
|
||||
|
||||
$.plot(
|
||||
"#placeholder",
|
||||
[
|
||||
{ label: "sin(x)", data: d1 },
|
||||
{ label: "cos(x)", data: d2 },
|
||||
{ label: "tan(x)", data: d3 },
|
||||
],
|
||||
{
|
||||
series: {
|
||||
lines: { show: true },
|
||||
points: { show: true },
|
||||
},
|
||||
xaxis: {
|
||||
ticks: [
|
||||
0,
|
||||
[Math.PI / 2, "\u03c0/2"],
|
||||
[Math.PI, "\u03c0"],
|
||||
[(Math.PI * 3) / 2, "3\u03c0/2"],
|
||||
[Math.PI * 2, "2\u03c0"],
|
||||
],
|
||||
},
|
||||
yaxis: {
|
||||
ticks: 10,
|
||||
min: -2,
|
||||
max: 2,
|
||||
tickDecimals: 3,
|
||||
},
|
||||
grid: {
|
||||
backgroundColor: { colors: ["#fff", "#eee"] },
|
||||
borderWidth: {
|
||||
top: 1,
|
||||
right: 1,
|
||||
bottom: 2,
|
||||
left: 2,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Basic Options</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
There are plenty of options you can set to control the precise looks of
|
||||
your plot. You can control the ticks on the axes, the legend, the graph
|
||||
type, etc.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Flot goes to great lengths to provide sensible defaults so that you
|
||||
don't have to customize much for a good-looking result.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Basic Usage</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [
|
||||
[0, 3],
|
||||
[4, 8],
|
||||
[8, 5],
|
||||
[9, 13],
|
||||
];
|
||||
|
||||
// A null signifies separate line segments
|
||||
|
||||
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
|
||||
|
||||
$.plot("#placeholder", [d1, d2, d3]);
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Basic Usage</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You don't have to do much to get an attractive plot. Create a
|
||||
placeholder, make sure it has dimensions (so Flot knows at what size to
|
||||
draw the plot), then call the plot function with your data.
|
||||
</p>
|
||||
|
||||
<p>The axes are automatically scaled.</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+1052
File diff suppressed because it is too large
Load Diff
+77
@@ -0,0 +1,77 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Categories</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.categories.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var data = [
|
||||
["January", 10],
|
||||
["February", 8],
|
||||
["March", 4],
|
||||
["April", 13],
|
||||
["May", 17],
|
||||
["June", 9],
|
||||
];
|
||||
|
||||
$.plot("#placeholder", [data], {
|
||||
series: {
|
||||
bars: {
|
||||
show: true,
|
||||
barWidth: 0.6,
|
||||
align: "center",
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
mode: "categories",
|
||||
tickLength: 0,
|
||||
},
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Categories</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With the categories plugin you can plot categories/textual data easily.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
* { padding: 0; margin: 0; vertical-align: top; }
|
||||
|
||||
body {
|
||||
background: url(background.png) repeat-x;
|
||||
font: 18px/1.5em "proxima-nova", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
a { color: #069; }
|
||||
a:hover { color: #28b; }
|
||||
|
||||
h2 {
|
||||
margin-top: 15px;
|
||||
font: normal 32px "omnes-pro", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-left: 30px;
|
||||
font: normal 26px "omnes-pro", Helvetica, Arial, sans-serif;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
font-size: 18px;
|
||||
padding: 1px 7px;
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
margin: 7px;
|
||||
}
|
||||
|
||||
#header {
|
||||
position: relative;
|
||||
width: 900px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#header h2 {
|
||||
margin-left: 10px;
|
||||
vertical-align: middle;
|
||||
font-size: 42px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#content {
|
||||
width: 880px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
margin-top: 25px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.demo-container {
|
||||
box-sizing: border-box;
|
||||
width: 850px;
|
||||
height: 450px;
|
||||
padding: 20px 15px 15px 15px;
|
||||
margin: 15px auto 30px auto;
|
||||
border: 1px solid #ddd;
|
||||
background: #fff;
|
||||
background: linear-gradient(#f6f6f6 0, #fff 50px);
|
||||
background: -o-linear-gradient(#f6f6f6 0, #fff 50px);
|
||||
background: -ms-linear-gradient(#f6f6f6 0, #fff 50px);
|
||||
background: -moz-linear-gradient(#f6f6f6 0, #fff 50px);
|
||||
background: -webkit-linear-gradient(#f6f6f6 0, #fff 50px);
|
||||
box-shadow: 0 3px 10px rgba(0,0,0,0.15);
|
||||
-o-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
|
||||
-ms-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.demo-placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
.legend table {
|
||||
border-spacing: 5px;
|
||||
}
|
||||
Projects/Panel/Resources/Themes/matrixBt5/vendor/libs/flot/examples/image/hs-2004-27-a-large-web.jpg
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
+92
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Image Plots</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.image.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var data = [[["hs-2004-27-a-large-web.jpg", -10, -10, 10, 10]]];
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
images: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
min: -8,
|
||||
max: 4,
|
||||
},
|
||||
yaxis: {
|
||||
min: -8,
|
||||
max: 4,
|
||||
},
|
||||
};
|
||||
|
||||
$.plot.image.loadDataImages(data, options, function () {
|
||||
$.plot("#placeholder", data, options);
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Image Plots</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container" style="width: 600px; height: 600px">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The Cat's Eye Nebula (<a
|
||||
href="http://hubblesite.org/gallery/album/nebula/pr2004027a/"
|
||||
>picture from Hubble</a
|
||||
>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the image plugin, you can plot static images against a set of axes.
|
||||
This is for useful for adding ticks to complex prerendered
|
||||
visualizations. Instead of inputting data points, you specify the images
|
||||
and where their two opposite corners are supposed to be in plot space.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Images represent a little further complication because you need to make
|
||||
sure they are loaded before you can use them (Flot skips incomplete
|
||||
images). The plugin comes with a couple of helpers for doing that.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples</title>
|
||||
<link href="examples.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
h3 {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Flot Examples</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<p>
|
||||
Here are some examples for <a href="http://www.flotcharts.org">Flot</a>,
|
||||
the Javascript charting library for jQuery:
|
||||
</p>
|
||||
|
||||
<h3>Basic Usage</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="basic-usage/index.html">Basic example</a></li>
|
||||
<li>
|
||||
<a href="series-types/index.html">Different graph types</a> and
|
||||
<a href="categories/index.html">simple categories/textual data</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="basic-options/index.html">Setting various options</a> and
|
||||
<a href="annotating/index.html">annotating a chart</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ajax/index.html">Updating graphs with AJAX</a> and
|
||||
<a href="realtime/index.html">real-time updates</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Interactivity</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="series-toggle/index.html">Turning series on/off</a></li>
|
||||
<li>
|
||||
<a href="selection/index.html"
|
||||
>Rectangular selection support and zooming</a
|
||||
>
|
||||
and <a href="zooming/index.html">zooming with overview</a> (both with
|
||||
selection plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="interacting/index.html">Interacting with the data points</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="navigate/index.html">Panning and zooming</a> (with navigation
|
||||
plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="resize/index.html"
|
||||
>Automatically redraw when window is resized</a
|
||||
>
|
||||
(with resize plugin)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Additional Features</h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="symbols/index.html"
|
||||
>Using other symbols than circles for points</a
|
||||
>
|
||||
(with symbol plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="axes-time/index.html">Plotting time series</a>,
|
||||
<a href="visitors/index.html"
|
||||
>visitors per day with zooming and weekends</a
|
||||
>
|
||||
(with selection plugin) and
|
||||
<a href="axes-time-zones/index.html">time zone support</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="axes-multiple/index.html">Multiple axes</a> and
|
||||
<a href="axes-interacting/index.html">interacting with the axes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="threshold/index.html">Thresholding the data</a> (with
|
||||
threshold plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="stacking/index.html">Stacked charts</a> (with stacking
|
||||
plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="percentiles/index.html"
|
||||
>Using filled areas to plot percentiles</a
|
||||
>
|
||||
(with fillbetween plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="tracking/index.html">Tracking curves with crosshair</a> (with
|
||||
crosshair plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="image/index.html">Plotting prerendered images</a> (with image
|
||||
plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="series-errorbars/index.html">Plotting error bars</a> (with
|
||||
errorbars plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="series-pie/index.html">Pie charts</a> (with pie plugin)
|
||||
</li>
|
||||
<li>
|
||||
<a href="canvas/index.html"
|
||||
>Rendering text with canvas instead of HTML</a
|
||||
>
|
||||
(with canvas plugin)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2013 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Interactivity</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var sin = [],
|
||||
cos = [];
|
||||
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
sin.push([i, Math.sin(i)]);
|
||||
cos.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
var plot = $.plot(
|
||||
"#placeholder",
|
||||
[
|
||||
{ data: sin, label: "sin(x)" },
|
||||
{ data: cos, label: "cos(x)" },
|
||||
],
|
||||
{
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
points: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
hoverable: true,
|
||||
clickable: true,
|
||||
},
|
||||
yaxis: {
|
||||
min: -1.2,
|
||||
max: 1.2,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
$("<div id='tooltip'></div>")
|
||||
.css({
|
||||
position: "absolute",
|
||||
display: "none",
|
||||
border: "1px solid #fdd",
|
||||
padding: "2px",
|
||||
"background-color": "#fee",
|
||||
opacity: 0.8,
|
||||
})
|
||||
.appendTo("body");
|
||||
|
||||
$("#placeholder").bind("plothover", function (event, pos, item) {
|
||||
if ($("#enablePosition:checked").length > 0) {
|
||||
var str = "(" + pos.x.toFixed(2) + ", " + pos.y.toFixed(2) + ")";
|
||||
$("#hoverdata").text(str);
|
||||
}
|
||||
|
||||
if ($("#enableTooltip:checked").length > 0) {
|
||||
if (item) {
|
||||
var x = item.datapoint[0].toFixed(2),
|
||||
y = item.datapoint[1].toFixed(2);
|
||||
|
||||
$("#tooltip")
|
||||
.html(item.series.label + " of " + x + " = " + y)
|
||||
.css({ top: item.pageY + 5, left: item.pageX + 5 })
|
||||
.fadeIn(200);
|
||||
} else {
|
||||
$("#tooltip").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#placeholder").bind("plotclick", function (event, pos, item) {
|
||||
if (item) {
|
||||
$("#clickdata").text(
|
||||
" - click point " + item.dataIndex + " in " + item.series.label
|
||||
);
|
||||
plot.highlight(item.series, item.datapoint);
|
||||
}
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Interactivity</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
One of the goals of Flot is to support user interactions. Try pointing
|
||||
and clicking on the points.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label
|
||||
><input id="enablePosition" type="checkbox" checked="checked" />Show
|
||||
mouse position</label
|
||||
>
|
||||
<span id="hoverdata"></span>
|
||||
<span id="clickdata"></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
A tooltip is easy to build with a bit of jQuery code and the data
|
||||
returned from the plot.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label
|
||||
><input id="enableTooltip" type="checkbox" checked="checked" />Enable
|
||||
tooltip</label
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 916 B |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 891 B |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 897 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 916 B |
+188
@@ -0,0 +1,188 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Navigation</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<style type="text/css">
|
||||
#placeholder .button {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#placeholder div.button {
|
||||
font-size: smaller;
|
||||
color: #999;
|
||||
background-color: #eee;
|
||||
padding: 2px;
|
||||
}
|
||||
.message {
|
||||
padding-left: 50px;
|
||||
font-size: smaller;
|
||||
}
|
||||
</style>
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.navigate.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// generate data set from a parametric function with a fractal look
|
||||
|
||||
function sumf(f, t, m) {
|
||||
var res = 0;
|
||||
for (var i = 1; i < m; ++i) {
|
||||
res += f(i * i * t) / (i * i);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
var d1 = [];
|
||||
for (var t = 0; t <= 2 * Math.PI; t += 0.01) {
|
||||
d1.push([sumf(Math.cos, t, 10), sumf(Math.sin, t, 10)]);
|
||||
}
|
||||
|
||||
var data = [d1],
|
||||
placeholder = $("#placeholder");
|
||||
|
||||
var plot = $.plot(placeholder, data, {
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
shadowSize: 0,
|
||||
},
|
||||
xaxis: {
|
||||
zoomRange: [0.1, 10],
|
||||
panRange: [-10, 10],
|
||||
},
|
||||
yaxis: {
|
||||
zoomRange: [0.1, 10],
|
||||
panRange: [-10, 10],
|
||||
},
|
||||
zoom: {
|
||||
interactive: true,
|
||||
},
|
||||
pan: {
|
||||
interactive: true,
|
||||
},
|
||||
});
|
||||
|
||||
// show pan/zoom messages to illustrate events
|
||||
|
||||
placeholder.bind("plotpan", function (event, plot) {
|
||||
var axes = plot.getAxes();
|
||||
$(".message").html(
|
||||
"Panning to x: " +
|
||||
axes.xaxis.min.toFixed(2) +
|
||||
" – " +
|
||||
axes.xaxis.max.toFixed(2) +
|
||||
" and y: " +
|
||||
axes.yaxis.min.toFixed(2) +
|
||||
" – " +
|
||||
axes.yaxis.max.toFixed(2)
|
||||
);
|
||||
});
|
||||
|
||||
placeholder.bind("plotzoom", function (event, plot) {
|
||||
var axes = plot.getAxes();
|
||||
$(".message").html(
|
||||
"Zooming to x: " +
|
||||
axes.xaxis.min.toFixed(2) +
|
||||
" – " +
|
||||
axes.xaxis.max.toFixed(2) +
|
||||
" and y: " +
|
||||
axes.yaxis.min.toFixed(2) +
|
||||
" – " +
|
||||
axes.yaxis.max.toFixed(2)
|
||||
);
|
||||
});
|
||||
|
||||
// add zoom out button
|
||||
|
||||
$("<div class='button' style='right:20px;top:20px'>zoom out</div>")
|
||||
.appendTo(placeholder)
|
||||
.click(function (event) {
|
||||
event.preventDefault();
|
||||
plot.zoomOut();
|
||||
});
|
||||
|
||||
// and add panning buttons
|
||||
|
||||
// little helper for taking the repetitive work out of placing
|
||||
// panning arrows
|
||||
|
||||
function addArrow(dir, right, top, offset) {
|
||||
$(
|
||||
"<img class='button' src='arrow-" +
|
||||
dir +
|
||||
".gif' style='right:" +
|
||||
right +
|
||||
"px;top:" +
|
||||
top +
|
||||
"px'>"
|
||||
)
|
||||
.appendTo(placeholder)
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
plot.pan(offset);
|
||||
});
|
||||
}
|
||||
|
||||
addArrow("left", 55, 60, { left: -100 });
|
||||
addArrow("right", 25, 60, { left: 100 });
|
||||
addArrow("up", 40, 45, { top: -100 });
|
||||
addArrow("down", 40, 75, { top: 100 });
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Navigation</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p class="message"></p>
|
||||
|
||||
<p>
|
||||
With the navigate plugin it is easy to add panning and zooming. Drag to
|
||||
pan, double click to zoom (or use the mouse scrollwheel).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The plugin fires events (useful for synchronizing several plots) and
|
||||
adds a couple of public methods so you can easily build a little user
|
||||
interface around it, like the little buttons at the top right in the
|
||||
plot.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+489
@@ -0,0 +1,489 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Percentiles</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.fillbetween.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var males = {
|
||||
"15%": [
|
||||
[2, 88.0],
|
||||
[3, 93.3],
|
||||
[4, 102.0],
|
||||
[5, 108.5],
|
||||
[6, 115.7],
|
||||
[7, 115.6],
|
||||
[8, 124.6],
|
||||
[9, 130.3],
|
||||
[10, 134.3],
|
||||
[11, 141.4],
|
||||
[12, 146.5],
|
||||
[13, 151.7],
|
||||
[14, 159.9],
|
||||
[15, 165.4],
|
||||
[16, 167.8],
|
||||
[17, 168.7],
|
||||
[18, 169.5],
|
||||
[19, 168.0],
|
||||
],
|
||||
"90%": [
|
||||
[2, 96.8],
|
||||
[3, 105.2],
|
||||
[4, 113.9],
|
||||
[5, 120.8],
|
||||
[6, 127.0],
|
||||
[7, 133.1],
|
||||
[8, 139.1],
|
||||
[9, 143.9],
|
||||
[10, 151.3],
|
||||
[11, 161.1],
|
||||
[12, 164.8],
|
||||
[13, 173.5],
|
||||
[14, 179.0],
|
||||
[15, 182.0],
|
||||
[16, 186.9],
|
||||
[17, 185.2],
|
||||
[18, 186.3],
|
||||
[19, 186.6],
|
||||
],
|
||||
"25%": [
|
||||
[2, 89.2],
|
||||
[3, 94.9],
|
||||
[4, 104.4],
|
||||
[5, 111.4],
|
||||
[6, 117.5],
|
||||
[7, 120.2],
|
||||
[8, 127.1],
|
||||
[9, 132.9],
|
||||
[10, 136.8],
|
||||
[11, 144.4],
|
||||
[12, 149.5],
|
||||
[13, 154.1],
|
||||
[14, 163.1],
|
||||
[15, 169.2],
|
||||
[16, 170.4],
|
||||
[17, 171.2],
|
||||
[18, 172.4],
|
||||
[19, 170.8],
|
||||
],
|
||||
"10%": [
|
||||
[2, 86.9],
|
||||
[3, 92.6],
|
||||
[4, 99.9],
|
||||
[5, 107.0],
|
||||
[6, 114.0],
|
||||
[7, 113.5],
|
||||
[8, 123.6],
|
||||
[9, 129.2],
|
||||
[10, 133.0],
|
||||
[11, 140.6],
|
||||
[12, 145.2],
|
||||
[13, 149.7],
|
||||
[14, 158.4],
|
||||
[15, 163.5],
|
||||
[16, 166.9],
|
||||
[17, 167.5],
|
||||
[18, 167.1],
|
||||
[19, 165.3],
|
||||
],
|
||||
mean: [
|
||||
[2, 91.9],
|
||||
[3, 98.5],
|
||||
[4, 107.1],
|
||||
[5, 114.4],
|
||||
[6, 120.6],
|
||||
[7, 124.7],
|
||||
[8, 131.1],
|
||||
[9, 136.8],
|
||||
[10, 142.3],
|
||||
[11, 150.0],
|
||||
[12, 154.7],
|
||||
[13, 161.9],
|
||||
[14, 168.7],
|
||||
[15, 173.6],
|
||||
[16, 175.9],
|
||||
[17, 176.6],
|
||||
[18, 176.8],
|
||||
[19, 176.7],
|
||||
],
|
||||
"75%": [
|
||||
[2, 94.5],
|
||||
[3, 102.1],
|
||||
[4, 110.8],
|
||||
[5, 117.9],
|
||||
[6, 124.0],
|
||||
[7, 129.3],
|
||||
[8, 134.6],
|
||||
[9, 141.4],
|
||||
[10, 147.0],
|
||||
[11, 156.1],
|
||||
[12, 160.3],
|
||||
[13, 168.3],
|
||||
[14, 174.7],
|
||||
[15, 178.0],
|
||||
[16, 180.2],
|
||||
[17, 181.7],
|
||||
[18, 181.3],
|
||||
[19, 182.5],
|
||||
],
|
||||
"85%": [
|
||||
[2, 96.2],
|
||||
[3, 103.8],
|
||||
[4, 111.8],
|
||||
[5, 119.6],
|
||||
[6, 125.6],
|
||||
[7, 131.5],
|
||||
[8, 138.0],
|
||||
[9, 143.3],
|
||||
[10, 149.3],
|
||||
[11, 159.8],
|
||||
[12, 162.5],
|
||||
[13, 171.3],
|
||||
[14, 177.5],
|
||||
[15, 180.2],
|
||||
[16, 183.8],
|
||||
[17, 183.4],
|
||||
[18, 183.5],
|
||||
[19, 185.5],
|
||||
],
|
||||
"50%": [
|
||||
[2, 91.9],
|
||||
[3, 98.2],
|
||||
[4, 106.8],
|
||||
[5, 114.6],
|
||||
[6, 120.8],
|
||||
[7, 125.2],
|
||||
[8, 130.3],
|
||||
[9, 137.1],
|
||||
[10, 141.5],
|
||||
[11, 149.4],
|
||||
[12, 153.9],
|
||||
[13, 162.2],
|
||||
[14, 169.0],
|
||||
[15, 174.8],
|
||||
[16, 176.0],
|
||||
[17, 176.8],
|
||||
[18, 176.4],
|
||||
[19, 177.4],
|
||||
],
|
||||
};
|
||||
|
||||
var females = {
|
||||
"15%": [
|
||||
[2, 84.8],
|
||||
[3, 93.7],
|
||||
[4, 100.6],
|
||||
[5, 105.8],
|
||||
[6, 113.3],
|
||||
[7, 119.3],
|
||||
[8, 124.3],
|
||||
[9, 131.4],
|
||||
[10, 136.9],
|
||||
[11, 143.8],
|
||||
[12, 149.4],
|
||||
[13, 151.2],
|
||||
[14, 152.3],
|
||||
[15, 155.9],
|
||||
[16, 154.7],
|
||||
[17, 157.0],
|
||||
[18, 156.1],
|
||||
[19, 155.4],
|
||||
],
|
||||
"90%": [
|
||||
[2, 95.6],
|
||||
[3, 104.1],
|
||||
[4, 111.9],
|
||||
[5, 119.6],
|
||||
[6, 127.6],
|
||||
[7, 133.1],
|
||||
[8, 138.7],
|
||||
[9, 147.1],
|
||||
[10, 152.8],
|
||||
[11, 161.3],
|
||||
[12, 166.6],
|
||||
[13, 167.9],
|
||||
[14, 169.3],
|
||||
[15, 170.1],
|
||||
[16, 172.4],
|
||||
[17, 169.2],
|
||||
[18, 171.1],
|
||||
[19, 172.4],
|
||||
],
|
||||
"25%": [
|
||||
[2, 87.2],
|
||||
[3, 95.9],
|
||||
[4, 101.9],
|
||||
[5, 107.4],
|
||||
[6, 114.8],
|
||||
[7, 121.4],
|
||||
[8, 126.8],
|
||||
[9, 133.4],
|
||||
[10, 138.6],
|
||||
[11, 146.2],
|
||||
[12, 152.0],
|
||||
[13, 153.8],
|
||||
[14, 155.7],
|
||||
[15, 158.4],
|
||||
[16, 157.0],
|
||||
[17, 158.5],
|
||||
[18, 158.4],
|
||||
[19, 158.1],
|
||||
],
|
||||
"10%": [
|
||||
[2, 84.0],
|
||||
[3, 91.9],
|
||||
[4, 99.2],
|
||||
[5, 105.2],
|
||||
[6, 112.7],
|
||||
[7, 118.0],
|
||||
[8, 123.3],
|
||||
[9, 130.2],
|
||||
[10, 135.0],
|
||||
[11, 141.1],
|
||||
[12, 148.3],
|
||||
[13, 150.0],
|
||||
[14, 150.7],
|
||||
[15, 154.3],
|
||||
[16, 153.6],
|
||||
[17, 155.6],
|
||||
[18, 154.7],
|
||||
[19, 153.1],
|
||||
],
|
||||
mean: [
|
||||
[2, 90.2],
|
||||
[3, 98.3],
|
||||
[4, 105.2],
|
||||
[5, 112.2],
|
||||
[6, 119.0],
|
||||
[7, 125.8],
|
||||
[8, 131.3],
|
||||
[9, 138.6],
|
||||
[10, 144.2],
|
||||
[11, 151.3],
|
||||
[12, 156.7],
|
||||
[13, 158.6],
|
||||
[14, 160.5],
|
||||
[15, 162.1],
|
||||
[16, 162.9],
|
||||
[17, 162.2],
|
||||
[18, 163.0],
|
||||
[19, 163.1],
|
||||
],
|
||||
"75%": [
|
||||
[2, 93.2],
|
||||
[3, 101.5],
|
||||
[4, 107.9],
|
||||
[5, 116.6],
|
||||
[6, 122.8],
|
||||
[7, 129.3],
|
||||
[8, 135.2],
|
||||
[9, 143.7],
|
||||
[10, 148.7],
|
||||
[11, 156.9],
|
||||
[12, 160.8],
|
||||
[13, 163.0],
|
||||
[14, 165.0],
|
||||
[15, 165.8],
|
||||
[16, 168.7],
|
||||
[17, 166.2],
|
||||
[18, 167.6],
|
||||
[19, 168.0],
|
||||
],
|
||||
"85%": [
|
||||
[2, 94.5],
|
||||
[3, 102.8],
|
||||
[4, 110.4],
|
||||
[5, 119.0],
|
||||
[6, 125.7],
|
||||
[7, 131.5],
|
||||
[8, 137.9],
|
||||
[9, 146.0],
|
||||
[10, 151.3],
|
||||
[11, 159.9],
|
||||
[12, 164.0],
|
||||
[13, 166.5],
|
||||
[14, 167.5],
|
||||
[15, 168.5],
|
||||
[16, 171.5],
|
||||
[17, 168.0],
|
||||
[18, 169.8],
|
||||
[19, 170.3],
|
||||
],
|
||||
"50%": [
|
||||
[2, 90.2],
|
||||
[3, 98.1],
|
||||
[4, 105.2],
|
||||
[5, 111.7],
|
||||
[6, 118.2],
|
||||
[7, 125.6],
|
||||
[8, 130.5],
|
||||
[9, 138.3],
|
||||
[10, 143.7],
|
||||
[11, 151.4],
|
||||
[12, 156.7],
|
||||
[13, 157.7],
|
||||
[14, 161.0],
|
||||
[15, 162.0],
|
||||
[16, 162.8],
|
||||
[17, 162.2],
|
||||
[18, 162.8],
|
||||
[19, 163.3],
|
||||
],
|
||||
};
|
||||
|
||||
var dataset = [
|
||||
{
|
||||
label: "Female mean",
|
||||
data: females["mean"],
|
||||
lines: { show: true },
|
||||
color: "rgb(255,50,50)",
|
||||
},
|
||||
{
|
||||
id: "f15%",
|
||||
data: females["15%"],
|
||||
lines: { show: true, lineWidth: 0, fill: false },
|
||||
color: "rgb(255,50,50)",
|
||||
},
|
||||
{
|
||||
id: "f25%",
|
||||
data: females["25%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.2 },
|
||||
color: "rgb(255,50,50)",
|
||||
fillBetween: "f15%",
|
||||
},
|
||||
{
|
||||
id: "f50%",
|
||||
data: females["50%"],
|
||||
lines: { show: true, lineWidth: 0.5, fill: 0.4, shadowSize: 0 },
|
||||
color: "rgb(255,50,50)",
|
||||
fillBetween: "f25%",
|
||||
},
|
||||
{
|
||||
id: "f75%",
|
||||
data: females["75%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.4 },
|
||||
color: "rgb(255,50,50)",
|
||||
fillBetween: "f50%",
|
||||
},
|
||||
{
|
||||
id: "f85%",
|
||||
data: females["85%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.2 },
|
||||
color: "rgb(255,50,50)",
|
||||
fillBetween: "f75%",
|
||||
},
|
||||
|
||||
{
|
||||
label: "Male mean",
|
||||
data: males["mean"],
|
||||
lines: { show: true },
|
||||
color: "rgb(50,50,255)",
|
||||
},
|
||||
{
|
||||
id: "m15%",
|
||||
data: males["15%"],
|
||||
lines: { show: true, lineWidth: 0, fill: false },
|
||||
color: "rgb(50,50,255)",
|
||||
},
|
||||
{
|
||||
id: "m25%",
|
||||
data: males["25%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.2 },
|
||||
color: "rgb(50,50,255)",
|
||||
fillBetween: "m15%",
|
||||
},
|
||||
{
|
||||
id: "m50%",
|
||||
data: males["50%"],
|
||||
lines: { show: true, lineWidth: 0.5, fill: 0.4, shadowSize: 0 },
|
||||
color: "rgb(50,50,255)",
|
||||
fillBetween: "m25%",
|
||||
},
|
||||
{
|
||||
id: "m75%",
|
||||
data: males["75%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.4 },
|
||||
color: "rgb(50,50,255)",
|
||||
fillBetween: "m50%",
|
||||
},
|
||||
{
|
||||
id: "m85%",
|
||||
data: males["85%"],
|
||||
lines: { show: true, lineWidth: 0, fill: 0.2 },
|
||||
color: "rgb(50,50,255)",
|
||||
fillBetween: "m75%",
|
||||
},
|
||||
];
|
||||
|
||||
$.plot($("#placeholder"), dataset, {
|
||||
xaxis: {
|
||||
tickDecimals: 0,
|
||||
},
|
||||
yaxis: {
|
||||
tickFormatter: function (v) {
|
||||
return v + " cm";
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
position: "se",
|
||||
},
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Percentiles</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Height in centimeters of individuals from the US (2003-2006) as function
|
||||
of age in years (source:
|
||||
<a href="http://www.cdc.gov/nchs/data/nhsr/nhsr010.pdf">CDC</a>). The
|
||||
15%-85%, 25%-75% and 50% percentiles are indicated.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For each point of a filled curve, you can specify an arbitrary bottom.
|
||||
As this example illustrates, this can be useful for plotting
|
||||
percentiles. If you have the data sets available without appropriate
|
||||
fill bottoms, you can use the fillbetween plugin to compute the data
|
||||
point bottoms automatically.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Real-time updates</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// We use an inline data source in the example, usually data would
|
||||
// be fetched from a server
|
||||
|
||||
var data = [],
|
||||
totalPoints = 300;
|
||||
|
||||
function getRandomData() {
|
||||
if (data.length > 0) data = data.slice(1);
|
||||
|
||||
// Do a random walk
|
||||
|
||||
while (data.length < totalPoints) {
|
||||
var prev = data.length > 0 ? data[data.length - 1] : 50,
|
||||
y = prev + Math.random() * 10 - 5;
|
||||
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
} else if (y > 100) {
|
||||
y = 100;
|
||||
}
|
||||
|
||||
data.push(y);
|
||||
}
|
||||
|
||||
// Zip the generated y values with the x values
|
||||
|
||||
var res = [];
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
res.push([i, data[i]]);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// Set up the control widget
|
||||
|
||||
var updateInterval = 30;
|
||||
$("#updateInterval")
|
||||
.val(updateInterval)
|
||||
.change(function () {
|
||||
var v = $(this).val();
|
||||
if (v && !isNaN(+v)) {
|
||||
updateInterval = +v;
|
||||
if (updateInterval < 1) {
|
||||
updateInterval = 1;
|
||||
} else if (updateInterval > 2000) {
|
||||
updateInterval = 2000;
|
||||
}
|
||||
$(this).val("" + updateInterval);
|
||||
}
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholder", [getRandomData()], {
|
||||
series: {
|
||||
shadowSize: 0, // Drawing is faster without shadows
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
},
|
||||
xaxis: {
|
||||
show: false,
|
||||
},
|
||||
});
|
||||
|
||||
function update() {
|
||||
plot.setData([getRandomData()]);
|
||||
|
||||
// Since the axes don't change, we don't need to call plot.setupGrid()
|
||||
|
||||
plot.draw();
|
||||
setTimeout(update, updateInterval);
|
||||
}
|
||||
|
||||
update();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Real-time updates</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You can update a chart periodically to get a real-time effect by using a
|
||||
timer to insert the new data in the plot and redraw it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Time between updates:
|
||||
<input
|
||||
id="updateInterval"
|
||||
type="text"
|
||||
value=""
|
||||
style="text-align: right; width: 5em"
|
||||
/>
|
||||
milliseconds
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Resizing</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<link
|
||||
href="../shared/jquery-ui/jquery-ui.min.css"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../shared/jquery-ui/jquery-ui.min.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.resize.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [
|
||||
[0, 3],
|
||||
[4, 8],
|
||||
[8, 5],
|
||||
[9, 13],
|
||||
];
|
||||
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
|
||||
|
||||
var placeholder = $("#placeholder");
|
||||
var plot = $.plot(placeholder, [d1, d2, d3]);
|
||||
|
||||
// The plugin includes a jQuery plugin for adding resize events to any
|
||||
// element. Add a callback so we can display the placeholder size.
|
||||
|
||||
placeholder.resize(function () {
|
||||
$(".message").text(
|
||||
"Placeholder is now " +
|
||||
$(this).width() +
|
||||
"x" +
|
||||
$(this).height() +
|
||||
" pixels"
|
||||
);
|
||||
});
|
||||
|
||||
$(".demo-container").resizable({
|
||||
maxWidth: 900,
|
||||
maxHeight: 500,
|
||||
minWidth: 450,
|
||||
minHeight: 250,
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Resizing</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p class="message"></p>
|
||||
|
||||
<p>
|
||||
Sometimes it makes more sense to just let the plot take up the available
|
||||
space. In that case, we need to redraw the plot each time the
|
||||
placeholder changes its size. If you include the resize plugin, this is
|
||||
handled automatically.
|
||||
</p>
|
||||
|
||||
<p>Drag the bottom and right sides of the plot to resize it.</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+301
@@ -0,0 +1,301 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Selection</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.selection.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// Shim allowing us to get the state of the check-box on jQuery versions
|
||||
// prior to 1.6, when prop was added. The reason we don't just use attr
|
||||
// is because it doesn't work in jQuery versions 1.9.x and later.
|
||||
|
||||
// TODO: Remove this once Flot's minimum supported jQuery reaches 1.6.
|
||||
if (typeof $.fn.prop != "function") {
|
||||
$.fn.prop = $.fn.attr;
|
||||
}
|
||||
|
||||
var data = [
|
||||
{
|
||||
label: "United States",
|
||||
data: [
|
||||
[1990, 18.9],
|
||||
[1991, 18.7],
|
||||
[1992, 18.4],
|
||||
[1993, 19.3],
|
||||
[1994, 19.5],
|
||||
[1995, 19.3],
|
||||
[1996, 19.4],
|
||||
[1997, 20.2],
|
||||
[1998, 19.8],
|
||||
[1999, 19.9],
|
||||
[2000, 20.4],
|
||||
[2001, 20.1],
|
||||
[2002, 20.0],
|
||||
[2003, 19.8],
|
||||
[2004, 20.4],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Russia",
|
||||
data: [
|
||||
[1992, 13.4],
|
||||
[1993, 12.2],
|
||||
[1994, 10.6],
|
||||
[1995, 10.2],
|
||||
[1996, 10.1],
|
||||
[1997, 9.7],
|
||||
[1998, 9.5],
|
||||
[1999, 9.7],
|
||||
[2000, 9.9],
|
||||
[2001, 9.9],
|
||||
[2002, 9.9],
|
||||
[2003, 10.3],
|
||||
[2004, 10.5],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "United Kingdom",
|
||||
data: [
|
||||
[1990, 10.0],
|
||||
[1991, 11.3],
|
||||
[1992, 9.9],
|
||||
[1993, 9.6],
|
||||
[1994, 9.5],
|
||||
[1995, 9.5],
|
||||
[1996, 9.9],
|
||||
[1997, 9.3],
|
||||
[1998, 9.2],
|
||||
[1999, 9.2],
|
||||
[2000, 9.5],
|
||||
[2001, 9.6],
|
||||
[2002, 9.3],
|
||||
[2003, 9.4],
|
||||
[2004, 9.79],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Germany",
|
||||
data: [
|
||||
[1990, 12.4],
|
||||
[1991, 11.2],
|
||||
[1992, 10.8],
|
||||
[1993, 10.5],
|
||||
[1994, 10.4],
|
||||
[1995, 10.2],
|
||||
[1996, 10.5],
|
||||
[1997, 10.2],
|
||||
[1998, 10.1],
|
||||
[1999, 9.6],
|
||||
[2000, 9.7],
|
||||
[2001, 10.0],
|
||||
[2002, 9.7],
|
||||
[2003, 9.8],
|
||||
[2004, 9.79],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Denmark",
|
||||
data: [
|
||||
[1990, 9.7],
|
||||
[1991, 12.1],
|
||||
[1992, 10.3],
|
||||
[1993, 11.3],
|
||||
[1994, 11.7],
|
||||
[1995, 10.6],
|
||||
[1996, 12.8],
|
||||
[1997, 10.8],
|
||||
[1998, 10.3],
|
||||
[1999, 9.4],
|
||||
[2000, 8.7],
|
||||
[2001, 9.0],
|
||||
[2002, 8.9],
|
||||
[2003, 10.1],
|
||||
[2004, 9.8],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Sweden",
|
||||
data: [
|
||||
[1990, 5.8],
|
||||
[1991, 6.0],
|
||||
[1992, 5.9],
|
||||
[1993, 5.5],
|
||||
[1994, 5.7],
|
||||
[1995, 5.3],
|
||||
[1996, 6.1],
|
||||
[1997, 5.4],
|
||||
[1998, 5.4],
|
||||
[1999, 5.1],
|
||||
[2000, 5.2],
|
||||
[2001, 5.4],
|
||||
[2002, 6.2],
|
||||
[2003, 5.9],
|
||||
[2004, 5.89],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Norway",
|
||||
data: [
|
||||
[1990, 8.3],
|
||||
[1991, 8.3],
|
||||
[1992, 7.8],
|
||||
[1993, 8.3],
|
||||
[1994, 8.4],
|
||||
[1995, 5.9],
|
||||
[1996, 6.4],
|
||||
[1997, 6.7],
|
||||
[1998, 6.9],
|
||||
[1999, 7.6],
|
||||
[2000, 7.4],
|
||||
[2001, 8.1],
|
||||
[2002, 12.5],
|
||||
[2003, 9.9],
|
||||
[2004, 19.0],
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
points: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
noColumns: 2,
|
||||
},
|
||||
xaxis: {
|
||||
tickDecimals: 0,
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
},
|
||||
selection: {
|
||||
mode: "x",
|
||||
},
|
||||
};
|
||||
|
||||
var placeholder = $("#placeholder");
|
||||
|
||||
placeholder.bind("plotselected", function (event, ranges) {
|
||||
$("#selection").text(
|
||||
ranges.xaxis.from.toFixed(1) + " to " + ranges.xaxis.to.toFixed(1)
|
||||
);
|
||||
|
||||
var zoom = $("#zoom").prop("checked");
|
||||
|
||||
if (zoom) {
|
||||
$.each(plot.getXAxes(), function (_, axis) {
|
||||
var opts = axis.options;
|
||||
opts.min = ranges.xaxis.from;
|
||||
opts.max = ranges.xaxis.to;
|
||||
});
|
||||
plot.setupGrid();
|
||||
plot.draw();
|
||||
plot.clearSelection();
|
||||
}
|
||||
});
|
||||
|
||||
placeholder.bind("plotunselected", function (event) {
|
||||
$("#selection").text("");
|
||||
});
|
||||
|
||||
var plot = $.plot(placeholder, data, options);
|
||||
|
||||
$("#clearSelection").click(function () {
|
||||
plot.clearSelection();
|
||||
});
|
||||
|
||||
$("#setSelection").click(function () {
|
||||
plot.setSelection({
|
||||
xaxis: {
|
||||
from: 1994,
|
||||
to: 1995,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Selection</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
1000 kg. CO<sub>2</sub> emissions per year per capita for various
|
||||
countries (source:
|
||||
<a
|
||||
href="http://en.wikipedia.org/wiki/List_of_countries_by_carbon_dioxide_emissions_per_capita"
|
||||
>Wikipedia</a
|
||||
>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Flot supports selections through the selection plugin. You can enable
|
||||
rectangular selection or one-dimensional selection if the user should
|
||||
only be able to select on one axis. Try left-click and drag on the plot
|
||||
above where selection on the x axis is enabled.
|
||||
</p>
|
||||
|
||||
<p>You selected: <span id="selection"></span></p>
|
||||
|
||||
<p>
|
||||
The plot command returns a plot object you can use to control the
|
||||
selection. Click the buttons below.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button id="clearSelection">Clear selection</button>
|
||||
<button id="setSelection">Select year 1994</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Selections are really useful for zooming. Just replot the chart with min
|
||||
and max values for the axes set to the values in the "plotselected"
|
||||
event triggered. Enable the checkbox below and select a region again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label><input id="zoom" type="checkbox" />Zoom to selection.</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+182
@@ -0,0 +1,182 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Error Bars</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.errorbars.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.navigate.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
function drawArrow(ctx, x, y, radius) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + radius, y + radius);
|
||||
ctx.lineTo(x, y);
|
||||
ctx.lineTo(x - radius, y + radius);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
function drawSemiCircle(ctx, x, y, radius) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(x, y, radius, 0, Math.PI, false);
|
||||
ctx.moveTo(x - radius, y);
|
||||
ctx.lineTo(x + radius, y);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
var data1 = [
|
||||
[1, 1, 0.5, 0.1, 0.3],
|
||||
[2, 2, 0.3, 0.5, 0.2],
|
||||
[3, 3, 0.9, 0.5, 0.2],
|
||||
[1.5, -0.05, 0.5, 0.1, 0.3],
|
||||
[3.15, 1, 0.5, 0.1, 0.3],
|
||||
[2.5, -1, 0.5, 0.1, 0.3],
|
||||
];
|
||||
|
||||
var data1_points = {
|
||||
show: true,
|
||||
radius: 5,
|
||||
fillColor: "blue",
|
||||
errorbars: "xy",
|
||||
xerr: { show: true, asymmetric: true, upperCap: "-", lowerCap: "-" },
|
||||
yerr: { show: true, color: "red", upperCap: "-" },
|
||||
};
|
||||
|
||||
var data2 = [
|
||||
[0.7, 3, 0.2, 0.4],
|
||||
[1.5, 2.2, 0.3, 0.4],
|
||||
[2.3, 1, 0.5, 0.2],
|
||||
];
|
||||
|
||||
var data2_points = {
|
||||
show: true,
|
||||
radius: 5,
|
||||
errorbars: "y",
|
||||
yerr: {
|
||||
show: true,
|
||||
asymmetric: true,
|
||||
upperCap: drawArrow,
|
||||
lowerCap: drawSemiCircle,
|
||||
},
|
||||
};
|
||||
|
||||
var data3 = [
|
||||
[1, 2, 0.4],
|
||||
[2, 0.5, 0.3],
|
||||
[2.7, 2, 0.5],
|
||||
];
|
||||
|
||||
var data3_points = {
|
||||
//do not show points
|
||||
radius: 0,
|
||||
errorbars: "y",
|
||||
yerr: { show: true, upperCap: "-", lowerCap: "-", radius: 5 },
|
||||
};
|
||||
|
||||
var data4 = [
|
||||
[1.3, 1],
|
||||
[1.75, 2.5],
|
||||
[2.5, 0.5],
|
||||
];
|
||||
|
||||
var data4_errors = [0.1, 0.4, 0.2];
|
||||
for (var i = 0; i < data4.length; i++) {
|
||||
data4_errors[i] = data4[i].concat(data4_errors[i]);
|
||||
}
|
||||
|
||||
var data = [
|
||||
{ color: "blue", points: data1_points, data: data1, label: "data1" },
|
||||
{ color: "red", points: data2_points, data: data2, label: "data2" },
|
||||
{
|
||||
color: "green",
|
||||
lines: { show: true },
|
||||
points: data3_points,
|
||||
data: data3,
|
||||
label: "data3",
|
||||
},
|
||||
// bars with errors
|
||||
{
|
||||
color: "orange",
|
||||
bars: { show: true, align: "center", barWidth: 0.25 },
|
||||
data: data4,
|
||||
label: "data4",
|
||||
},
|
||||
{ color: "orange", points: data3_points, data: data4_errors },
|
||||
];
|
||||
|
||||
$.plot($("#placeholder"), data, {
|
||||
legend: {
|
||||
position: "sw",
|
||||
show: true,
|
||||
},
|
||||
series: {
|
||||
lines: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
xaxis: {
|
||||
min: 0.6,
|
||||
max: 3.1,
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
max: 3.5,
|
||||
},
|
||||
zoom: {
|
||||
interactive: true,
|
||||
},
|
||||
pan: {
|
||||
interactive: true,
|
||||
},
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Error Bars</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With the errorbars plugin you can plot error bars to show standard
|
||||
deviation and other useful statistical properties.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+1141
File diff suppressed because it is too large
Load Diff
Vendored
+284
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Toggling Series</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var datasets = {
|
||||
usa: {
|
||||
label: "USA",
|
||||
data: [
|
||||
[1988, 483994],
|
||||
[1989, 479060],
|
||||
[1990, 457648],
|
||||
[1991, 401949],
|
||||
[1992, 424705],
|
||||
[1993, 402375],
|
||||
[1994, 377867],
|
||||
[1995, 357382],
|
||||
[1996, 337946],
|
||||
[1997, 336185],
|
||||
[1998, 328611],
|
||||
[1999, 329421],
|
||||
[2000, 342172],
|
||||
[2001, 344932],
|
||||
[2002, 387303],
|
||||
[2003, 440813],
|
||||
[2004, 480451],
|
||||
[2005, 504638],
|
||||
[2006, 528692],
|
||||
],
|
||||
},
|
||||
russia: {
|
||||
label: "Russia",
|
||||
data: [
|
||||
[1988, 218000],
|
||||
[1989, 203000],
|
||||
[1990, 171000],
|
||||
[1992, 42500],
|
||||
[1993, 37600],
|
||||
[1994, 36600],
|
||||
[1995, 21700],
|
||||
[1996, 19200],
|
||||
[1997, 21300],
|
||||
[1998, 13600],
|
||||
[1999, 14000],
|
||||
[2000, 19100],
|
||||
[2001, 21300],
|
||||
[2002, 23600],
|
||||
[2003, 25100],
|
||||
[2004, 26100],
|
||||
[2005, 31100],
|
||||
[2006, 34700],
|
||||
],
|
||||
},
|
||||
uk: {
|
||||
label: "UK",
|
||||
data: [
|
||||
[1988, 62982],
|
||||
[1989, 62027],
|
||||
[1990, 60696],
|
||||
[1991, 62348],
|
||||
[1992, 58560],
|
||||
[1993, 56393],
|
||||
[1994, 54579],
|
||||
[1995, 50818],
|
||||
[1996, 50554],
|
||||
[1997, 48276],
|
||||
[1998, 47691],
|
||||
[1999, 47529],
|
||||
[2000, 47778],
|
||||
[2001, 48760],
|
||||
[2002, 50949],
|
||||
[2003, 57452],
|
||||
[2004, 60234],
|
||||
[2005, 60076],
|
||||
[2006, 59213],
|
||||
],
|
||||
},
|
||||
germany: {
|
||||
label: "Germany",
|
||||
data: [
|
||||
[1988, 55627],
|
||||
[1989, 55475],
|
||||
[1990, 58464],
|
||||
[1991, 55134],
|
||||
[1992, 52436],
|
||||
[1993, 47139],
|
||||
[1994, 43962],
|
||||
[1995, 43238],
|
||||
[1996, 42395],
|
||||
[1997, 40854],
|
||||
[1998, 40993],
|
||||
[1999, 41822],
|
||||
[2000, 41147],
|
||||
[2001, 40474],
|
||||
[2002, 40604],
|
||||
[2003, 40044],
|
||||
[2004, 38816],
|
||||
[2005, 38060],
|
||||
[2006, 36984],
|
||||
],
|
||||
},
|
||||
denmark: {
|
||||
label: "Denmark",
|
||||
data: [
|
||||
[1988, 3813],
|
||||
[1989, 3719],
|
||||
[1990, 3722],
|
||||
[1991, 3789],
|
||||
[1992, 3720],
|
||||
[1993, 3730],
|
||||
[1994, 3636],
|
||||
[1995, 3598],
|
||||
[1996, 3610],
|
||||
[1997, 3655],
|
||||
[1998, 3695],
|
||||
[1999, 3673],
|
||||
[2000, 3553],
|
||||
[2001, 3774],
|
||||
[2002, 3728],
|
||||
[2003, 3618],
|
||||
[2004, 3638],
|
||||
[2005, 3467],
|
||||
[2006, 3770],
|
||||
],
|
||||
},
|
||||
sweden: {
|
||||
label: "Sweden",
|
||||
data: [
|
||||
[1988, 6402],
|
||||
[1989, 6474],
|
||||
[1990, 6605],
|
||||
[1991, 6209],
|
||||
[1992, 6035],
|
||||
[1993, 6020],
|
||||
[1994, 6000],
|
||||
[1995, 6018],
|
||||
[1996, 3958],
|
||||
[1997, 5780],
|
||||
[1998, 5954],
|
||||
[1999, 6178],
|
||||
[2000, 6411],
|
||||
[2001, 5993],
|
||||
[2002, 5833],
|
||||
[2003, 5791],
|
||||
[2004, 5450],
|
||||
[2005, 5521],
|
||||
[2006, 5271],
|
||||
],
|
||||
},
|
||||
norway: {
|
||||
label: "Norway",
|
||||
data: [
|
||||
[1988, 4382],
|
||||
[1989, 4498],
|
||||
[1990, 4535],
|
||||
[1991, 4398],
|
||||
[1992, 4766],
|
||||
[1993, 4441],
|
||||
[1994, 4670],
|
||||
[1995, 4217],
|
||||
[1996, 4275],
|
||||
[1997, 4203],
|
||||
[1998, 4482],
|
||||
[1999, 4506],
|
||||
[2000, 4358],
|
||||
[2001, 4385],
|
||||
[2002, 5269],
|
||||
[2003, 5066],
|
||||
[2004, 5194],
|
||||
[2005, 4887],
|
||||
[2006, 4891],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
// hard-code color indices to prevent them from shifting as
|
||||
// countries are turned on/off
|
||||
|
||||
var i = 0;
|
||||
$.each(datasets, function (key, val) {
|
||||
val.color = i;
|
||||
++i;
|
||||
});
|
||||
|
||||
// insert checkboxes
|
||||
var choiceContainer = $("#choices");
|
||||
$.each(datasets, function (key, val) {
|
||||
choiceContainer.append(
|
||||
"<br/><input type='checkbox' name='" +
|
||||
key +
|
||||
"' checked='checked' id='id" +
|
||||
key +
|
||||
"'></input>" +
|
||||
"<label for='id" +
|
||||
key +
|
||||
"'>" +
|
||||
val.label +
|
||||
"</label>"
|
||||
);
|
||||
});
|
||||
|
||||
choiceContainer.find("input").click(plotAccordingToChoices);
|
||||
|
||||
function plotAccordingToChoices() {
|
||||
var data = [];
|
||||
|
||||
choiceContainer.find("input:checked").each(function () {
|
||||
var key = $(this).attr("name");
|
||||
if (key && datasets[key]) {
|
||||
data.push(datasets[key]);
|
||||
}
|
||||
});
|
||||
|
||||
if (data.length > 0) {
|
||||
$.plot("#placeholder", data, {
|
||||
yaxis: {
|
||||
min: 0,
|
||||
},
|
||||
xaxis: {
|
||||
tickDecimals: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
plotAccordingToChoices();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Toggling Series</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div
|
||||
id="placeholder"
|
||||
class="demo-placeholder"
|
||||
style="float: left; width: 675px"
|
||||
></div>
|
||||
<p id="choices" style="float: right; width: 135px"></p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
This example shows military budgets for various countries in constant
|
||||
(2005) million US dollars (source:
|
||||
<a href="http://www.sipri.org/">SIPRI</a>).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since all data is available client-side, it's pretty easy to make the
|
||||
plot interactive. Try turning countries on and off with the checkboxes
|
||||
next to the plot.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
+110
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Series Types</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [
|
||||
[0, 3],
|
||||
[4, 8],
|
||||
[8, 5],
|
||||
[9, 13],
|
||||
];
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d3.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
var d4 = [];
|
||||
for (var i = 0; i < 14; i += 0.1) {
|
||||
d4.push([i, Math.sqrt(i * 10)]);
|
||||
}
|
||||
|
||||
var d5 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d5.push([i, Math.sqrt(i)]);
|
||||
}
|
||||
|
||||
var d6 = [];
|
||||
for (var i = 0; i < 14; i += 0.5 + Math.random()) {
|
||||
d6.push([i, Math.sqrt(2 * i + Math.sin(i) + 5)]);
|
||||
}
|
||||
|
||||
$.plot("#placeholder", [
|
||||
{
|
||||
data: d1,
|
||||
lines: { show: true, fill: true },
|
||||
},
|
||||
{
|
||||
data: d2,
|
||||
bars: { show: true },
|
||||
},
|
||||
{
|
||||
data: d3,
|
||||
points: { show: true },
|
||||
},
|
||||
{
|
||||
data: d4,
|
||||
lines: { show: true },
|
||||
},
|
||||
{
|
||||
data: d5,
|
||||
lines: { show: true },
|
||||
points: { show: true },
|
||||
},
|
||||
{
|
||||
data: d6,
|
||||
lines: { show: true, steps: true },
|
||||
},
|
||||
]);
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Series Types</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Flot supports lines, points, filled areas, bars and any combinations of
|
||||
these, in the same plot and even on the same data series.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
/*! jQuery UI - v1.10.0 - 2013-01-26
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.resizable.css
|
||||
* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
|
||||
|
||||
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Stacking</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.stack.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i <= 10; i += 1) {
|
||||
d1.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i <= 10; i += 1) {
|
||||
d2.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i <= 10; i += 1) {
|
||||
d3.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var stack = 0,
|
||||
bars = true,
|
||||
lines = false,
|
||||
steps = false;
|
||||
|
||||
function plotWithOptions() {
|
||||
$.plot("#placeholder", [d1, d2, d3], {
|
||||
series: {
|
||||
stack: stack,
|
||||
lines: {
|
||||
show: lines,
|
||||
fill: true,
|
||||
steps: steps,
|
||||
},
|
||||
bars: {
|
||||
show: bars,
|
||||
barWidth: 0.6,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
plotWithOptions();
|
||||
|
||||
$(".stackControls button").click(function (e) {
|
||||
e.preventDefault();
|
||||
stack = $(this).text() == "With stacking" ? true : null;
|
||||
plotWithOptions();
|
||||
});
|
||||
|
||||
$(".graphControls button").click(function (e) {
|
||||
e.preventDefault();
|
||||
bars = $(this).text().indexOf("Bars") != -1;
|
||||
lines = $(this).text().indexOf("Lines") != -1;
|
||||
steps = $(this).text().indexOf("steps") != -1;
|
||||
plotWithOptions();
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Stacking</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With the stack plugin, you can have Flot stack the series. This is
|
||||
useful if you wish to display both a total and the constituents it is
|
||||
made of. The only requirement is that you provide the input sorted on x.
|
||||
</p>
|
||||
|
||||
<p class="stackControls">
|
||||
<button>With stacking</button>
|
||||
<button>Without stacking</button>
|
||||
</p>
|
||||
|
||||
<p class="graphControls">
|
||||
<button>Bars</button>
|
||||
<button>Lines</button>
|
||||
<button>Lines with steps</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Symbols</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.symbol.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
function generate(offset, amplitude) {
|
||||
var res = [];
|
||||
var start = 0,
|
||||
end = 10;
|
||||
|
||||
for (var i = 0; i <= 50; ++i) {
|
||||
var x = start + (i / 50) * (end - start);
|
||||
res.push([x, amplitude * Math.sin(x + offset)]);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
var data = [
|
||||
{ data: generate(2, 1.8), points: { symbol: "circle" } },
|
||||
{ data: generate(3, 1.5), points: { symbol: "square" } },
|
||||
{ data: generate(4, 0.9), points: { symbol: "diamond" } },
|
||||
{ data: generate(6, 1.4), points: { symbol: "triangle" } },
|
||||
{ data: generate(7, 1.1), points: { symbol: "cross" } },
|
||||
];
|
||||
|
||||
$.plot("#placeholder", data, {
|
||||
series: {
|
||||
points: {
|
||||
show: true,
|
||||
radius: 3,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
hoverable: true,
|
||||
},
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Symbols</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Points can be marked in several ways, with circles being the built-in
|
||||
default. For other point types, you can define a callback function to
|
||||
draw the symbol. Some common symbols are available in the symbol plugin.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Thresholds</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.threshold.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i <= 60; i += 1) {
|
||||
d1.push([i, parseInt(Math.random() * 30 - 10)]);
|
||||
}
|
||||
|
||||
function plotWithOptions(t) {
|
||||
$.plot("#placeholder", [
|
||||
{
|
||||
data: d1,
|
||||
color: "rgb(30, 180, 20)",
|
||||
threshold: {
|
||||
below: t,
|
||||
color: "rgb(200, 20, 30)",
|
||||
},
|
||||
lines: {
|
||||
steps: true,
|
||||
},
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
plotWithOptions(0);
|
||||
|
||||
$(".controls button").click(function (e) {
|
||||
e.preventDefault();
|
||||
var t = parseFloat($(this).text().replace("Threshold at ", ""));
|
||||
plotWithOptions(t);
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Thresholds</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With the threshold plugin, you can apply a specific color to the part of
|
||||
a data series below a threshold. This is can be useful for highlighting
|
||||
negative values, e.g. when displaying net results or what's in stock.
|
||||
</p>
|
||||
|
||||
<p class="controls">
|
||||
<button>Threshold at 5</button>
|
||||
<button>Threshold at 0</button>
|
||||
<button>Threshold at -2.5</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Tracking</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.crosshair.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var sin = [],
|
||||
cos = [];
|
||||
for (var i = 0; i < 14; i += 0.1) {
|
||||
sin.push([i, Math.sin(i)]);
|
||||
cos.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
plot = $.plot(
|
||||
"#placeholder",
|
||||
[
|
||||
{ data: sin, label: "sin(x) = -0.00" },
|
||||
{ data: cos, label: "cos(x) = -0.00" },
|
||||
],
|
||||
{
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
crosshair: {
|
||||
mode: "x",
|
||||
},
|
||||
grid: {
|
||||
hoverable: true,
|
||||
autoHighlight: false,
|
||||
},
|
||||
yaxis: {
|
||||
min: -1.2,
|
||||
max: 1.2,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
var legends = $("#placeholder .legendLabel");
|
||||
|
||||
legends.each(function () {
|
||||
// fix the widths so they don't jump around
|
||||
$(this).css("width", $(this).width());
|
||||
});
|
||||
|
||||
var updateLegendTimeout = null;
|
||||
var latestPosition = null;
|
||||
|
||||
function updateLegend() {
|
||||
updateLegendTimeout = null;
|
||||
|
||||
var pos = latestPosition;
|
||||
|
||||
var axes = plot.getAxes();
|
||||
if (
|
||||
pos.x < axes.xaxis.min ||
|
||||
pos.x > axes.xaxis.max ||
|
||||
pos.y < axes.yaxis.min ||
|
||||
pos.y > axes.yaxis.max
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
var i,
|
||||
j,
|
||||
dataset = plot.getData();
|
||||
for (i = 0; i < dataset.length; ++i) {
|
||||
var series = dataset[i];
|
||||
|
||||
// Find the nearest points, x-wise
|
||||
|
||||
for (j = 0; j < series.data.length; ++j) {
|
||||
if (series.data[j][0] > pos.x) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Now Interpolate
|
||||
|
||||
var y,
|
||||
p1 = series.data[j - 1],
|
||||
p2 = series.data[j];
|
||||
|
||||
if (p1 == null) {
|
||||
y = p2[1];
|
||||
} else if (p2 == null) {
|
||||
y = p1[1];
|
||||
} else {
|
||||
y = p1[1] + ((p2[1] - p1[1]) * (pos.x - p1[0])) / (p2[0] - p1[0]);
|
||||
}
|
||||
|
||||
legends
|
||||
.eq(i)
|
||||
.text(series.label.replace(/=.*/, "= " + y.toFixed(2)));
|
||||
}
|
||||
}
|
||||
|
||||
$("#placeholder").bind("plothover", function (event, pos, item) {
|
||||
latestPosition = pos;
|
||||
if (!updateLegendTimeout) {
|
||||
updateLegendTimeout = setTimeout(updateLegend, 50);
|
||||
}
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Tracking</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You can add crosshairs that'll track the mouse position, either on both
|
||||
axes or as here on only one.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you combine it with listening on hover events, you can use it to
|
||||
track the intersection on the curves by interpolating the data points
|
||||
(look at the legend).
|
||||
</p>
|
||||
|
||||
<p id="hoverdata"></p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Visitors</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.time.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.selection.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var d = [
|
||||
[1196463600000, 0],
|
||||
[1196550000000, 0],
|
||||
[1196636400000, 0],
|
||||
[1196722800000, 77],
|
||||
[1196809200000, 3636],
|
||||
[1196895600000, 3575],
|
||||
[1196982000000, 2736],
|
||||
[1197068400000, 1086],
|
||||
[1197154800000, 676],
|
||||
[1197241200000, 1205],
|
||||
[1197327600000, 906],
|
||||
[1197414000000, 710],
|
||||
[1197500400000, 639],
|
||||
[1197586800000, 540],
|
||||
[1197673200000, 435],
|
||||
[1197759600000, 301],
|
||||
[1197846000000, 575],
|
||||
[1197932400000, 481],
|
||||
[1198018800000, 591],
|
||||
[1198105200000, 608],
|
||||
[1198191600000, 459],
|
||||
[1198278000000, 234],
|
||||
[1198364400000, 1352],
|
||||
[1198450800000, 686],
|
||||
[1198537200000, 279],
|
||||
[1198623600000, 449],
|
||||
[1198710000000, 468],
|
||||
[1198796400000, 392],
|
||||
[1198882800000, 282],
|
||||
[1198969200000, 208],
|
||||
[1199055600000, 229],
|
||||
[1199142000000, 177],
|
||||
[1199228400000, 374],
|
||||
[1199314800000, 436],
|
||||
[1199401200000, 404],
|
||||
[1199487600000, 253],
|
||||
[1199574000000, 218],
|
||||
[1199660400000, 476],
|
||||
[1199746800000, 462],
|
||||
[1199833200000, 448],
|
||||
[1199919600000, 442],
|
||||
[1200006000000, 403],
|
||||
[1200092400000, 204],
|
||||
[1200178800000, 194],
|
||||
[1200265200000, 327],
|
||||
[1200351600000, 374],
|
||||
[1200438000000, 507],
|
||||
[1200524400000, 546],
|
||||
[1200610800000, 482],
|
||||
[1200697200000, 283],
|
||||
[1200783600000, 221],
|
||||
[1200870000000, 483],
|
||||
[1200956400000, 523],
|
||||
[1201042800000, 528],
|
||||
[1201129200000, 483],
|
||||
[1201215600000, 452],
|
||||
[1201302000000, 270],
|
||||
[1201388400000, 222],
|
||||
[1201474800000, 439],
|
||||
[1201561200000, 559],
|
||||
[1201647600000, 521],
|
||||
[1201734000000, 477],
|
||||
[1201820400000, 442],
|
||||
[1201906800000, 252],
|
||||
[1201993200000, 236],
|
||||
[1202079600000, 525],
|
||||
[1202166000000, 477],
|
||||
[1202252400000, 386],
|
||||
[1202338800000, 409],
|
||||
[1202425200000, 408],
|
||||
[1202511600000, 237],
|
||||
[1202598000000, 193],
|
||||
[1202684400000, 357],
|
||||
[1202770800000, 414],
|
||||
[1202857200000, 393],
|
||||
[1202943600000, 353],
|
||||
[1203030000000, 364],
|
||||
[1203116400000, 215],
|
||||
[1203202800000, 214],
|
||||
[1203289200000, 356],
|
||||
[1203375600000, 399],
|
||||
[1203462000000, 334],
|
||||
[1203548400000, 348],
|
||||
[1203634800000, 243],
|
||||
[1203721200000, 126],
|
||||
[1203807600000, 157],
|
||||
[1203894000000, 288],
|
||||
];
|
||||
|
||||
// first correct the timestamps - they are recorded as the daily
|
||||
// midnights in UTC+0100, but Flot always displays dates in UTC
|
||||
// so we have to add one hour to hit the midnights in the plot
|
||||
|
||||
for (var i = 0; i < d.length; ++i) {
|
||||
d[i][0] += 60 * 60 * 1000;
|
||||
}
|
||||
|
||||
// helper for returning the weekends in a period
|
||||
|
||||
function weekendAreas(axes) {
|
||||
var markings = [],
|
||||
d = new Date(axes.xaxis.min);
|
||||
|
||||
// go to the first Saturday
|
||||
|
||||
d.setUTCDate(d.getUTCDate() - ((d.getUTCDay() + 1) % 7));
|
||||
d.setUTCSeconds(0);
|
||||
d.setUTCMinutes(0);
|
||||
d.setUTCHours(0);
|
||||
|
||||
var i = d.getTime();
|
||||
|
||||
// when we don't set yaxis, the rectangle automatically
|
||||
// extends to infinity upwards and downwards
|
||||
|
||||
do {
|
||||
markings.push({
|
||||
xaxis: { from: i, to: i + 2 * 24 * 60 * 60 * 1000 },
|
||||
});
|
||||
i += 7 * 24 * 60 * 60 * 1000;
|
||||
} while (i < axes.xaxis.max);
|
||||
|
||||
return markings;
|
||||
}
|
||||
|
||||
var options = {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
tickLength: 5,
|
||||
},
|
||||
selection: {
|
||||
mode: "x",
|
||||
},
|
||||
grid: {
|
||||
markings: weekendAreas,
|
||||
},
|
||||
};
|
||||
|
||||
var plot = $.plot("#placeholder", [d], options);
|
||||
|
||||
var overview = $.plot("#overview", [d], {
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
lineWidth: 1,
|
||||
},
|
||||
shadowSize: 0,
|
||||
},
|
||||
xaxis: {
|
||||
ticks: [],
|
||||
mode: "time",
|
||||
},
|
||||
yaxis: {
|
||||
ticks: [],
|
||||
min: 0,
|
||||
autoscaleMargin: 0.1,
|
||||
},
|
||||
selection: {
|
||||
mode: "x",
|
||||
},
|
||||
});
|
||||
|
||||
// now connect the two
|
||||
|
||||
$("#placeholder").bind("plotselected", function (event, ranges) {
|
||||
// do the zooming
|
||||
$.each(plot.getXAxes(), function (_, axis) {
|
||||
var opts = axis.options;
|
||||
opts.min = ranges.xaxis.from;
|
||||
opts.max = ranges.xaxis.to;
|
||||
});
|
||||
plot.setupGrid();
|
||||
plot.draw();
|
||||
plot.clearSelection();
|
||||
|
||||
// don't fire event on the overview to prevent eternal loop
|
||||
|
||||
overview.setSelection(ranges, true);
|
||||
});
|
||||
|
||||
$("#overview").bind("plotselected", function (event, ranges) {
|
||||
plot.setSelection(ranges);
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Visitors</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<div class="demo-container" style="height: 150px">
|
||||
<div id="overview" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
This plot shows visitors per day to the Flot homepage, with weekends
|
||||
colored.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The smaller plot is linked to the main plot, so it acts as an overview.
|
||||
Try dragging a selection on either plot, and watch the behavior of the
|
||||
other.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Flot Examples: Selection and zooming</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if lte IE 8
|
||||
]><script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../excanvas.min.js"
|
||||
></script
|
||||
><![endif]-->
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.js"
|
||||
></script>
|
||||
<script
|
||||
language="javascript"
|
||||
type="text/javascript"
|
||||
src="../../jquery.flot.selection.js"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// setup plot
|
||||
|
||||
function getData(x1, x2) {
|
||||
var d = [];
|
||||
for (var i = 0; i <= 100; ++i) {
|
||||
var x = x1 + (i * (x2 - x1)) / 100;
|
||||
d.push([x, Math.sin(x * Math.sin(x))]);
|
||||
}
|
||||
|
||||
return [{ label: "sin(x sin(x))", data: d }];
|
||||
}
|
||||
|
||||
var options = {
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
},
|
||||
points: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
yaxis: {
|
||||
ticks: 10,
|
||||
},
|
||||
selection: {
|
||||
mode: "xy",
|
||||
},
|
||||
};
|
||||
|
||||
var startData = getData(0, 3 * Math.PI);
|
||||
|
||||
var plot = $.plot("#placeholder", startData, options);
|
||||
|
||||
// Create the overview plot
|
||||
|
||||
var overview = $.plot("#overview", startData, {
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
series: {
|
||||
lines: {
|
||||
show: true,
|
||||
lineWidth: 1,
|
||||
},
|
||||
shadowSize: 0,
|
||||
},
|
||||
xaxis: {
|
||||
ticks: 4,
|
||||
},
|
||||
yaxis: {
|
||||
ticks: 3,
|
||||
min: -2,
|
||||
max: 2,
|
||||
},
|
||||
grid: {
|
||||
color: "#999",
|
||||
},
|
||||
selection: {
|
||||
mode: "xy",
|
||||
},
|
||||
});
|
||||
|
||||
// now connect the two
|
||||
|
||||
$("#placeholder").bind("plotselected", function (event, ranges) {
|
||||
// clamp the zooming to prevent eternal zoom
|
||||
|
||||
if (ranges.xaxis.to - ranges.xaxis.from < 0.00001) {
|
||||
ranges.xaxis.to = ranges.xaxis.from + 0.00001;
|
||||
}
|
||||
|
||||
if (ranges.yaxis.to - ranges.yaxis.from < 0.00001) {
|
||||
ranges.yaxis.to = ranges.yaxis.from + 0.00001;
|
||||
}
|
||||
|
||||
// do the zooming
|
||||
|
||||
plot = $.plot(
|
||||
"#placeholder",
|
||||
getData(ranges.xaxis.from, ranges.xaxis.to),
|
||||
$.extend(true, {}, options, {
|
||||
xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to },
|
||||
yaxis: { min: ranges.yaxis.from, max: ranges.yaxis.to },
|
||||
})
|
||||
);
|
||||
|
||||
// don't fire event on the overview to prevent eternal loop
|
||||
|
||||
overview.setSelection(ranges, true);
|
||||
});
|
||||
|
||||
$("#overview").bind("plotselected", function (event, ranges) {
|
||||
plot.setSelection(ranges);
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h2>Selection and zooming</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="demo-container">
|
||||
<div
|
||||
id="placeholder"
|
||||
class="demo-placeholder"
|
||||
style="float: left; width: 650px"
|
||||
></div>
|
||||
<div
|
||||
id="overview"
|
||||
class="demo-placeholder"
|
||||
style="float: right; width: 160px; height: 125px"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Selection support makes it easy to construct flexible zooming schemes.
|
||||
With a few lines of code, the small overview plot to the right has been
|
||||
connected to the large plot. Try selecting a rectangle on either of
|
||||
them.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="footer">Copyright © 2007 - 2014 IOLA and Ole Laursen</div>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "flot",
|
||||
"version": "0.8.3",
|
||||
"title": "Flot",
|
||||
"author": {
|
||||
"name": "Ole Laursen",
|
||||
"url": "https://github.com/OleLaursen"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/flot/flot/blob/master/LICENSE.txt"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.2.6"
|
||||
},
|
||||
"description": "Flot is a pure JavaScript plotting library for jQuery, with a focus on simple usage, attractive looks and interactive features.",
|
||||
"keywords": ["plot", "chart", "graph", "visualization", "canvas", "graphics"],
|
||||
"homepage": "http://www.flotcharts.org",
|
||||
"docs": "http://github.com/flot/flot/blob/master/API.md",
|
||||
"demo": "http://www.flotcharts.org/flot/examples/",
|
||||
"bugs": "http://github.com/flot/flot/issues",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "David Schnur",
|
||||
"email": "dnschnur@gmail.com",
|
||||
"url": "http://github.com/dnschnur"
|
||||
}
|
||||
]
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
/* Plugin for jQuery for working with colors.
|
||||
*
|
||||
* Version 1.1.
|
||||
*
|
||||
* Inspiration from jQuery color animation plugin by John Resig.
|
||||
*
|
||||
* Released under the MIT license by Ole Laursen, October 2009.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString()
|
||||
* var c = $.color.extract($("#mydiv"), 'background-color');
|
||||
* console.log(c.r, c.g, c.b, c.a);
|
||||
* $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)"
|
||||
*
|
||||
* Note that .scale() and .add() return the same modified object
|
||||
* instead of making a new one.
|
||||
*
|
||||
* V. 1.1: Fix error handling so e.g. parsing an empty string does
|
||||
* produce a color rather than just crashing.
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
$.color = {};
|
||||
|
||||
// construct color object with some convenient chainable helpers
|
||||
$.color.make = function (r, g, b, a) {
|
||||
var o = {};
|
||||
o.r = r || 0;
|
||||
o.g = g || 0;
|
||||
o.b = b || 0;
|
||||
o.a = a != null ? a : 1;
|
||||
|
||||
o.add = function (c, d) {
|
||||
for (var i = 0; i < c.length; ++i) o[c.charAt(i)] += d;
|
||||
return o.normalize();
|
||||
};
|
||||
|
||||
o.scale = function (c, f) {
|
||||
for (var i = 0; i < c.length; ++i) o[c.charAt(i)] *= f;
|
||||
return o.normalize();
|
||||
};
|
||||
|
||||
o.toString = function () {
|
||||
if (o.a >= 1.0) {
|
||||
return "rgb(" + [o.r, o.g, o.b].join(",") + ")";
|
||||
} else {
|
||||
return "rgba(" + [o.r, o.g, o.b, o.a].join(",") + ")";
|
||||
}
|
||||
};
|
||||
|
||||
o.normalize = function () {
|
||||
function clamp(min, value, max) {
|
||||
return value < min ? min : value > max ? max : value;
|
||||
}
|
||||
|
||||
o.r = clamp(0, parseInt(o.r), 255);
|
||||
o.g = clamp(0, parseInt(o.g), 255);
|
||||
o.b = clamp(0, parseInt(o.b), 255);
|
||||
o.a = clamp(0, o.a, 1);
|
||||
return o;
|
||||
};
|
||||
|
||||
o.clone = function () {
|
||||
return $.color.make(o.r, o.b, o.g, o.a);
|
||||
};
|
||||
|
||||
return o.normalize();
|
||||
};
|
||||
|
||||
// extract CSS color property from element, going up in the DOM
|
||||
// if it's "transparent"
|
||||
$.color.extract = function (elem, css) {
|
||||
var c;
|
||||
|
||||
do {
|
||||
c = elem.css(css).toLowerCase();
|
||||
// keep going until we find an element that has color, or
|
||||
// we hit the body or root (have no parent)
|
||||
if (c != "" && c != "transparent") break;
|
||||
elem = elem.parent();
|
||||
} while (elem.length && !$.nodeName(elem.get(0), "body"));
|
||||
|
||||
// catch Safari's way of signalling transparent
|
||||
if (c == "rgba(0, 0, 0, 0)") c = "transparent";
|
||||
|
||||
return $.color.parse(c);
|
||||
};
|
||||
|
||||
// parse CSS color string (like "rgb(10, 32, 43)" or "#fff"),
|
||||
// returns color object, if parsing failed, you get black (0, 0,
|
||||
// 0) out
|
||||
$.color.parse = function (str) {
|
||||
var res,
|
||||
m = $.color.make;
|
||||
|
||||
// Look for rgb(num,num,num)
|
||||
if (
|
||||
(res =
|
||||
/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(
|
||||
str
|
||||
))
|
||||
)
|
||||
return m(
|
||||
parseInt(res[1], 10),
|
||||
parseInt(res[2], 10),
|
||||
parseInt(res[3], 10)
|
||||
);
|
||||
|
||||
// Look for rgba(num,num,num,num)
|
||||
if (
|
||||
(res =
|
||||
/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(
|
||||
str
|
||||
))
|
||||
)
|
||||
return m(
|
||||
parseInt(res[1], 10),
|
||||
parseInt(res[2], 10),
|
||||
parseInt(res[3], 10),
|
||||
parseFloat(res[4])
|
||||
);
|
||||
|
||||
// Look for rgb(num%,num%,num%)
|
||||
if (
|
||||
(res =
|
||||
/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(
|
||||
str
|
||||
))
|
||||
)
|
||||
return m(
|
||||
parseFloat(res[1]) * 2.55,
|
||||
parseFloat(res[2]) * 2.55,
|
||||
parseFloat(res[3]) * 2.55
|
||||
);
|
||||
|
||||
// Look for rgba(num%,num%,num%,num)
|
||||
if (
|
||||
(res =
|
||||
/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(
|
||||
str
|
||||
))
|
||||
)
|
||||
return m(
|
||||
parseFloat(res[1]) * 2.55,
|
||||
parseFloat(res[2]) * 2.55,
|
||||
parseFloat(res[3]) * 2.55,
|
||||
parseFloat(res[4])
|
||||
);
|
||||
|
||||
// Look for #a0b1c2
|
||||
if ((res = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str)))
|
||||
return m(
|
||||
parseInt(res[1], 16),
|
||||
parseInt(res[2], 16),
|
||||
parseInt(res[3], 16)
|
||||
);
|
||||
|
||||
// Look for #fff
|
||||
if ((res = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str)))
|
||||
return m(
|
||||
parseInt(res[1] + res[1], 16),
|
||||
parseInt(res[2] + res[2], 16),
|
||||
parseInt(res[3] + res[3], 16)
|
||||
);
|
||||
|
||||
// Otherwise, we're most likely dealing with a named color
|
||||
var name = $.trim(str).toLowerCase();
|
||||
if (name == "transparent") return m(255, 255, 255, 0);
|
||||
else {
|
||||
// default to black
|
||||
res = lookupColors[name] || [0, 0, 0];
|
||||
return m(res[0], res[1], res[2]);
|
||||
}
|
||||
};
|
||||
|
||||
var lookupColors = {
|
||||
aqua: [0, 255, 255],
|
||||
azure: [240, 255, 255],
|
||||
beige: [245, 245, 220],
|
||||
black: [0, 0, 0],
|
||||
blue: [0, 0, 255],
|
||||
brown: [165, 42, 42],
|
||||
cyan: [0, 255, 255],
|
||||
darkblue: [0, 0, 139],
|
||||
darkcyan: [0, 139, 139],
|
||||
darkgrey: [169, 169, 169],
|
||||
darkgreen: [0, 100, 0],
|
||||
darkkhaki: [189, 183, 107],
|
||||
darkmagenta: [139, 0, 139],
|
||||
darkolivegreen: [85, 107, 47],
|
||||
darkorange: [255, 140, 0],
|
||||
darkorchid: [153, 50, 204],
|
||||
darkred: [139, 0, 0],
|
||||
darksalmon: [233, 150, 122],
|
||||
darkviolet: [148, 0, 211],
|
||||
fuchsia: [255, 0, 255],
|
||||
gold: [255, 215, 0],
|
||||
green: [0, 128, 0],
|
||||
indigo: [75, 0, 130],
|
||||
khaki: [240, 230, 140],
|
||||
lightblue: [173, 216, 230],
|
||||
lightcyan: [224, 255, 255],
|
||||
lightgreen: [144, 238, 144],
|
||||
lightgrey: [211, 211, 211],
|
||||
lightpink: [255, 182, 193],
|
||||
lightyellow: [255, 255, 224],
|
||||
lime: [0, 255, 0],
|
||||
magenta: [255, 0, 255],
|
||||
maroon: [128, 0, 0],
|
||||
navy: [0, 0, 128],
|
||||
olive: [128, 128, 0],
|
||||
orange: [255, 165, 0],
|
||||
pink: [255, 192, 203],
|
||||
purple: [128, 0, 128],
|
||||
violet: [128, 0, 128],
|
||||
red: [255, 0, 0],
|
||||
silver: [192, 192, 192],
|
||||
white: [255, 255, 255],
|
||||
yellow: [255, 255, 0],
|
||||
};
|
||||
})(jQuery);
|
||||
+374
@@ -0,0 +1,374 @@
|
||||
/* Flot plugin for drawing all elements of a plot on the canvas.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
Flot normally produces certain elements, like axis labels and the legend, using
|
||||
HTML elements. This permits greater interactivity and customization, and often
|
||||
looks better, due to cross-browser canvas text inconsistencies and limitations.
|
||||
|
||||
It can also be desirable to render the plot entirely in canvas, particularly
|
||||
if the goal is to save it as an image, or if Flot is being used in a context
|
||||
where the HTML DOM does not exist, as is the case within Node.js. This plugin
|
||||
switches out Flot's standard drawing operations for canvas-only replacements.
|
||||
|
||||
Currently the plugin supports only axis labels, but it will eventually allow
|
||||
every element of the plot to be rendered directly to canvas.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
{
|
||||
canvas: boolean
|
||||
}
|
||||
|
||||
The "canvas" option controls whether full canvas drawing is enabled, making it
|
||||
possible to toggle on and off. This is useful when a plot uses HTML text in the
|
||||
browser, but needs to redraw with canvas text when exporting as an image.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
canvas: true,
|
||||
};
|
||||
|
||||
var render, getTextInfo, addText;
|
||||
|
||||
// Cache the prototype hasOwnProperty for faster access
|
||||
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
function init(plot, classes) {
|
||||
var Canvas = classes.Canvas;
|
||||
|
||||
// We only want to replace the functions once; the second time around
|
||||
// we would just get our new function back. This whole replacing of
|
||||
// prototype functions is a disaster, and needs to be changed ASAP.
|
||||
|
||||
if (render == null) {
|
||||
(getTextInfo = Canvas.prototype.getTextInfo),
|
||||
(addText = Canvas.prototype.addText),
|
||||
(render = Canvas.prototype.render);
|
||||
}
|
||||
|
||||
// Finishes rendering the canvas, including overlaid text
|
||||
|
||||
Canvas.prototype.render = function () {
|
||||
if (!plot.getOptions().canvas) {
|
||||
return render.call(this);
|
||||
}
|
||||
|
||||
var context = this.context,
|
||||
cache = this._textCache;
|
||||
|
||||
// For each text layer, render elements marked as active
|
||||
|
||||
context.save();
|
||||
context.textBaseline = "middle";
|
||||
|
||||
for (var layerKey in cache) {
|
||||
if (hasOwnProperty.call(cache, layerKey)) {
|
||||
var layerCache = cache[layerKey];
|
||||
for (var styleKey in layerCache) {
|
||||
if (hasOwnProperty.call(layerCache, styleKey)) {
|
||||
var styleCache = layerCache[styleKey],
|
||||
updateStyles = true;
|
||||
for (var key in styleCache) {
|
||||
if (hasOwnProperty.call(styleCache, key)) {
|
||||
var info = styleCache[key],
|
||||
positions = info.positions,
|
||||
lines = info.lines;
|
||||
|
||||
// Since every element at this level of the cache have the
|
||||
// same font and fill styles, we can just change them once
|
||||
// using the values from the first element.
|
||||
|
||||
if (updateStyles) {
|
||||
context.fillStyle = info.font.color;
|
||||
context.font = info.font.definition;
|
||||
updateStyles = false;
|
||||
}
|
||||
|
||||
for (var i = 0, position; (position = positions[i]); i++) {
|
||||
if (position.active) {
|
||||
for (var j = 0, line; (line = position.lines[j]); j++) {
|
||||
context.fillText(lines[j].text, line[0], line[1]);
|
||||
}
|
||||
} else {
|
||||
positions.splice(i--, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (positions.length == 0) {
|
||||
delete styleCache[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
context.restore();
|
||||
};
|
||||
|
||||
// Creates (if necessary) and returns a text info object.
|
||||
//
|
||||
// When the canvas option is set, the object looks like this:
|
||||
//
|
||||
// {
|
||||
// width: Width of the text's bounding box.
|
||||
// height: Height of the text's bounding box.
|
||||
// positions: Array of positions at which this text is drawn.
|
||||
// lines: [{
|
||||
// height: Height of this line.
|
||||
// widths: Width of this line.
|
||||
// text: Text on this line.
|
||||
// }],
|
||||
// font: {
|
||||
// definition: Canvas font property string.
|
||||
// color: Color of the text.
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// The positions array contains objects that look like this:
|
||||
//
|
||||
// {
|
||||
// active: Flag indicating whether the text should be visible.
|
||||
// lines: Array of [x, y] coordinates at which to draw the line.
|
||||
// x: X coordinate at which to draw the text.
|
||||
// y: Y coordinate at which to draw the text.
|
||||
// }
|
||||
|
||||
Canvas.prototype.getTextInfo = function (layer, text, font, angle, width) {
|
||||
if (!plot.getOptions().canvas) {
|
||||
return getTextInfo.call(this, layer, text, font, angle, width);
|
||||
}
|
||||
|
||||
var textStyle, layerCache, styleCache, info;
|
||||
|
||||
// Cast the value to a string, in case we were given a number
|
||||
|
||||
text = "" + text;
|
||||
|
||||
// If the font is a font-spec object, generate a CSS definition
|
||||
|
||||
if (typeof font === "object") {
|
||||
textStyle =
|
||||
font.style +
|
||||
" " +
|
||||
font.variant +
|
||||
" " +
|
||||
font.weight +
|
||||
" " +
|
||||
font.size +
|
||||
"px " +
|
||||
font.family;
|
||||
} else {
|
||||
textStyle = font;
|
||||
}
|
||||
|
||||
// Retrieve (or create) the cache for the text's layer and styles
|
||||
|
||||
layerCache = this._textCache[layer];
|
||||
|
||||
if (layerCache == null) {
|
||||
layerCache = this._textCache[layer] = {};
|
||||
}
|
||||
|
||||
styleCache = layerCache[textStyle];
|
||||
|
||||
if (styleCache == null) {
|
||||
styleCache = layerCache[textStyle] = {};
|
||||
}
|
||||
|
||||
info = styleCache[text];
|
||||
|
||||
if (info == null) {
|
||||
var context = this.context;
|
||||
|
||||
// If the font was provided as CSS, create a div with those
|
||||
// classes and examine it to generate a canvas font spec.
|
||||
|
||||
if (typeof font !== "object") {
|
||||
var element = $("<div> </div>")
|
||||
.css("position", "absolute")
|
||||
.addClass(typeof font === "string" ? font : null)
|
||||
.appendTo(this.getTextLayer(layer));
|
||||
|
||||
font = {
|
||||
lineHeight: element.height(),
|
||||
style: element.css("font-style"),
|
||||
variant: element.css("font-variant"),
|
||||
weight: element.css("font-weight"),
|
||||
family: element.css("font-family"),
|
||||
color: element.css("color"),
|
||||
};
|
||||
|
||||
// Setting line-height to 1, without units, sets it equal
|
||||
// to the font-size, even if the font-size is abstract,
|
||||
// like 'smaller'. This enables us to read the real size
|
||||
// via the element's height, working around browsers that
|
||||
// return the literal 'smaller' value.
|
||||
|
||||
font.size = element.css("line-height", 1).height();
|
||||
|
||||
element.remove();
|
||||
}
|
||||
|
||||
textStyle =
|
||||
font.style +
|
||||
" " +
|
||||
font.variant +
|
||||
" " +
|
||||
font.weight +
|
||||
" " +
|
||||
font.size +
|
||||
"px " +
|
||||
font.family;
|
||||
|
||||
// Create a new info object, initializing the dimensions to
|
||||
// zero so we can count them up line-by-line.
|
||||
|
||||
info = styleCache[text] = {
|
||||
width: 0,
|
||||
height: 0,
|
||||
positions: [],
|
||||
lines: [],
|
||||
font: {
|
||||
definition: textStyle,
|
||||
color: font.color,
|
||||
},
|
||||
};
|
||||
|
||||
context.save();
|
||||
context.font = textStyle;
|
||||
|
||||
// Canvas can't handle multi-line strings; break on various
|
||||
// newlines, including HTML brs, to build a list of lines.
|
||||
// Note that we could split directly on regexps, but IE < 9 is
|
||||
// broken; revisit when we drop IE 7/8 support.
|
||||
|
||||
var lines = (text + "").replace(/<br ?\/?>|\r\n|\r/g, "\n").split("\n");
|
||||
|
||||
for (var i = 0; i < lines.length; ++i) {
|
||||
var lineText = lines[i],
|
||||
measured = context.measureText(lineText);
|
||||
|
||||
info.width = Math.max(measured.width, info.width);
|
||||
info.height += font.lineHeight;
|
||||
|
||||
info.lines.push({
|
||||
text: lineText,
|
||||
width: measured.width,
|
||||
height: font.lineHeight,
|
||||
});
|
||||
}
|
||||
|
||||
context.restore();
|
||||
}
|
||||
|
||||
return info;
|
||||
};
|
||||
|
||||
// Adds a text string to the canvas text overlay.
|
||||
|
||||
Canvas.prototype.addText = function (
|
||||
layer,
|
||||
x,
|
||||
y,
|
||||
text,
|
||||
font,
|
||||
angle,
|
||||
width,
|
||||
halign,
|
||||
valign
|
||||
) {
|
||||
if (!plot.getOptions().canvas) {
|
||||
return addText.call(
|
||||
this,
|
||||
layer,
|
||||
x,
|
||||
y,
|
||||
text,
|
||||
font,
|
||||
angle,
|
||||
width,
|
||||
halign,
|
||||
valign
|
||||
);
|
||||
}
|
||||
|
||||
var info = this.getTextInfo(layer, text, font, angle, width),
|
||||
positions = info.positions,
|
||||
lines = info.lines;
|
||||
|
||||
// Text is drawn with baseline 'middle', which we need to account
|
||||
// for by adding half a line's height to the y position.
|
||||
|
||||
y += info.height / lines.length / 2;
|
||||
|
||||
// Tweak the initial y-position to match vertical alignment
|
||||
|
||||
if (valign == "middle") {
|
||||
y = Math.round(y - info.height / 2);
|
||||
} else if (valign == "bottom") {
|
||||
y = Math.round(y - info.height);
|
||||
} else {
|
||||
y = Math.round(y);
|
||||
}
|
||||
|
||||
// FIXME: LEGACY BROWSER FIX
|
||||
// AFFECTS: Opera < 12.00
|
||||
|
||||
// Offset the y coordinate, since Opera is off pretty
|
||||
// consistently compared to the other browsers.
|
||||
|
||||
if (!!(window.opera && window.opera.version().split(".")[0] < 12)) {
|
||||
y -= 2;
|
||||
}
|
||||
|
||||
// Determine whether this text already exists at this position.
|
||||
// If so, mark it for inclusion in the next render pass.
|
||||
|
||||
for (var i = 0, position; (position = positions[i]); i++) {
|
||||
if (position.x == x && position.y == y) {
|
||||
position.active = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If the text doesn't exist at this position, create a new entry
|
||||
|
||||
position = {
|
||||
active: true,
|
||||
lines: [],
|
||||
x: x,
|
||||
y: y,
|
||||
};
|
||||
|
||||
positions.push(position);
|
||||
|
||||
// Fill in the x & y positions of each line, adjusting them
|
||||
// individually for horizontal alignment.
|
||||
|
||||
for (var i = 0, line; (line = lines[i]); i++) {
|
||||
if (halign == "center") {
|
||||
position.lines.push([Math.round(x - line.width / 2), y]);
|
||||
} else if (halign == "right") {
|
||||
position.lines.push([Math.round(x - line.width), y]);
|
||||
} else {
|
||||
position.lines.push([Math.round(x), y]);
|
||||
}
|
||||
y += line.height;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "canvas",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
/* Flot plugin for plotting textual data or categories.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
Consider a dataset like [["February", 34], ["March", 20], ...]. This plugin
|
||||
allows you to plot such a dataset directly.
|
||||
|
||||
To enable it, you must specify mode: "categories" on the axis with the textual
|
||||
labels, e.g.
|
||||
|
||||
$.plot("#placeholder", data, { xaxis: { mode: "categories" } });
|
||||
|
||||
By default, the labels are ordered as they are met in the data series. If you
|
||||
need a different ordering, you can specify "categories" on the axis options
|
||||
and list the categories there:
|
||||
|
||||
xaxis: {
|
||||
mode: "categories",
|
||||
categories: ["February", "March", "April"]
|
||||
}
|
||||
|
||||
If you need to customize the distances between the categories, you can specify
|
||||
"categories" as an object mapping labels to values
|
||||
|
||||
xaxis: {
|
||||
mode: "categories",
|
||||
categories: { "February": 1, "March": 3, "April": 4 }
|
||||
}
|
||||
|
||||
If you don't specify all categories, the remaining categories will be numbered
|
||||
from the max value plus 1 (with a spacing of 1 between each).
|
||||
|
||||
Internally, the plugin works by transforming the input data through an auto-
|
||||
generated mapping where the first category becomes 0, the second 1, etc.
|
||||
Hence, a point like ["February", 34] becomes [0, 34] internally in Flot (this
|
||||
is visible in hover and click events that return numbers rather than the
|
||||
category labels). The plugin also overrides the tick generator to spit out the
|
||||
categories as ticks instead of the values.
|
||||
|
||||
If you need to map a value back to its label, the mapping is always accessible
|
||||
as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
xaxis: {
|
||||
categories: null,
|
||||
},
|
||||
yaxis: {
|
||||
categories: null,
|
||||
},
|
||||
};
|
||||
|
||||
function processRawData(plot, series, data, datapoints) {
|
||||
// if categories are enabled, we need to disable
|
||||
// auto-transformation to numbers so the strings are intact
|
||||
// for later processing
|
||||
|
||||
var xCategories = series.xaxis.options.mode == "categories",
|
||||
yCategories = series.yaxis.options.mode == "categories";
|
||||
|
||||
if (!(xCategories || yCategories)) return;
|
||||
|
||||
var format = datapoints.format;
|
||||
|
||||
if (!format) {
|
||||
// FIXME: auto-detection should really not be defined here
|
||||
var s = series;
|
||||
format = [];
|
||||
format.push({ x: true, number: true, required: true });
|
||||
format.push({ y: true, number: true, required: true });
|
||||
|
||||
if (s.bars.show || (s.lines.show && s.lines.fill)) {
|
||||
var autoscale = !!(
|
||||
(s.bars.show && s.bars.zero) ||
|
||||
(s.lines.show && s.lines.zero)
|
||||
);
|
||||
format.push({
|
||||
y: true,
|
||||
number: true,
|
||||
required: false,
|
||||
defaultValue: 0,
|
||||
autoscale: autoscale,
|
||||
});
|
||||
if (s.bars.horizontal) {
|
||||
delete format[format.length - 1].y;
|
||||
format[format.length - 1].x = true;
|
||||
}
|
||||
}
|
||||
|
||||
datapoints.format = format;
|
||||
}
|
||||
|
||||
for (var m = 0; m < format.length; ++m) {
|
||||
if (format[m].x && xCategories) format[m].number = false;
|
||||
|
||||
if (format[m].y && yCategories) format[m].number = false;
|
||||
}
|
||||
}
|
||||
|
||||
function getNextIndex(categories) {
|
||||
var index = -1;
|
||||
|
||||
for (var v in categories) if (categories[v] > index) index = categories[v];
|
||||
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
function categoriesTickGenerator(axis) {
|
||||
var res = [];
|
||||
for (var label in axis.categories) {
|
||||
var v = axis.categories[label];
|
||||
if (v >= axis.min && v <= axis.max) res.push([v, label]);
|
||||
}
|
||||
|
||||
res.sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
});
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
function setupCategoriesForAxis(series, axis, datapoints) {
|
||||
if (series[axis].options.mode != "categories") return;
|
||||
|
||||
if (!series[axis].categories) {
|
||||
// parse options
|
||||
var c = {},
|
||||
o = series[axis].options.categories || {};
|
||||
if ($.isArray(o)) {
|
||||
for (var i = 0; i < o.length; ++i) c[o[i]] = i;
|
||||
} else {
|
||||
for (var v in o) c[v] = o[v];
|
||||
}
|
||||
|
||||
series[axis].categories = c;
|
||||
}
|
||||
|
||||
// fix ticks
|
||||
if (!series[axis].options.ticks)
|
||||
series[axis].options.ticks = categoriesTickGenerator;
|
||||
|
||||
transformPointsOnAxis(datapoints, axis, series[axis].categories);
|
||||
}
|
||||
|
||||
function transformPointsOnAxis(datapoints, axis, categories) {
|
||||
// go through the points, transforming them
|
||||
var points = datapoints.points,
|
||||
ps = datapoints.pointsize,
|
||||
format = datapoints.format,
|
||||
formatColumn = axis.charAt(0),
|
||||
index = getNextIndex(categories);
|
||||
|
||||
for (var i = 0; i < points.length; i += ps) {
|
||||
if (points[i] == null) continue;
|
||||
|
||||
for (var m = 0; m < ps; ++m) {
|
||||
var val = points[i + m];
|
||||
|
||||
if (val == null || !format[m][formatColumn]) continue;
|
||||
|
||||
if (!(val in categories)) {
|
||||
categories[val] = index;
|
||||
++index;
|
||||
}
|
||||
|
||||
points[i + m] = categories[val];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function processDatapoints(plot, series, datapoints) {
|
||||
setupCategoriesForAxis(series, "xaxis", datapoints);
|
||||
setupCategoriesForAxis(series, "yaxis", datapoints);
|
||||
}
|
||||
|
||||
function init(plot) {
|
||||
plot.hooks.processRawData.push(processRawData);
|
||||
plot.hooks.processDatapoints.push(processDatapoints);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "categories",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
/* Flot plugin for showing crosshairs when the mouse hovers over the plot.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
crosshair: {
|
||||
mode: null or "x" or "y" or "xy"
|
||||
color: color
|
||||
lineWidth: number
|
||||
}
|
||||
|
||||
Set the mode to one of "x", "y" or "xy". The "x" mode enables a vertical
|
||||
crosshair that lets you trace the values on the x axis, "y" enables a
|
||||
horizontal crosshair and "xy" enables them both. "color" is the color of the
|
||||
crosshair (default is "rgba(170, 0, 0, 0.80)"), "lineWidth" is the width of
|
||||
the drawn lines (default is 1).
|
||||
|
||||
The plugin also adds four public methods:
|
||||
|
||||
- setCrosshair( pos )
|
||||
|
||||
Set the position of the crosshair. Note that this is cleared if the user
|
||||
moves the mouse. "pos" is in coordinates of the plot and should be on the
|
||||
form { x: xpos, y: ypos } (you can use x2/x3/... if you're using multiple
|
||||
axes), which is coincidentally the same format as what you get from a
|
||||
"plothover" event. If "pos" is null, the crosshair is cleared.
|
||||
|
||||
- clearCrosshair()
|
||||
|
||||
Clear the crosshair.
|
||||
|
||||
- lockCrosshair(pos)
|
||||
|
||||
Cause the crosshair to lock to the current location, no longer updating if
|
||||
the user moves the mouse. Optionally supply a position (passed on to
|
||||
setCrosshair()) to move it to.
|
||||
|
||||
Example usage:
|
||||
|
||||
var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
|
||||
$("#graph").bind( "plothover", function ( evt, position, item ) {
|
||||
if ( item ) {
|
||||
// Lock the crosshair to the data point being hovered
|
||||
myFlot.lockCrosshair({
|
||||
x: item.datapoint[ 0 ],
|
||||
y: item.datapoint[ 1 ]
|
||||
});
|
||||
} else {
|
||||
// Return normal crosshair operation
|
||||
myFlot.unlockCrosshair();
|
||||
}
|
||||
});
|
||||
|
||||
- unlockCrosshair()
|
||||
|
||||
Free the crosshair to move again after locking it.
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
crosshair: {
|
||||
mode: null, // one of null, "x", "y" or "xy",
|
||||
color: "rgba(170, 0, 0, 0.80)",
|
||||
lineWidth: 1,
|
||||
},
|
||||
};
|
||||
|
||||
function init(plot) {
|
||||
// position of crosshair in pixels
|
||||
var crosshair = { x: -1, y: -1, locked: false };
|
||||
|
||||
plot.setCrosshair = function setCrosshair(pos) {
|
||||
if (!pos) crosshair.x = -1;
|
||||
else {
|
||||
var o = plot.p2c(pos);
|
||||
crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
|
||||
crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
|
||||
}
|
||||
|
||||
plot.triggerRedrawOverlay();
|
||||
};
|
||||
|
||||
plot.clearCrosshair = plot.setCrosshair; // passes null for pos
|
||||
|
||||
plot.lockCrosshair = function lockCrosshair(pos) {
|
||||
if (pos) plot.setCrosshair(pos);
|
||||
crosshair.locked = true;
|
||||
};
|
||||
|
||||
plot.unlockCrosshair = function unlockCrosshair() {
|
||||
crosshair.locked = false;
|
||||
};
|
||||
|
||||
function onMouseOut(e) {
|
||||
if (crosshair.locked) return;
|
||||
|
||||
if (crosshair.x != -1) {
|
||||
crosshair.x = -1;
|
||||
plot.triggerRedrawOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseMove(e) {
|
||||
if (crosshair.locked) return;
|
||||
|
||||
if (plot.getSelection && plot.getSelection()) {
|
||||
crosshair.x = -1; // hide the crosshair while selecting
|
||||
return;
|
||||
}
|
||||
|
||||
var offset = plot.offset();
|
||||
crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
|
||||
crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
|
||||
plot.triggerRedrawOverlay();
|
||||
}
|
||||
|
||||
plot.hooks.bindEvents.push(function (plot, eventHolder) {
|
||||
if (!plot.getOptions().crosshair.mode) return;
|
||||
|
||||
eventHolder.mouseout(onMouseOut);
|
||||
eventHolder.mousemove(onMouseMove);
|
||||
});
|
||||
|
||||
plot.hooks.drawOverlay.push(function (plot, ctx) {
|
||||
var c = plot.getOptions().crosshair;
|
||||
if (!c.mode) return;
|
||||
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(plotOffset.left, plotOffset.top);
|
||||
|
||||
if (crosshair.x != -1) {
|
||||
var adj = plot.getOptions().crosshair.lineWidth % 2 ? 0.5 : 0;
|
||||
|
||||
ctx.strokeStyle = c.color;
|
||||
ctx.lineWidth = c.lineWidth;
|
||||
ctx.lineJoin = "round";
|
||||
|
||||
ctx.beginPath();
|
||||
if (c.mode.indexOf("x") != -1) {
|
||||
var drawX = Math.floor(crosshair.x) + adj;
|
||||
ctx.moveTo(drawX, 0);
|
||||
ctx.lineTo(drawX, plot.height());
|
||||
}
|
||||
if (c.mode.indexOf("y") != -1) {
|
||||
var drawY = Math.floor(crosshair.y) + adj;
|
||||
ctx.moveTo(0, drawY);
|
||||
ctx.lineTo(plot.width(), drawY);
|
||||
}
|
||||
ctx.stroke();
|
||||
}
|
||||
ctx.restore();
|
||||
});
|
||||
|
||||
plot.hooks.shutdown.push(function (plot, eventHolder) {
|
||||
eventHolder.unbind("mouseout", onMouseOut);
|
||||
eventHolder.unbind("mousemove", onMouseMove);
|
||||
});
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "crosshair",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+450
@@ -0,0 +1,450 @@
|
||||
/* Flot plugin for plotting error bars.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
Error bars are used to show standard deviation and other statistical
|
||||
properties in a plot.
|
||||
|
||||
* Created by Rui Pereira - rui (dot) pereira (at) gmail (dot) com
|
||||
|
||||
This plugin allows you to plot error-bars over points. Set "errorbars" inside
|
||||
the points series to the axis name over which there will be error values in
|
||||
your data array (*even* if you do not intend to plot them later, by setting
|
||||
"show: null" on xerr/yerr).
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
series: {
|
||||
points: {
|
||||
errorbars: "x" or "y" or "xy",
|
||||
xerr: {
|
||||
show: null/false or true,
|
||||
asymmetric: null/false or true,
|
||||
upperCap: null or "-" or function,
|
||||
lowerCap: null or "-" or function,
|
||||
color: null or color,
|
||||
radius: null or number
|
||||
},
|
||||
yerr: { same options as xerr }
|
||||
}
|
||||
}
|
||||
|
||||
Each data point array is expected to be of the type:
|
||||
|
||||
"x" [ x, y, xerr ]
|
||||
"y" [ x, y, yerr ]
|
||||
"xy" [ x, y, xerr, yerr ]
|
||||
|
||||
Where xerr becomes xerr_lower,xerr_upper for the asymmetric error case, and
|
||||
equivalently for yerr. Eg., a datapoint for the "xy" case with symmetric
|
||||
error-bars on X and asymmetric on Y would be:
|
||||
|
||||
[ x, y, xerr, yerr_lower, yerr_upper ]
|
||||
|
||||
By default no end caps are drawn. Setting upperCap and/or lowerCap to "-" will
|
||||
draw a small cap perpendicular to the error bar. They can also be set to a
|
||||
user-defined drawing function, with (ctx, x, y, radius) as parameters, as eg.
|
||||
|
||||
function drawSemiCircle( ctx, x, y, radius ) {
|
||||
ctx.beginPath();
|
||||
ctx.arc( x, y, radius, 0, Math.PI, false );
|
||||
ctx.moveTo( x - radius, y );
|
||||
ctx.lineTo( x + radius, y );
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
Color and radius both default to the same ones of the points series if not
|
||||
set. The independent radius parameter on xerr/yerr is useful for the case when
|
||||
we may want to add error-bars to a line, without showing the interconnecting
|
||||
points (with radius: 0), and still showing end caps on the error-bars.
|
||||
shadowSize and lineWidth are derived as well from the points series.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
series: {
|
||||
points: {
|
||||
errorbars: null, //should be 'x', 'y' or 'xy'
|
||||
xerr: {
|
||||
err: "x",
|
||||
show: null,
|
||||
asymmetric: null,
|
||||
upperCap: null,
|
||||
lowerCap: null,
|
||||
color: null,
|
||||
radius: null,
|
||||
},
|
||||
yerr: {
|
||||
err: "y",
|
||||
show: null,
|
||||
asymmetric: null,
|
||||
upperCap: null,
|
||||
lowerCap: null,
|
||||
color: null,
|
||||
radius: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
function processRawData(plot, series, data, datapoints) {
|
||||
if (!series.points.errorbars) return;
|
||||
|
||||
// x,y values
|
||||
var format = [
|
||||
{ x: true, number: true, required: true },
|
||||
{ y: true, number: true, required: true },
|
||||
];
|
||||
|
||||
var errors = series.points.errorbars;
|
||||
// error bars - first X then Y
|
||||
if (errors == "x" || errors == "xy") {
|
||||
// lower / upper error
|
||||
if (series.points.xerr.asymmetric) {
|
||||
format.push({ x: true, number: true, required: true });
|
||||
format.push({ x: true, number: true, required: true });
|
||||
} else format.push({ x: true, number: true, required: true });
|
||||
}
|
||||
if (errors == "y" || errors == "xy") {
|
||||
// lower / upper error
|
||||
if (series.points.yerr.asymmetric) {
|
||||
format.push({ y: true, number: true, required: true });
|
||||
format.push({ y: true, number: true, required: true });
|
||||
} else format.push({ y: true, number: true, required: true });
|
||||
}
|
||||
datapoints.format = format;
|
||||
}
|
||||
|
||||
function parseErrors(series, i) {
|
||||
var points = series.datapoints.points;
|
||||
|
||||
// read errors from points array
|
||||
var exl = null,
|
||||
exu = null,
|
||||
eyl = null,
|
||||
eyu = null;
|
||||
var xerr = series.points.xerr,
|
||||
yerr = series.points.yerr;
|
||||
|
||||
var eb = series.points.errorbars;
|
||||
// error bars - first X
|
||||
if (eb == "x" || eb == "xy") {
|
||||
if (xerr.asymmetric) {
|
||||
exl = points[i + 2];
|
||||
exu = points[i + 3];
|
||||
if (eb == "xy")
|
||||
if (yerr.asymmetric) {
|
||||
eyl = points[i + 4];
|
||||
eyu = points[i + 5];
|
||||
} else eyl = points[i + 4];
|
||||
} else {
|
||||
exl = points[i + 2];
|
||||
if (eb == "xy")
|
||||
if (yerr.asymmetric) {
|
||||
eyl = points[i + 3];
|
||||
eyu = points[i + 4];
|
||||
} else eyl = points[i + 3];
|
||||
}
|
||||
// only Y
|
||||
} else if (eb == "y")
|
||||
if (yerr.asymmetric) {
|
||||
eyl = points[i + 2];
|
||||
eyu = points[i + 3];
|
||||
} else eyl = points[i + 2];
|
||||
|
||||
// symmetric errors?
|
||||
if (exu == null) exu = exl;
|
||||
if (eyu == null) eyu = eyl;
|
||||
|
||||
var errRanges = [exl, exu, eyl, eyu];
|
||||
// nullify if not showing
|
||||
if (!xerr.show) {
|
||||
errRanges[0] = null;
|
||||
errRanges[1] = null;
|
||||
}
|
||||
if (!yerr.show) {
|
||||
errRanges[2] = null;
|
||||
errRanges[3] = null;
|
||||
}
|
||||
return errRanges;
|
||||
}
|
||||
|
||||
function drawSeriesErrors(plot, ctx, s) {
|
||||
var points = s.datapoints.points,
|
||||
ps = s.datapoints.pointsize,
|
||||
ax = [s.xaxis, s.yaxis],
|
||||
radius = s.points.radius,
|
||||
err = [s.points.xerr, s.points.yerr];
|
||||
|
||||
//sanity check, in case some inverted axis hack is applied to flot
|
||||
var invertX = false;
|
||||
if (ax[0].p2c(ax[0].max) < ax[0].p2c(ax[0].min)) {
|
||||
invertX = true;
|
||||
var tmp = err[0].lowerCap;
|
||||
err[0].lowerCap = err[0].upperCap;
|
||||
err[0].upperCap = tmp;
|
||||
}
|
||||
|
||||
var invertY = false;
|
||||
if (ax[1].p2c(ax[1].min) < ax[1].p2c(ax[1].max)) {
|
||||
invertY = true;
|
||||
var tmp = err[1].lowerCap;
|
||||
err[1].lowerCap = err[1].upperCap;
|
||||
err[1].upperCap = tmp;
|
||||
}
|
||||
|
||||
for (var i = 0; i < s.datapoints.points.length; i += ps) {
|
||||
//parse
|
||||
var errRanges = parseErrors(s, i);
|
||||
|
||||
//cycle xerr & yerr
|
||||
for (var e = 0; e < err.length; e++) {
|
||||
var minmax = [ax[e].min, ax[e].max];
|
||||
|
||||
//draw this error?
|
||||
if (errRanges[e * err.length]) {
|
||||
//data coordinates
|
||||
var x = points[i],
|
||||
y = points[i + 1];
|
||||
|
||||
//errorbar ranges
|
||||
var upper = [x, y][e] + errRanges[e * err.length + 1],
|
||||
lower = [x, y][e] - errRanges[e * err.length];
|
||||
|
||||
//points outside of the canvas
|
||||
if (err[e].err == "x")
|
||||
if (
|
||||
y > ax[1].max ||
|
||||
y < ax[1].min ||
|
||||
upper < ax[0].min ||
|
||||
lower > ax[0].max
|
||||
)
|
||||
continue;
|
||||
if (err[e].err == "y")
|
||||
if (
|
||||
x > ax[0].max ||
|
||||
x < ax[0].min ||
|
||||
upper < ax[1].min ||
|
||||
lower > ax[1].max
|
||||
)
|
||||
continue;
|
||||
|
||||
// prevent errorbars getting out of the canvas
|
||||
var drawUpper = true,
|
||||
drawLower = true;
|
||||
|
||||
if (upper > minmax[1]) {
|
||||
drawUpper = false;
|
||||
upper = minmax[1];
|
||||
}
|
||||
if (lower < minmax[0]) {
|
||||
drawLower = false;
|
||||
lower = minmax[0];
|
||||
}
|
||||
|
||||
//sanity check, in case some inverted axis hack is applied to flot
|
||||
if (
|
||||
(err[e].err == "x" && invertX) ||
|
||||
(err[e].err == "y" && invertY)
|
||||
) {
|
||||
//swap coordinates
|
||||
var tmp = lower;
|
||||
lower = upper;
|
||||
upper = tmp;
|
||||
tmp = drawLower;
|
||||
drawLower = drawUpper;
|
||||
drawUpper = tmp;
|
||||
tmp = minmax[0];
|
||||
minmax[0] = minmax[1];
|
||||
minmax[1] = tmp;
|
||||
}
|
||||
|
||||
// convert to pixels
|
||||
(x = ax[0].p2c(x)), (y = ax[1].p2c(y)), (upper = ax[e].p2c(upper));
|
||||
lower = ax[e].p2c(lower);
|
||||
minmax[0] = ax[e].p2c(minmax[0]);
|
||||
minmax[1] = ax[e].p2c(minmax[1]);
|
||||
|
||||
//same style as points by default
|
||||
var lw = err[e].lineWidth ? err[e].lineWidth : s.points.lineWidth,
|
||||
sw =
|
||||
s.points.shadowSize != null ? s.points.shadowSize : s.shadowSize;
|
||||
|
||||
//shadow as for points
|
||||
if (lw > 0 && sw > 0) {
|
||||
var w = sw / 2;
|
||||
ctx.lineWidth = w;
|
||||
ctx.strokeStyle = "rgba(0,0,0,0.1)";
|
||||
drawError(
|
||||
ctx,
|
||||
err[e],
|
||||
x,
|
||||
y,
|
||||
upper,
|
||||
lower,
|
||||
drawUpper,
|
||||
drawLower,
|
||||
radius,
|
||||
w + w / 2,
|
||||
minmax
|
||||
);
|
||||
|
||||
ctx.strokeStyle = "rgba(0,0,0,0.2)";
|
||||
drawError(
|
||||
ctx,
|
||||
err[e],
|
||||
x,
|
||||
y,
|
||||
upper,
|
||||
lower,
|
||||
drawUpper,
|
||||
drawLower,
|
||||
radius,
|
||||
w / 2,
|
||||
minmax
|
||||
);
|
||||
}
|
||||
|
||||
ctx.strokeStyle = err[e].color ? err[e].color : s.color;
|
||||
ctx.lineWidth = lw;
|
||||
//draw it
|
||||
drawError(
|
||||
ctx,
|
||||
err[e],
|
||||
x,
|
||||
y,
|
||||
upper,
|
||||
lower,
|
||||
drawUpper,
|
||||
drawLower,
|
||||
radius,
|
||||
0,
|
||||
minmax
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function drawError(
|
||||
ctx,
|
||||
err,
|
||||
x,
|
||||
y,
|
||||
upper,
|
||||
lower,
|
||||
drawUpper,
|
||||
drawLower,
|
||||
radius,
|
||||
offset,
|
||||
minmax
|
||||
) {
|
||||
//shadow offset
|
||||
y += offset;
|
||||
upper += offset;
|
||||
lower += offset;
|
||||
|
||||
// error bar - avoid plotting over circles
|
||||
if (err.err == "x") {
|
||||
if (upper > x + radius)
|
||||
drawPath(ctx, [
|
||||
[upper, y],
|
||||
[Math.max(x + radius, minmax[0]), y],
|
||||
]);
|
||||
else drawUpper = false;
|
||||
if (lower < x - radius)
|
||||
drawPath(ctx, [
|
||||
[Math.min(x - radius, minmax[1]), y],
|
||||
[lower, y],
|
||||
]);
|
||||
else drawLower = false;
|
||||
} else {
|
||||
if (upper < y - radius)
|
||||
drawPath(ctx, [
|
||||
[x, upper],
|
||||
[x, Math.min(y - radius, minmax[0])],
|
||||
]);
|
||||
else drawUpper = false;
|
||||
if (lower > y + radius)
|
||||
drawPath(ctx, [
|
||||
[x, Math.max(y + radius, minmax[1])],
|
||||
[x, lower],
|
||||
]);
|
||||
else drawLower = false;
|
||||
}
|
||||
|
||||
//internal radius value in errorbar, allows to plot radius 0 points and still keep proper sized caps
|
||||
//this is a way to get errorbars on lines without visible connecting dots
|
||||
radius = err.radius != null ? err.radius : radius;
|
||||
|
||||
// upper cap
|
||||
if (drawUpper) {
|
||||
if (err.upperCap == "-") {
|
||||
if (err.err == "x")
|
||||
drawPath(ctx, [
|
||||
[upper, y - radius],
|
||||
[upper, y + radius],
|
||||
]);
|
||||
else
|
||||
drawPath(ctx, [
|
||||
[x - radius, upper],
|
||||
[x + radius, upper],
|
||||
]);
|
||||
} else if ($.isFunction(err.upperCap)) {
|
||||
if (err.err == "x") err.upperCap(ctx, upper, y, radius);
|
||||
else err.upperCap(ctx, x, upper, radius);
|
||||
}
|
||||
}
|
||||
// lower cap
|
||||
if (drawLower) {
|
||||
if (err.lowerCap == "-") {
|
||||
if (err.err == "x")
|
||||
drawPath(ctx, [
|
||||
[lower, y - radius],
|
||||
[lower, y + radius],
|
||||
]);
|
||||
else
|
||||
drawPath(ctx, [
|
||||
[x - radius, lower],
|
||||
[x + radius, lower],
|
||||
]);
|
||||
} else if ($.isFunction(err.lowerCap)) {
|
||||
if (err.err == "x") err.lowerCap(ctx, lower, y, radius);
|
||||
else err.lowerCap(ctx, x, lower, radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function drawPath(ctx, pts) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(pts[0][0], pts[0][1]);
|
||||
for (var p = 1; p < pts.length; p++) ctx.lineTo(pts[p][0], pts[p][1]);
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
function draw(plot, ctx) {
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(plotOffset.left, plotOffset.top);
|
||||
$.each(plot.getData(), function (i, s) {
|
||||
if (s.points.errorbars && (s.points.xerr.show || s.points.yerr.show))
|
||||
drawSeriesErrors(plot, ctx, s);
|
||||
});
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
function init(plot) {
|
||||
plot.hooks.processRawData.push(processRawData);
|
||||
plot.hooks.draw.push(draw);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "errorbars",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
/* Flot plugin for computing bottoms for filled line and bar charts.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The case: you've got two series that you want to fill the area between. In Flot
|
||||
terms, you need to use one as the fill bottom of the other. You can specify the
|
||||
bottom of each data point as the third coordinate manually, or you can use this
|
||||
plugin to compute it for you.
|
||||
|
||||
In order to name the other series, you need to give it an id, like this:
|
||||
|
||||
var dataset = [
|
||||
{ data: [ ... ], id: "foo" } , // use default bottom
|
||||
{ data: [ ... ], fillBetween: "foo" }, // use first dataset as bottom
|
||||
];
|
||||
|
||||
$.plot($("#placeholder"), dataset, { lines: { show: true, fill: true }});
|
||||
|
||||
As a convenience, if the id given is a number that doesn't appear as an id in
|
||||
the series, it is interpreted as the index in the array instead (so fillBetween:
|
||||
0 can also mean the first series).
|
||||
|
||||
Internally, the plugin modifies the datapoints in each series. For line series,
|
||||
extra data points might be inserted through interpolation. Note that at points
|
||||
where the bottom line is not defined (due to a null point or start/end of line),
|
||||
the current line will show a gap too. The algorithm comes from the
|
||||
jquery.flot.stack.js plugin, possibly some code could be shared.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
series: {
|
||||
fillBetween: null, // or number
|
||||
},
|
||||
};
|
||||
|
||||
function init(plot) {
|
||||
function findBottomSeries(s, allseries) {
|
||||
var i;
|
||||
|
||||
for (i = 0; i < allseries.length; ++i) {
|
||||
if (allseries[i].id === s.fillBetween) {
|
||||
return allseries[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof s.fillBetween === "number") {
|
||||
if (s.fillBetween < 0 || s.fillBetween >= allseries.length) {
|
||||
return null;
|
||||
}
|
||||
return allseries[s.fillBetween];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function computeFillBottoms(plot, s, datapoints) {
|
||||
if (s.fillBetween == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var other = findBottomSeries(s, plot.getData());
|
||||
|
||||
if (!other) {
|
||||
return;
|
||||
}
|
||||
|
||||
var ps = datapoints.pointsize,
|
||||
points = datapoints.points,
|
||||
otherps = other.datapoints.pointsize,
|
||||
otherpoints = other.datapoints.points,
|
||||
newpoints = [],
|
||||
px,
|
||||
py,
|
||||
intery,
|
||||
qx,
|
||||
qy,
|
||||
bottom,
|
||||
withlines = s.lines.show,
|
||||
withbottom = ps > 2 && datapoints.format[2].y,
|
||||
withsteps = withlines && s.lines.steps,
|
||||
fromgap = true,
|
||||
i = 0,
|
||||
j = 0,
|
||||
l,
|
||||
m;
|
||||
|
||||
while (true) {
|
||||
if (i >= points.length) {
|
||||
break;
|
||||
}
|
||||
|
||||
l = newpoints.length;
|
||||
|
||||
if (points[i] == null) {
|
||||
// copy gaps
|
||||
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints.push(points[i + m]);
|
||||
}
|
||||
|
||||
i += ps;
|
||||
} else if (j >= otherpoints.length) {
|
||||
// for lines, we can't use the rest of the points
|
||||
|
||||
if (!withlines) {
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints.push(points[i + m]);
|
||||
}
|
||||
}
|
||||
|
||||
i += ps;
|
||||
} else if (otherpoints[j] == null) {
|
||||
// oops, got a gap
|
||||
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints.push(null);
|
||||
}
|
||||
|
||||
fromgap = true;
|
||||
j += otherps;
|
||||
} else {
|
||||
// cases where we actually got two points
|
||||
|
||||
px = points[i];
|
||||
py = points[i + 1];
|
||||
qx = otherpoints[j];
|
||||
qy = otherpoints[j + 1];
|
||||
bottom = 0;
|
||||
|
||||
if (px === qx) {
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints.push(points[i + m]);
|
||||
}
|
||||
|
||||
//newpoints[ l + 1 ] += qy;
|
||||
bottom = qy;
|
||||
|
||||
i += ps;
|
||||
j += otherps;
|
||||
} else if (px > qx) {
|
||||
// we got past point below, might need to
|
||||
// insert interpolated extra point
|
||||
|
||||
if (withlines && i > 0 && points[i - ps] != null) {
|
||||
intery =
|
||||
py +
|
||||
((points[i - ps + 1] - py) * (qx - px)) / (points[i - ps] - px);
|
||||
newpoints.push(qx);
|
||||
newpoints.push(intery);
|
||||
for (m = 2; m < ps; ++m) {
|
||||
newpoints.push(points[i + m]);
|
||||
}
|
||||
bottom = qy;
|
||||
}
|
||||
|
||||
j += otherps;
|
||||
} else {
|
||||
// px < qx
|
||||
|
||||
// if we come from a gap, we just skip this point
|
||||
|
||||
if (fromgap && withlines) {
|
||||
i += ps;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints.push(points[i + m]);
|
||||
}
|
||||
|
||||
// we might be able to interpolate a point below,
|
||||
// this can give us a better y
|
||||
|
||||
if (withlines && j > 0 && otherpoints[j - otherps] != null) {
|
||||
bottom =
|
||||
qy +
|
||||
((otherpoints[j - otherps + 1] - qy) * (px - qx)) /
|
||||
(otherpoints[j - otherps] - qx);
|
||||
}
|
||||
|
||||
//newpoints[l + 1] += bottom;
|
||||
|
||||
i += ps;
|
||||
}
|
||||
|
||||
fromgap = false;
|
||||
|
||||
if (l !== newpoints.length && withbottom) {
|
||||
newpoints[l + 2] = bottom;
|
||||
}
|
||||
}
|
||||
|
||||
// maintain the line steps invariant
|
||||
|
||||
if (
|
||||
withsteps &&
|
||||
l !== newpoints.length &&
|
||||
l > 0 &&
|
||||
newpoints[l] !== null &&
|
||||
newpoints[l] !== newpoints[l - ps] &&
|
||||
newpoints[l + 1] !== newpoints[l - ps + 1]
|
||||
) {
|
||||
for (m = 0; m < ps; ++m) {
|
||||
newpoints[l + ps + m] = newpoints[l + m];
|
||||
}
|
||||
newpoints[l + 1] = newpoints[l - ps + 1];
|
||||
}
|
||||
}
|
||||
|
||||
datapoints.points = newpoints;
|
||||
}
|
||||
|
||||
plot.hooks.processDatapoints.push(computeFillBottoms);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "fillbetween",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
/* Flot plugin for plotting images.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The data syntax is [ [ image, x1, y1, x2, y2 ], ... ] where (x1, y1) and
|
||||
(x2, y2) are where you intend the two opposite corners of the image to end up
|
||||
in the plot. Image must be a fully loaded Javascript image (you can make one
|
||||
with new Image()). If the image is not complete, it's skipped when plotting.
|
||||
|
||||
There are two helpers included for retrieving images. The easiest work the way
|
||||
that you put in URLs instead of images in the data, like this:
|
||||
|
||||
[ "myimage.png", 0, 0, 10, 10 ]
|
||||
|
||||
Then call $.plot.image.loadData( data, options, callback ) where data and
|
||||
options are the same as you pass in to $.plot. This loads the images, replaces
|
||||
the URLs in the data with the corresponding images and calls "callback" when
|
||||
all images are loaded (or failed loading). In the callback, you can then call
|
||||
$.plot with the data set. See the included example.
|
||||
|
||||
A more low-level helper, $.plot.image.load(urls, callback) is also included.
|
||||
Given a list of URLs, it calls callback with an object mapping from URL to
|
||||
Image object when all images are loaded or have failed loading.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
series: {
|
||||
images: {
|
||||
show: boolean
|
||||
anchor: "corner" or "center"
|
||||
alpha: [ 0, 1 ]
|
||||
}
|
||||
}
|
||||
|
||||
They can be specified for a specific series:
|
||||
|
||||
$.plot( $("#placeholder"), [{
|
||||
data: [ ... ],
|
||||
images: { ... }
|
||||
])
|
||||
|
||||
Note that because the data format is different from usual data points, you
|
||||
can't use images with anything else in a specific data series.
|
||||
|
||||
Setting "anchor" to "center" causes the pixels in the image to be anchored at
|
||||
the corner pixel centers inside of at the pixel corners, effectively letting
|
||||
half a pixel stick out to each side in the plot.
|
||||
|
||||
A possible future direction could be support for tiling for large images (like
|
||||
Google Maps).
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
series: {
|
||||
images: {
|
||||
show: false,
|
||||
alpha: 1,
|
||||
anchor: "corner", // or "center"
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
$.plot.image = {};
|
||||
|
||||
$.plot.image.loadDataImages = function (series, options, callback) {
|
||||
var urls = [],
|
||||
points = [];
|
||||
|
||||
var defaultShow = options.series.images.show;
|
||||
|
||||
$.each(series, function (i, s) {
|
||||
if (!(defaultShow || s.images.show)) return;
|
||||
|
||||
if (s.data) s = s.data;
|
||||
|
||||
$.each(s, function (i, p) {
|
||||
if (typeof p[0] == "string") {
|
||||
urls.push(p[0]);
|
||||
points.push(p);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$.plot.image.load(urls, function (loadedImages) {
|
||||
$.each(points, function (i, p) {
|
||||
var url = p[0];
|
||||
if (loadedImages[url]) p[0] = loadedImages[url];
|
||||
});
|
||||
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
$.plot.image.load = function (urls, callback) {
|
||||
var missing = urls.length,
|
||||
loaded = {};
|
||||
if (missing == 0) callback({});
|
||||
|
||||
$.each(urls, function (i, url) {
|
||||
var handler = function () {
|
||||
--missing;
|
||||
|
||||
loaded[url] = this;
|
||||
|
||||
if (missing == 0) callback(loaded);
|
||||
};
|
||||
|
||||
$("<img />").load(handler).error(handler).attr("src", url);
|
||||
});
|
||||
};
|
||||
|
||||
function drawSeries(plot, ctx, series) {
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
|
||||
if (!series.images || !series.images.show) return;
|
||||
|
||||
var points = series.datapoints.points,
|
||||
ps = series.datapoints.pointsize;
|
||||
|
||||
for (var i = 0; i < points.length; i += ps) {
|
||||
var img = points[i],
|
||||
x1 = points[i + 1],
|
||||
y1 = points[i + 2],
|
||||
x2 = points[i + 3],
|
||||
y2 = points[i + 4],
|
||||
xaxis = series.xaxis,
|
||||
yaxis = series.yaxis,
|
||||
tmp;
|
||||
|
||||
// actually we should check img.complete, but it
|
||||
// appears to be a somewhat unreliable indicator in
|
||||
// IE6 (false even after load event)
|
||||
if (!img || img.width <= 0 || img.height <= 0) continue;
|
||||
|
||||
if (x1 > x2) {
|
||||
tmp = x2;
|
||||
x2 = x1;
|
||||
x1 = tmp;
|
||||
}
|
||||
if (y1 > y2) {
|
||||
tmp = y2;
|
||||
y2 = y1;
|
||||
y1 = tmp;
|
||||
}
|
||||
|
||||
// if the anchor is at the center of the pixel, expand the
|
||||
// image by 1/2 pixel in each direction
|
||||
if (series.images.anchor == "center") {
|
||||
tmp = (0.5 * (x2 - x1)) / (img.width - 1);
|
||||
x1 -= tmp;
|
||||
x2 += tmp;
|
||||
tmp = (0.5 * (y2 - y1)) / (img.height - 1);
|
||||
y1 -= tmp;
|
||||
y2 += tmp;
|
||||
}
|
||||
|
||||
// clip
|
||||
if (
|
||||
x1 == x2 ||
|
||||
y1 == y2 ||
|
||||
x1 >= xaxis.max ||
|
||||
x2 <= xaxis.min ||
|
||||
y1 >= yaxis.max ||
|
||||
y2 <= yaxis.min
|
||||
)
|
||||
continue;
|
||||
|
||||
var sx1 = 0,
|
||||
sy1 = 0,
|
||||
sx2 = img.width,
|
||||
sy2 = img.height;
|
||||
if (x1 < xaxis.min) {
|
||||
sx1 += ((sx2 - sx1) * (xaxis.min - x1)) / (x2 - x1);
|
||||
x1 = xaxis.min;
|
||||
}
|
||||
|
||||
if (x2 > xaxis.max) {
|
||||
sx2 += ((sx2 - sx1) * (xaxis.max - x2)) / (x2 - x1);
|
||||
x2 = xaxis.max;
|
||||
}
|
||||
|
||||
if (y1 < yaxis.min) {
|
||||
sy2 += ((sy1 - sy2) * (yaxis.min - y1)) / (y2 - y1);
|
||||
y1 = yaxis.min;
|
||||
}
|
||||
|
||||
if (y2 > yaxis.max) {
|
||||
sy1 += ((sy1 - sy2) * (yaxis.max - y2)) / (y2 - y1);
|
||||
y2 = yaxis.max;
|
||||
}
|
||||
|
||||
x1 = xaxis.p2c(x1);
|
||||
x2 = xaxis.p2c(x2);
|
||||
y1 = yaxis.p2c(y1);
|
||||
y2 = yaxis.p2c(y2);
|
||||
|
||||
// the transformation may have swapped us
|
||||
if (x1 > x2) {
|
||||
tmp = x2;
|
||||
x2 = x1;
|
||||
x1 = tmp;
|
||||
}
|
||||
if (y1 > y2) {
|
||||
tmp = y2;
|
||||
y2 = y1;
|
||||
y1 = tmp;
|
||||
}
|
||||
|
||||
tmp = ctx.globalAlpha;
|
||||
ctx.globalAlpha *= series.images.alpha;
|
||||
ctx.drawImage(
|
||||
img,
|
||||
sx1,
|
||||
sy1,
|
||||
sx2 - sx1,
|
||||
sy2 - sy1,
|
||||
x1 + plotOffset.left,
|
||||
y1 + plotOffset.top,
|
||||
x2 - x1,
|
||||
y2 - y1
|
||||
);
|
||||
ctx.globalAlpha = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
function processRawData(plot, series, data, datapoints) {
|
||||
if (!series.images.show) return;
|
||||
|
||||
// format is Image, x1, y1, x2, y2 (opposite corners)
|
||||
datapoints.format = [
|
||||
{ required: true },
|
||||
{ x: true, number: true, required: true },
|
||||
{ y: true, number: true, required: true },
|
||||
{ x: true, number: true, required: true },
|
||||
{ y: true, number: true, required: true },
|
||||
];
|
||||
}
|
||||
|
||||
function init(plot) {
|
||||
plot.hooks.processRawData.push(processRawData);
|
||||
plot.hooks.drawSeries.push(drawSeries);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "image",
|
||||
version: "1.1",
|
||||
});
|
||||
})(jQuery);
|
||||
File diff suppressed because it is too large
Load Diff
+489
@@ -0,0 +1,489 @@
|
||||
/* Flot plugin for adding the ability to pan and zoom the plot.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The default behaviour is double click and scrollwheel up/down to zoom in, drag
|
||||
to pan. The plugin defines plot.zoom({ center }), plot.zoomOut() and
|
||||
plot.pan( offset ) so you easily can add custom controls. It also fires
|
||||
"plotpan" and "plotzoom" events, useful for synchronizing plots.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
zoom: {
|
||||
interactive: false
|
||||
trigger: "dblclick" // or "click" for single click
|
||||
amount: 1.5 // 2 = 200% (zoom in), 0.5 = 50% (zoom out)
|
||||
}
|
||||
|
||||
pan: {
|
||||
interactive: false
|
||||
cursor: "move" // CSS mouse cursor value used when dragging, e.g. "pointer"
|
||||
frameRate: 20
|
||||
}
|
||||
|
||||
xaxis, yaxis, x2axis, y2axis: {
|
||||
zoomRange: null // or [ number, number ] (min range, max range) or false
|
||||
panRange: null // or [ number, number ] (min, max) or false
|
||||
}
|
||||
|
||||
"interactive" enables the built-in drag/click behaviour. If you enable
|
||||
interactive for pan, then you'll have a basic plot that supports moving
|
||||
around; the same for zoom.
|
||||
|
||||
"amount" specifies the default amount to zoom in (so 1.5 = 150%) relative to
|
||||
the current viewport.
|
||||
|
||||
"cursor" is a standard CSS mouse cursor string used for visual feedback to the
|
||||
user when dragging.
|
||||
|
||||
"frameRate" specifies the maximum number of times per second the plot will
|
||||
update itself while the user is panning around on it (set to null to disable
|
||||
intermediate pans, the plot will then not update until the mouse button is
|
||||
released).
|
||||
|
||||
"zoomRange" is the interval in which zooming can happen, e.g. with zoomRange:
|
||||
[1, 100] the zoom will never scale the axis so that the difference between min
|
||||
and max is smaller than 1 or larger than 100. You can set either end to null
|
||||
to ignore, e.g. [1, null]. If you set zoomRange to false, zooming on that axis
|
||||
will be disabled.
|
||||
|
||||
"panRange" confines the panning to stay within a range, e.g. with panRange:
|
||||
[-10, 20] panning stops at -10 in one end and at 20 in the other. Either can
|
||||
be null, e.g. [-10, null]. If you set panRange to false, panning on that axis
|
||||
will be disabled.
|
||||
|
||||
Example API usage:
|
||||
|
||||
plot = $.plot(...);
|
||||
|
||||
// zoom default amount in on the pixel ( 10, 20 )
|
||||
plot.zoom({ center: { left: 10, top: 20 } });
|
||||
|
||||
// zoom out again
|
||||
plot.zoomOut({ center: { left: 10, top: 20 } });
|
||||
|
||||
// zoom 200% in on the pixel (10, 20)
|
||||
plot.zoom({ amount: 2, center: { left: 10, top: 20 } });
|
||||
|
||||
// pan 100 pixels to the left and 20 down
|
||||
plot.pan({ left: -100, top: 20 })
|
||||
|
||||
Here, "center" specifies where the center of the zooming should happen. Note
|
||||
that this is defined in pixel space, not the space of the data points (you can
|
||||
use the p2c helpers on the axes in Flot to help you convert between these).
|
||||
|
||||
"amount" is the amount to zoom the viewport relative to the current range, so
|
||||
1 is 100% (i.e. no change), 1.5 is 150% (zoom in), 0.7 is 70% (zoom out). You
|
||||
can set the default in the options.
|
||||
|
||||
*/
|
||||
|
||||
// First two dependencies, jquery.event.drag.js and
|
||||
// jquery.mousewheel.js, we put them inline here to save people the
|
||||
// effort of downloading them.
|
||||
|
||||
/*
|
||||
jquery.event.drag.js ~ v1.5 ~ Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
||||
Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-LICENSE.txt
|
||||
*/
|
||||
(function (a) {
|
||||
function e(h) {
|
||||
var k,
|
||||
j = this,
|
||||
l = h.data || {};
|
||||
if (l.elem)
|
||||
(j = h.dragTarget = l.elem),
|
||||
(h.dragProxy = d.proxy || j),
|
||||
(h.cursorOffsetX = l.pageX - l.left),
|
||||
(h.cursorOffsetY = l.pageY - l.top),
|
||||
(h.offsetX = h.pageX - h.cursorOffsetX),
|
||||
(h.offsetY = h.pageY - h.cursorOffsetY);
|
||||
else if (
|
||||
d.dragging ||
|
||||
(l.which > 0 && h.which != l.which) ||
|
||||
a(h.target).is(l.not)
|
||||
)
|
||||
return;
|
||||
switch (h.type) {
|
||||
case "mousedown":
|
||||
return (
|
||||
a.extend(l, a(j).offset(), {
|
||||
elem: j,
|
||||
target: h.target,
|
||||
pageX: h.pageX,
|
||||
pageY: h.pageY,
|
||||
}),
|
||||
b.add(document, "mousemove mouseup", e, l),
|
||||
i(j, !1),
|
||||
(d.dragging = null),
|
||||
!1
|
||||
);
|
||||
case !d.dragging && "mousemove":
|
||||
if (g(h.pageX - l.pageX) + g(h.pageY - l.pageY) < l.distance) break;
|
||||
(h.target = l.target),
|
||||
(k = f(h, "dragstart", j)),
|
||||
k !== !1 &&
|
||||
((d.dragging = j), (d.proxy = h.dragProxy = a(k || j)[0]));
|
||||
case "mousemove":
|
||||
if (d.dragging) {
|
||||
if (
|
||||
((k = f(h, "drag", j)),
|
||||
c.drop && ((c.drop.allowed = k !== !1), c.drop.handler(h)),
|
||||
k !== !1)
|
||||
)
|
||||
break;
|
||||
h.type = "mouseup";
|
||||
}
|
||||
case "mouseup":
|
||||
b.remove(document, "mousemove mouseup", e),
|
||||
d.dragging && (c.drop && c.drop.handler(h), f(h, "dragend", j)),
|
||||
i(j, !0),
|
||||
(d.dragging = d.proxy = l.elem = !1);
|
||||
}
|
||||
return !0;
|
||||
}
|
||||
function f(b, c, d) {
|
||||
b.type = c;
|
||||
var e = a.event.dispatch.call(d, b);
|
||||
return e === !1 ? !1 : e || b.result;
|
||||
}
|
||||
function g(a) {
|
||||
return Math.pow(a, 2);
|
||||
}
|
||||
function h() {
|
||||
return d.dragging === !1;
|
||||
}
|
||||
function i(a, b) {
|
||||
a &&
|
||||
((a.unselectable = b ? "off" : "on"),
|
||||
(a.onselectstart = function () {
|
||||
return b;
|
||||
}),
|
||||
a.style && (a.style.MozUserSelect = b ? "" : "none"));
|
||||
}
|
||||
a.fn.drag = function (a, b, c) {
|
||||
return (
|
||||
b && this.bind("dragstart", a),
|
||||
c && this.bind("dragend", c),
|
||||
a ? this.bind("drag", b ? b : a) : this.trigger("drag")
|
||||
);
|
||||
};
|
||||
var b = a.event,
|
||||
c = b.special,
|
||||
d = (c.drag = {
|
||||
not: ":input",
|
||||
distance: 0,
|
||||
which: 1,
|
||||
dragging: !1,
|
||||
setup: function (c) {
|
||||
(c = a.extend(
|
||||
{ distance: d.distance, which: d.which, not: d.not },
|
||||
c || {}
|
||||
)),
|
||||
(c.distance = g(c.distance)),
|
||||
b.add(this, "mousedown", e, c),
|
||||
this.attachEvent && this.attachEvent("ondragstart", h);
|
||||
},
|
||||
teardown: function () {
|
||||
b.remove(this, "mousedown", e),
|
||||
this === d.dragging && (d.dragging = d.proxy = !1),
|
||||
i(this, !0),
|
||||
this.detachEvent && this.detachEvent("ondragstart", h);
|
||||
},
|
||||
});
|
||||
c.dragstart = c.dragend = { setup: function () {}, teardown: function () {} };
|
||||
})(jQuery);
|
||||
|
||||
/* jquery.mousewheel.min.js
|
||||
* Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
||||
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
||||
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
||||
*
|
||||
* Version: 3.0.6
|
||||
*
|
||||
* Requires: 1.2.2+
|
||||
*/
|
||||
(function (d) {
|
||||
function e(a) {
|
||||
var b = a || window.event,
|
||||
c = [].slice.call(arguments, 1),
|
||||
f = 0,
|
||||
e = 0,
|
||||
g = 0,
|
||||
a = d.event.fix(b);
|
||||
a.type = "mousewheel";
|
||||
b.wheelDelta && (f = b.wheelDelta / 120);
|
||||
b.detail && (f = -b.detail / 3);
|
||||
g = f;
|
||||
void 0 !== b.axis &&
|
||||
b.axis === b.HORIZONTAL_AXIS &&
|
||||
((g = 0), (e = -1 * f));
|
||||
void 0 !== b.wheelDeltaY && (g = b.wheelDeltaY / 120);
|
||||
void 0 !== b.wheelDeltaX && (e = (-1 * b.wheelDeltaX) / 120);
|
||||
c.unshift(a, f, e, g);
|
||||
return (d.event.dispatch || d.event.handle).apply(this, c);
|
||||
}
|
||||
var c = ["DOMMouseScroll", "mousewheel"];
|
||||
if (d.event.fixHooks)
|
||||
for (var h = c.length; h; ) d.event.fixHooks[c[--h]] = d.event.mouseHooks;
|
||||
d.event.special.mousewheel = {
|
||||
setup: function () {
|
||||
if (this.addEventListener)
|
||||
for (var a = c.length; a; ) this.addEventListener(c[--a], e, !1);
|
||||
else this.onmousewheel = e;
|
||||
},
|
||||
teardown: function () {
|
||||
if (this.removeEventListener)
|
||||
for (var a = c.length; a; ) this.removeEventListener(c[--a], e, !1);
|
||||
else this.onmousewheel = null;
|
||||
},
|
||||
};
|
||||
d.fn.extend({
|
||||
mousewheel: function (a) {
|
||||
return a ? this.bind("mousewheel", a) : this.trigger("mousewheel");
|
||||
},
|
||||
unmousewheel: function (a) {
|
||||
return this.unbind("mousewheel", a);
|
||||
},
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
xaxis: {
|
||||
zoomRange: null, // or [number, number] (min range, max range)
|
||||
panRange: null, // or [number, number] (min, max)
|
||||
},
|
||||
zoom: {
|
||||
interactive: false,
|
||||
trigger: "dblclick", // or "click" for single click
|
||||
amount: 1.5, // how much to zoom relative to current position, 2 = 200% (zoom in), 0.5 = 50% (zoom out)
|
||||
},
|
||||
pan: {
|
||||
interactive: false,
|
||||
cursor: "move",
|
||||
frameRate: 20,
|
||||
},
|
||||
};
|
||||
|
||||
function init(plot) {
|
||||
function onZoomClick(e, zoomOut) {
|
||||
var c = plot.offset();
|
||||
c.left = e.pageX - c.left;
|
||||
c.top = e.pageY - c.top;
|
||||
if (zoomOut) plot.zoomOut({ center: c });
|
||||
else plot.zoom({ center: c });
|
||||
}
|
||||
|
||||
function onMouseWheel(e, delta) {
|
||||
e.preventDefault();
|
||||
onZoomClick(e, delta < 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
var prevCursor = "default",
|
||||
prevPageX = 0,
|
||||
prevPageY = 0,
|
||||
panTimeout = null;
|
||||
|
||||
function onDragStart(e) {
|
||||
if (e.which != 1)
|
||||
// only accept left-click
|
||||
return false;
|
||||
var c = plot.getPlaceholder().css("cursor");
|
||||
if (c) prevCursor = c;
|
||||
plot.getPlaceholder().css("cursor", plot.getOptions().pan.cursor);
|
||||
prevPageX = e.pageX;
|
||||
prevPageY = e.pageY;
|
||||
}
|
||||
|
||||
function onDrag(e) {
|
||||
var frameRate = plot.getOptions().pan.frameRate;
|
||||
if (panTimeout || !frameRate) return;
|
||||
|
||||
panTimeout = setTimeout(function () {
|
||||
plot.pan({ left: prevPageX - e.pageX, top: prevPageY - e.pageY });
|
||||
prevPageX = e.pageX;
|
||||
prevPageY = e.pageY;
|
||||
|
||||
panTimeout = null;
|
||||
}, (1 / frameRate) * 1000);
|
||||
}
|
||||
|
||||
function onDragEnd(e) {
|
||||
if (panTimeout) {
|
||||
clearTimeout(panTimeout);
|
||||
panTimeout = null;
|
||||
}
|
||||
|
||||
plot.getPlaceholder().css("cursor", prevCursor);
|
||||
plot.pan({ left: prevPageX - e.pageX, top: prevPageY - e.pageY });
|
||||
}
|
||||
|
||||
function bindEvents(plot, eventHolder) {
|
||||
var o = plot.getOptions();
|
||||
if (o.zoom.interactive) {
|
||||
eventHolder[o.zoom.trigger](onZoomClick);
|
||||
eventHolder.mousewheel(onMouseWheel);
|
||||
}
|
||||
|
||||
if (o.pan.interactive) {
|
||||
eventHolder.bind("dragstart", { distance: 10 }, onDragStart);
|
||||
eventHolder.bind("drag", onDrag);
|
||||
eventHolder.bind("dragend", onDragEnd);
|
||||
}
|
||||
}
|
||||
|
||||
plot.zoomOut = function (args) {
|
||||
if (!args) args = {};
|
||||
|
||||
if (!args.amount) args.amount = plot.getOptions().zoom.amount;
|
||||
|
||||
args.amount = 1 / args.amount;
|
||||
plot.zoom(args);
|
||||
};
|
||||
|
||||
plot.zoom = function (args) {
|
||||
if (!args) args = {};
|
||||
|
||||
var c = args.center,
|
||||
amount = args.amount || plot.getOptions().zoom.amount,
|
||||
w = plot.width(),
|
||||
h = plot.height();
|
||||
|
||||
if (!c) c = { left: w / 2, top: h / 2 };
|
||||
|
||||
var xf = c.left / w,
|
||||
yf = c.top / h,
|
||||
minmax = {
|
||||
x: {
|
||||
min: c.left - (xf * w) / amount,
|
||||
max: c.left + ((1 - xf) * w) / amount,
|
||||
},
|
||||
y: {
|
||||
min: c.top - (yf * h) / amount,
|
||||
max: c.top + ((1 - yf) * h) / amount,
|
||||
},
|
||||
};
|
||||
|
||||
$.each(plot.getAxes(), function (_, axis) {
|
||||
var opts = axis.options,
|
||||
min = minmax[axis.direction].min,
|
||||
max = minmax[axis.direction].max,
|
||||
zr = opts.zoomRange,
|
||||
pr = opts.panRange;
|
||||
|
||||
if (zr === false)
|
||||
// no zooming on this axis
|
||||
return;
|
||||
|
||||
min = axis.c2p(min);
|
||||
max = axis.c2p(max);
|
||||
if (min > max) {
|
||||
// make sure min < max
|
||||
var tmp = min;
|
||||
min = max;
|
||||
max = tmp;
|
||||
}
|
||||
|
||||
//Check that we are in panRange
|
||||
if (pr) {
|
||||
if (pr[0] != null && min < pr[0]) {
|
||||
min = pr[0];
|
||||
}
|
||||
if (pr[1] != null && max > pr[1]) {
|
||||
max = pr[1];
|
||||
}
|
||||
}
|
||||
|
||||
var range = max - min;
|
||||
if (
|
||||
zr &&
|
||||
((zr[0] != null && range < zr[0] && amount > 1) ||
|
||||
(zr[1] != null && range > zr[1] && amount < 1))
|
||||
)
|
||||
return;
|
||||
|
||||
opts.min = min;
|
||||
opts.max = max;
|
||||
});
|
||||
|
||||
plot.setupGrid();
|
||||
plot.draw();
|
||||
|
||||
if (!args.preventEvent)
|
||||
plot.getPlaceholder().trigger("plotzoom", [plot, args]);
|
||||
};
|
||||
|
||||
plot.pan = function (args) {
|
||||
var delta = {
|
||||
x: +args.left,
|
||||
y: +args.top,
|
||||
};
|
||||
|
||||
if (isNaN(delta.x)) delta.x = 0;
|
||||
if (isNaN(delta.y)) delta.y = 0;
|
||||
|
||||
$.each(plot.getAxes(), function (_, axis) {
|
||||
var opts = axis.options,
|
||||
min,
|
||||
max,
|
||||
d = delta[axis.direction];
|
||||
|
||||
(min = axis.c2p(axis.p2c(axis.min) + d)),
|
||||
(max = axis.c2p(axis.p2c(axis.max) + d));
|
||||
|
||||
var pr = opts.panRange;
|
||||
if (pr === false)
|
||||
// no panning on this axis
|
||||
return;
|
||||
|
||||
if (pr) {
|
||||
// check whether we hit the wall
|
||||
if (pr[0] != null && pr[0] > min) {
|
||||
d = pr[0] - min;
|
||||
min += d;
|
||||
max += d;
|
||||
}
|
||||
|
||||
if (pr[1] != null && pr[1] < max) {
|
||||
d = pr[1] - max;
|
||||
min += d;
|
||||
max += d;
|
||||
}
|
||||
}
|
||||
|
||||
opts.min = min;
|
||||
opts.max = max;
|
||||
});
|
||||
|
||||
plot.setupGrid();
|
||||
plot.draw();
|
||||
|
||||
if (!args.preventEvent)
|
||||
plot.getPlaceholder().trigger("plotpan", [plot, args]);
|
||||
};
|
||||
|
||||
function shutdown(plot, eventHolder) {
|
||||
eventHolder.unbind(plot.getOptions().zoom.trigger, onZoomClick);
|
||||
eventHolder.unbind("mousewheel", onMouseWheel);
|
||||
eventHolder.unbind("dragstart", onDragStart);
|
||||
eventHolder.unbind("drag", onDrag);
|
||||
eventHolder.unbind("dragend", onDragEnd);
|
||||
if (panTimeout) clearTimeout(panTimeout);
|
||||
}
|
||||
|
||||
plot.hooks.bindEvents.push(bindEvents);
|
||||
plot.hooks.shutdown.push(shutdown);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "navigate",
|
||||
version: "1.3",
|
||||
});
|
||||
})(jQuery);
|
||||
+917
@@ -0,0 +1,917 @@
|
||||
/* Flot plugin for rendering pie charts.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The plugin assumes that each series has a single data value, and that each
|
||||
value is a positive integer or zero. Negative numbers don't make sense for a
|
||||
pie chart, and have unpredictable results. The values do NOT need to be
|
||||
passed in as percentages; the plugin will calculate the total and per-slice
|
||||
percentages internally.
|
||||
|
||||
* Created by Brian Medendorp
|
||||
|
||||
* Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
series: {
|
||||
pie: {
|
||||
show: true/false
|
||||
radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto'
|
||||
innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect
|
||||
startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result
|
||||
tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show)
|
||||
offset: {
|
||||
top: integer value to move the pie up or down
|
||||
left: integer value to move the pie left or right, or 'auto'
|
||||
},
|
||||
stroke: {
|
||||
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF')
|
||||
width: integer pixel width of the stroke
|
||||
},
|
||||
label: {
|
||||
show: true/false, or 'auto'
|
||||
formatter: a user-defined function that modifies the text/style of the label text
|
||||
radius: 0-1 for percentage of fullsize, or a specified pixel length
|
||||
background: {
|
||||
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000')
|
||||
opacity: 0-1
|
||||
},
|
||||
threshold: 0-1 for the percentage value at which to hide labels (if they're too small)
|
||||
},
|
||||
combine: {
|
||||
threshold: 0-1 for the percentage value at which to combine slices (if they're too small)
|
||||
color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined
|
||||
label: any text value of what the combined slice should be labeled
|
||||
}
|
||||
highlight: {
|
||||
opacity: 0-1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
More detail and specific examples can be found in the included HTML file.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
// Maximum redraw attempts when fitting labels within the plot
|
||||
|
||||
var REDRAW_ATTEMPTS = 10;
|
||||
|
||||
// Factor by which to shrink the pie when fitting labels within the plot
|
||||
|
||||
var REDRAW_SHRINK = 0.95;
|
||||
|
||||
function init(plot) {
|
||||
var canvas = null,
|
||||
target = null,
|
||||
options = null,
|
||||
maxRadius = null,
|
||||
centerLeft = null,
|
||||
centerTop = null,
|
||||
processed = false,
|
||||
ctx = null;
|
||||
|
||||
// interactive variables
|
||||
|
||||
var highlights = [];
|
||||
|
||||
// add hook to determine if pie plugin in enabled, and then perform necessary operations
|
||||
|
||||
plot.hooks.processOptions.push(function (plot, options) {
|
||||
if (options.series.pie.show) {
|
||||
options.grid.show = false;
|
||||
|
||||
// set labels.show
|
||||
|
||||
if (options.series.pie.label.show == "auto") {
|
||||
if (options.legend.show) {
|
||||
options.series.pie.label.show = false;
|
||||
} else {
|
||||
options.series.pie.label.show = true;
|
||||
}
|
||||
}
|
||||
|
||||
// set radius
|
||||
|
||||
if (options.series.pie.radius == "auto") {
|
||||
if (options.series.pie.label.show) {
|
||||
options.series.pie.radius = 3 / 4;
|
||||
} else {
|
||||
options.series.pie.radius = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ensure sane tilt
|
||||
|
||||
if (options.series.pie.tilt > 1) {
|
||||
options.series.pie.tilt = 1;
|
||||
} else if (options.series.pie.tilt < 0) {
|
||||
options.series.pie.tilt = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.bindEvents.push(function (plot, eventHolder) {
|
||||
var options = plot.getOptions();
|
||||
if (options.series.pie.show) {
|
||||
if (options.grid.hoverable) {
|
||||
eventHolder.unbind("mousemove").mousemove(onMouseMove);
|
||||
}
|
||||
if (options.grid.clickable) {
|
||||
eventHolder.unbind("click").click(onClick);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.processDatapoints.push(function (
|
||||
plot,
|
||||
series,
|
||||
data,
|
||||
datapoints
|
||||
) {
|
||||
var options = plot.getOptions();
|
||||
if (options.series.pie.show) {
|
||||
processDatapoints(plot, series, data, datapoints);
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.drawOverlay.push(function (plot, octx) {
|
||||
var options = plot.getOptions();
|
||||
if (options.series.pie.show) {
|
||||
drawOverlay(plot, octx);
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.draw.push(function (plot, newCtx) {
|
||||
var options = plot.getOptions();
|
||||
if (options.series.pie.show) {
|
||||
draw(plot, newCtx);
|
||||
}
|
||||
});
|
||||
|
||||
function processDatapoints(plot, series, datapoints) {
|
||||
if (!processed) {
|
||||
processed = true;
|
||||
canvas = plot.getCanvas();
|
||||
target = $(canvas).parent();
|
||||
options = plot.getOptions();
|
||||
plot.setData(combine(plot.getData()));
|
||||
}
|
||||
}
|
||||
|
||||
function combine(data) {
|
||||
var total = 0,
|
||||
combined = 0,
|
||||
numCombined = 0,
|
||||
color = options.series.pie.combine.color,
|
||||
newdata = [];
|
||||
|
||||
// Fix up the raw data from Flot, ensuring the data is numeric
|
||||
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
var value = data[i].data;
|
||||
|
||||
// If the data is an array, we'll assume that it's a standard
|
||||
// Flot x-y pair, and are concerned only with the second value.
|
||||
|
||||
// Note how we use the original array, rather than creating a
|
||||
// new one; this is more efficient and preserves any extra data
|
||||
// that the user may have stored in higher indexes.
|
||||
|
||||
if ($.isArray(value) && value.length == 1) {
|
||||
value = value[0];
|
||||
}
|
||||
|
||||
if ($.isArray(value)) {
|
||||
// Equivalent to $.isNumeric() but compatible with jQuery < 1.7
|
||||
if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
|
||||
value[1] = +value[1];
|
||||
} else {
|
||||
value[1] = 0;
|
||||
}
|
||||
} else if (!isNaN(parseFloat(value)) && isFinite(value)) {
|
||||
value = [1, +value];
|
||||
} else {
|
||||
value = [1, 0];
|
||||
}
|
||||
|
||||
data[i].data = [value];
|
||||
}
|
||||
|
||||
// Sum up all the slices, so we can calculate percentages for each
|
||||
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
total += data[i].data[0][1];
|
||||
}
|
||||
|
||||
// Count the number of slices with percentages below the combine
|
||||
// threshold; if it turns out to be just one, we won't combine.
|
||||
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
var value = data[i].data[0][1];
|
||||
if (value / total <= options.series.pie.combine.threshold) {
|
||||
combined += value;
|
||||
numCombined++;
|
||||
if (!color) {
|
||||
color = data[i].color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
var value = data[i].data[0][1];
|
||||
if (
|
||||
numCombined < 2 ||
|
||||
value / total > options.series.pie.combine.threshold
|
||||
) {
|
||||
newdata.push(
|
||||
$.extend(data[i], {
|
||||
/* extend to allow keeping all other original data values
|
||||
and using them e.g. in labelFormatter. */
|
||||
data: [[1, value]],
|
||||
color: data[i].color,
|
||||
label: data[i].label,
|
||||
angle: (value * Math.PI * 2) / total,
|
||||
percent: value / (total / 100),
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (numCombined > 1) {
|
||||
newdata.push({
|
||||
data: [[1, combined]],
|
||||
color: color,
|
||||
label: options.series.pie.combine.label,
|
||||
angle: (combined * Math.PI * 2) / total,
|
||||
percent: combined / (total / 100),
|
||||
});
|
||||
}
|
||||
|
||||
return newdata;
|
||||
}
|
||||
|
||||
function draw(plot, newCtx) {
|
||||
if (!target) {
|
||||
return; // if no series were passed
|
||||
}
|
||||
|
||||
var canvasWidth = plot.getPlaceholder().width(),
|
||||
canvasHeight = plot.getPlaceholder().height(),
|
||||
legendWidth =
|
||||
target.children().filter(".legend").children().width() || 0;
|
||||
|
||||
ctx = newCtx;
|
||||
|
||||
// WARNING: HACK! REWRITE THIS CODE AS SOON AS POSSIBLE!
|
||||
|
||||
// When combining smaller slices into an 'other' slice, we need to
|
||||
// add a new series. Since Flot gives plugins no way to modify the
|
||||
// list of series, the pie plugin uses a hack where the first call
|
||||
// to processDatapoints results in a call to setData with the new
|
||||
// list of series, then subsequent processDatapoints do nothing.
|
||||
|
||||
// The plugin-global 'processed' flag is used to control this hack;
|
||||
// it starts out false, and is set to true after the first call to
|
||||
// processDatapoints.
|
||||
|
||||
// Unfortunately this turns future setData calls into no-ops; they
|
||||
// call processDatapoints, the flag is true, and nothing happens.
|
||||
|
||||
// To fix this we'll set the flag back to false here in draw, when
|
||||
// all series have been processed, so the next sequence of calls to
|
||||
// processDatapoints once again starts out with a slice-combine.
|
||||
// This is really a hack; in 0.9 we need to give plugins a proper
|
||||
// way to modify series before any processing begins.
|
||||
|
||||
processed = false;
|
||||
|
||||
// calculate maximum radius and center point
|
||||
|
||||
maxRadius =
|
||||
Math.min(canvasWidth, canvasHeight / options.series.pie.tilt) / 2;
|
||||
centerTop = canvasHeight / 2 + options.series.pie.offset.top;
|
||||
centerLeft = canvasWidth / 2;
|
||||
|
||||
if (options.series.pie.offset.left == "auto") {
|
||||
if (options.legend.position.match("w")) {
|
||||
centerLeft += legendWidth / 2;
|
||||
} else {
|
||||
centerLeft -= legendWidth / 2;
|
||||
}
|
||||
if (centerLeft < maxRadius) {
|
||||
centerLeft = maxRadius;
|
||||
} else if (centerLeft > canvasWidth - maxRadius) {
|
||||
centerLeft = canvasWidth - maxRadius;
|
||||
}
|
||||
} else {
|
||||
centerLeft += options.series.pie.offset.left;
|
||||
}
|
||||
|
||||
var slices = plot.getData(),
|
||||
attempts = 0;
|
||||
|
||||
// Keep shrinking the pie's radius until drawPie returns true,
|
||||
// indicating that all the labels fit, or we try too many times.
|
||||
|
||||
do {
|
||||
if (attempts > 0) {
|
||||
maxRadius *= REDRAW_SHRINK;
|
||||
}
|
||||
attempts += 1;
|
||||
clear();
|
||||
if (options.series.pie.tilt <= 0.8) {
|
||||
drawShadow();
|
||||
}
|
||||
} while (!drawPie() && attempts < REDRAW_ATTEMPTS);
|
||||
|
||||
if (attempts >= REDRAW_ATTEMPTS) {
|
||||
clear();
|
||||
target.prepend(
|
||||
"<div class='error'>Could not draw pie with labels contained inside canvas</div>"
|
||||
);
|
||||
}
|
||||
|
||||
if (plot.setSeries && plot.insertLegend) {
|
||||
plot.setSeries(slices);
|
||||
plot.insertLegend();
|
||||
}
|
||||
|
||||
// we're actually done at this point, just defining internal functions at this point
|
||||
|
||||
function clear() {
|
||||
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
||||
target.children().filter(".pieLabel, .pieLabelBackground").remove();
|
||||
}
|
||||
|
||||
function drawShadow() {
|
||||
var shadowLeft = options.series.pie.shadow.left;
|
||||
var shadowTop = options.series.pie.shadow.top;
|
||||
var edge = 10;
|
||||
var alpha = options.series.pie.shadow.alpha;
|
||||
var radius =
|
||||
options.series.pie.radius > 1
|
||||
? options.series.pie.radius
|
||||
: maxRadius * options.series.pie.radius;
|
||||
|
||||
if (
|
||||
radius >= canvasWidth / 2 - shadowLeft ||
|
||||
radius * options.series.pie.tilt >= canvasHeight / 2 - shadowTop ||
|
||||
radius <= edge
|
||||
) {
|
||||
return; // shadow would be outside canvas, so don't draw it
|
||||
}
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(shadowLeft, shadowTop);
|
||||
ctx.globalAlpha = alpha;
|
||||
ctx.fillStyle = "#000";
|
||||
|
||||
// center and rotate to starting position
|
||||
|
||||
ctx.translate(centerLeft, centerTop);
|
||||
ctx.scale(1, options.series.pie.tilt);
|
||||
|
||||
//radius -= edge;
|
||||
|
||||
for (var i = 1; i <= edge; i++) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, radius, 0, Math.PI * 2, false);
|
||||
ctx.fill();
|
||||
radius -= i;
|
||||
}
|
||||
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
function drawPie() {
|
||||
var startAngle = Math.PI * options.series.pie.startAngle;
|
||||
var radius =
|
||||
options.series.pie.radius > 1
|
||||
? options.series.pie.radius
|
||||
: maxRadius * options.series.pie.radius;
|
||||
|
||||
// center and rotate to starting position
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(centerLeft, centerTop);
|
||||
ctx.scale(1, options.series.pie.tilt);
|
||||
//ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera
|
||||
|
||||
// draw slices
|
||||
|
||||
ctx.save();
|
||||
var currentAngle = startAngle;
|
||||
for (var i = 0; i < slices.length; ++i) {
|
||||
slices[i].startAngle = currentAngle;
|
||||
drawSlice(slices[i].angle, slices[i].color, true);
|
||||
}
|
||||
ctx.restore();
|
||||
|
||||
// draw slice outlines
|
||||
|
||||
if (options.series.pie.stroke.width > 0) {
|
||||
ctx.save();
|
||||
ctx.lineWidth = options.series.pie.stroke.width;
|
||||
currentAngle = startAngle;
|
||||
for (var i = 0; i < slices.length; ++i) {
|
||||
drawSlice(slices[i].angle, options.series.pie.stroke.color, false);
|
||||
}
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
// draw donut hole
|
||||
|
||||
drawDonutHole(ctx);
|
||||
|
||||
ctx.restore();
|
||||
|
||||
// Draw the labels, returning true if they fit within the plot
|
||||
|
||||
if (options.series.pie.label.show) {
|
||||
return drawLabels();
|
||||
} else return true;
|
||||
|
||||
function drawSlice(angle, color, fill) {
|
||||
if (angle <= 0 || isNaN(angle)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fill) {
|
||||
ctx.fillStyle = color;
|
||||
} else {
|
||||
ctx.strokeStyle = color;
|
||||
ctx.lineJoin = "round";
|
||||
}
|
||||
|
||||
ctx.beginPath();
|
||||
if (Math.abs(angle - Math.PI * 2) > 0.000000001) {
|
||||
ctx.moveTo(0, 0); // Center of the pie
|
||||
}
|
||||
|
||||
//ctx.arc(0, 0, radius, 0, angle, false); // This doesn't work properly in Opera
|
||||
ctx.arc(0, 0, radius, currentAngle, currentAngle + angle / 2, false);
|
||||
ctx.arc(
|
||||
0,
|
||||
0,
|
||||
radius,
|
||||
currentAngle + angle / 2,
|
||||
currentAngle + angle,
|
||||
false
|
||||
);
|
||||
ctx.closePath();
|
||||
//ctx.rotate(angle); // This doesn't work properly in Opera
|
||||
currentAngle += angle;
|
||||
|
||||
if (fill) {
|
||||
ctx.fill();
|
||||
} else {
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
function drawLabels() {
|
||||
var currentAngle = startAngle;
|
||||
var radius =
|
||||
options.series.pie.label.radius > 1
|
||||
? options.series.pie.label.radius
|
||||
: maxRadius * options.series.pie.label.radius;
|
||||
|
||||
for (var i = 0; i < slices.length; ++i) {
|
||||
if (slices[i].percent >= options.series.pie.label.threshold * 100) {
|
||||
if (!drawLabel(slices[i], currentAngle, i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
currentAngle += slices[i].angle;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
function drawLabel(slice, startAngle, index) {
|
||||
if (slice.data[0][1] == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// format label text
|
||||
|
||||
var lf = options.legend.labelFormatter,
|
||||
text,
|
||||
plf = options.series.pie.label.formatter;
|
||||
|
||||
if (lf) {
|
||||
text = lf(slice.label, slice);
|
||||
} else {
|
||||
text = slice.label;
|
||||
}
|
||||
|
||||
if (plf) {
|
||||
text = plf(text, slice);
|
||||
}
|
||||
|
||||
var halfAngle = (startAngle + slice.angle + startAngle) / 2;
|
||||
var x = centerLeft + Math.round(Math.cos(halfAngle) * radius);
|
||||
var y =
|
||||
centerTop +
|
||||
Math.round(Math.sin(halfAngle) * radius) *
|
||||
options.series.pie.tilt;
|
||||
|
||||
var html =
|
||||
"<span class='pieLabel' id='pieLabel" +
|
||||
index +
|
||||
"' style='position:absolute;top:" +
|
||||
y +
|
||||
"px;left:" +
|
||||
x +
|
||||
"px;'>" +
|
||||
text +
|
||||
"</span>";
|
||||
target.append(html);
|
||||
|
||||
var label = target.children("#pieLabel" + index);
|
||||
var labelTop = y - label.height() / 2;
|
||||
var labelLeft = x - label.width() / 2;
|
||||
|
||||
label.css("top", labelTop);
|
||||
label.css("left", labelLeft);
|
||||
|
||||
// check to make sure that the label is not outside the canvas
|
||||
|
||||
if (
|
||||
0 - labelTop > 0 ||
|
||||
0 - labelLeft > 0 ||
|
||||
canvasHeight - (labelTop + label.height()) < 0 ||
|
||||
canvasWidth - (labelLeft + label.width()) < 0
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (options.series.pie.label.background.opacity != 0) {
|
||||
// put in the transparent background separately to avoid blended labels and label boxes
|
||||
|
||||
var c = options.series.pie.label.background.color;
|
||||
|
||||
if (c == null) {
|
||||
c = slice.color;
|
||||
}
|
||||
|
||||
var pos = "top:" + labelTop + "px;left:" + labelLeft + "px;";
|
||||
$(
|
||||
"<div class='pieLabelBackground' style='position:absolute;width:" +
|
||||
label.width() +
|
||||
"px;height:" +
|
||||
label.height() +
|
||||
"px;" +
|
||||
pos +
|
||||
"background-color:" +
|
||||
c +
|
||||
";'></div>"
|
||||
)
|
||||
.css("opacity", options.series.pie.label.background.opacity)
|
||||
.insertBefore(label);
|
||||
}
|
||||
|
||||
return true;
|
||||
} // end individual label function
|
||||
} // end drawLabels function
|
||||
} // end drawPie function
|
||||
} // end draw function
|
||||
|
||||
// Placed here because it needs to be accessed from multiple locations
|
||||
|
||||
function drawDonutHole(layer) {
|
||||
if (options.series.pie.innerRadius > 0) {
|
||||
// subtract the center
|
||||
|
||||
layer.save();
|
||||
var innerRadius =
|
||||
options.series.pie.innerRadius > 1
|
||||
? options.series.pie.innerRadius
|
||||
: maxRadius * options.series.pie.innerRadius;
|
||||
layer.globalCompositeOperation = "destination-out"; // this does not work with excanvas, but it will fall back to using the stroke color
|
||||
layer.beginPath();
|
||||
layer.fillStyle = options.series.pie.stroke.color;
|
||||
layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
|
||||
layer.fill();
|
||||
layer.closePath();
|
||||
layer.restore();
|
||||
|
||||
// add inner stroke
|
||||
|
||||
layer.save();
|
||||
layer.beginPath();
|
||||
layer.strokeStyle = options.series.pie.stroke.color;
|
||||
layer.arc(0, 0, innerRadius, 0, Math.PI * 2, false);
|
||||
layer.stroke();
|
||||
layer.closePath();
|
||||
layer.restore();
|
||||
|
||||
// TODO: add extra shadow inside hole (with a mask) if the pie is tilted.
|
||||
}
|
||||
}
|
||||
|
||||
//-- Additional Interactive related functions --
|
||||
|
||||
function isPointInPoly(poly, pt) {
|
||||
for (var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
|
||||
((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) ||
|
||||
(poly[j][1] <= pt[1] && pt[1] < poly[i][1])) &&
|
||||
pt[0] <
|
||||
((poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1])) /
|
||||
(poly[j][1] - poly[i][1]) +
|
||||
poly[i][0] &&
|
||||
(c = !c);
|
||||
return c;
|
||||
}
|
||||
|
||||
function findNearbySlice(mouseX, mouseY) {
|
||||
var slices = plot.getData(),
|
||||
options = plot.getOptions(),
|
||||
radius =
|
||||
options.series.pie.radius > 1
|
||||
? options.series.pie.radius
|
||||
: maxRadius * options.series.pie.radius,
|
||||
x,
|
||||
y;
|
||||
|
||||
for (var i = 0; i < slices.length; ++i) {
|
||||
var s = slices[i];
|
||||
|
||||
if (s.pie.show) {
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(0, 0); // Center of the pie
|
||||
//ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here.
|
||||
ctx.arc(
|
||||
0,
|
||||
0,
|
||||
radius,
|
||||
s.startAngle,
|
||||
s.startAngle + s.angle / 2,
|
||||
false
|
||||
);
|
||||
ctx.arc(
|
||||
0,
|
||||
0,
|
||||
radius,
|
||||
s.startAngle + s.angle / 2,
|
||||
s.startAngle + s.angle,
|
||||
false
|
||||
);
|
||||
ctx.closePath();
|
||||
x = mouseX - centerLeft;
|
||||
y = mouseY - centerTop;
|
||||
|
||||
if (ctx.isPointInPath) {
|
||||
if (ctx.isPointInPath(mouseX - centerLeft, mouseY - centerTop)) {
|
||||
ctx.restore();
|
||||
return {
|
||||
datapoint: [s.percent, s.data],
|
||||
dataIndex: 0,
|
||||
series: s,
|
||||
seriesIndex: i,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// excanvas for IE doesn;t support isPointInPath, this is a workaround.
|
||||
|
||||
var p1X = radius * Math.cos(s.startAngle),
|
||||
p1Y = radius * Math.sin(s.startAngle),
|
||||
p2X = radius * Math.cos(s.startAngle + s.angle / 4),
|
||||
p2Y = radius * Math.sin(s.startAngle + s.angle / 4),
|
||||
p3X = radius * Math.cos(s.startAngle + s.angle / 2),
|
||||
p3Y = radius * Math.sin(s.startAngle + s.angle / 2),
|
||||
p4X = radius * Math.cos(s.startAngle + s.angle / 1.5),
|
||||
p4Y = radius * Math.sin(s.startAngle + s.angle / 1.5),
|
||||
p5X = radius * Math.cos(s.startAngle + s.angle),
|
||||
p5Y = radius * Math.sin(s.startAngle + s.angle),
|
||||
arrPoly = [
|
||||
[0, 0],
|
||||
[p1X, p1Y],
|
||||
[p2X, p2Y],
|
||||
[p3X, p3Y],
|
||||
[p4X, p4Y],
|
||||
[p5X, p5Y],
|
||||
],
|
||||
arrPoint = [x, y];
|
||||
|
||||
// TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt?
|
||||
|
||||
if (isPointInPoly(arrPoly, arrPoint)) {
|
||||
ctx.restore();
|
||||
return {
|
||||
datapoint: [s.percent, s.data],
|
||||
dataIndex: 0,
|
||||
series: s,
|
||||
seriesIndex: i,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ctx.restore();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function onMouseMove(e) {
|
||||
triggerClickHoverEvent("plothover", e);
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
triggerClickHoverEvent("plotclick", e);
|
||||
}
|
||||
|
||||
// trigger click or hover event (they send the same parameters so we share their code)
|
||||
|
||||
function triggerClickHoverEvent(eventname, e) {
|
||||
var offset = plot.offset();
|
||||
var canvasX = parseInt(e.pageX - offset.left);
|
||||
var canvasY = parseInt(e.pageY - offset.top);
|
||||
var item = findNearbySlice(canvasX, canvasY);
|
||||
|
||||
if (options.grid.autoHighlight) {
|
||||
// clear auto-highlights
|
||||
|
||||
for (var i = 0; i < highlights.length; ++i) {
|
||||
var h = highlights[i];
|
||||
if (h.auto == eventname && !(item && h.series == item.series)) {
|
||||
unhighlight(h.series);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// highlight the slice
|
||||
|
||||
if (item) {
|
||||
highlight(item.series, eventname);
|
||||
}
|
||||
|
||||
// trigger any hover bind events
|
||||
|
||||
var pos = { pageX: e.pageX, pageY: e.pageY };
|
||||
target.trigger(eventname, [pos, item]);
|
||||
}
|
||||
|
||||
function highlight(s, auto) {
|
||||
//if (typeof s == "number") {
|
||||
// s = series[s];
|
||||
//}
|
||||
|
||||
var i = indexOfHighlight(s);
|
||||
|
||||
if (i == -1) {
|
||||
highlights.push({ series: s, auto: auto });
|
||||
plot.triggerRedrawOverlay();
|
||||
} else if (!auto) {
|
||||
highlights[i].auto = false;
|
||||
}
|
||||
}
|
||||
|
||||
function unhighlight(s) {
|
||||
if (s == null) {
|
||||
highlights = [];
|
||||
plot.triggerRedrawOverlay();
|
||||
}
|
||||
|
||||
//if (typeof s == "number") {
|
||||
// s = series[s];
|
||||
//}
|
||||
|
||||
var i = indexOfHighlight(s);
|
||||
|
||||
if (i != -1) {
|
||||
highlights.splice(i, 1);
|
||||
plot.triggerRedrawOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
function indexOfHighlight(s) {
|
||||
for (var i = 0; i < highlights.length; ++i) {
|
||||
var h = highlights[i];
|
||||
if (h.series == s) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function drawOverlay(plot, octx) {
|
||||
var options = plot.getOptions();
|
||||
|
||||
var radius =
|
||||
options.series.pie.radius > 1
|
||||
? options.series.pie.radius
|
||||
: maxRadius * options.series.pie.radius;
|
||||
|
||||
octx.save();
|
||||
octx.translate(centerLeft, centerTop);
|
||||
octx.scale(1, options.series.pie.tilt);
|
||||
|
||||
for (var i = 0; i < highlights.length; ++i) {
|
||||
drawHighlight(highlights[i].series);
|
||||
}
|
||||
|
||||
drawDonutHole(octx);
|
||||
|
||||
octx.restore();
|
||||
|
||||
function drawHighlight(series) {
|
||||
if (series.angle <= 0 || isNaN(series.angle)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString();
|
||||
octx.fillStyle =
|
||||
"rgba(255, 255, 255, " + options.series.pie.highlight.opacity + ")"; // this is temporary until we have access to parseColor
|
||||
octx.beginPath();
|
||||
if (Math.abs(series.angle - Math.PI * 2) > 0.000000001) {
|
||||
octx.moveTo(0, 0); // Center of the pie
|
||||
}
|
||||
octx.arc(
|
||||
0,
|
||||
0,
|
||||
radius,
|
||||
series.startAngle,
|
||||
series.startAngle + series.angle / 2,
|
||||
false
|
||||
);
|
||||
octx.arc(
|
||||
0,
|
||||
0,
|
||||
radius,
|
||||
series.startAngle + series.angle / 2,
|
||||
series.startAngle + series.angle,
|
||||
false
|
||||
);
|
||||
octx.closePath();
|
||||
octx.fill();
|
||||
}
|
||||
}
|
||||
} // end init (plugin body)
|
||||
|
||||
// define pie specific options and their default values
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
pie: {
|
||||
show: false,
|
||||
radius: "auto", // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value)
|
||||
innerRadius: 0 /* for donut */,
|
||||
startAngle: 3 / 2,
|
||||
tilt: 1,
|
||||
shadow: {
|
||||
left: 5, // shadow left offset
|
||||
top: 15, // shadow top offset
|
||||
alpha: 0.02, // shadow alpha
|
||||
},
|
||||
offset: {
|
||||
top: 0,
|
||||
left: "auto",
|
||||
},
|
||||
stroke: {
|
||||
color: "#fff",
|
||||
width: 1,
|
||||
},
|
||||
label: {
|
||||
show: "auto",
|
||||
formatter: function (label, slice) {
|
||||
return (
|
||||
"<div style='font-size:x-small;text-align:center;padding:2px;color:" +
|
||||
slice.color +
|
||||
";'>" +
|
||||
label +
|
||||
"<br/>" +
|
||||
Math.round(slice.percent) +
|
||||
"%</div>"
|
||||
);
|
||||
}, // formatter function
|
||||
radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value)
|
||||
background: {
|
||||
color: null,
|
||||
opacity: 0,
|
||||
},
|
||||
threshold: 0, // percentage at which to hide the label (i.e. the slice is too narrow)
|
||||
},
|
||||
combine: {
|
||||
threshold: -1, // percentage at which to combine little slices into one larger slice
|
||||
color: null, // color to give the new slice (auto-generated if null)
|
||||
label: "Other", // label to give the new slice
|
||||
},
|
||||
highlight: {
|
||||
//color: "#fff", // will add this functionality once parseColor is available
|
||||
opacity: 0.5,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "pie",
|
||||
version: "1.1",
|
||||
});
|
||||
})(jQuery);
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
/* Flot plugin for automatically redrawing plots as the placeholder resizes.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
It works by listening for changes on the placeholder div (through the jQuery
|
||||
resize event plugin) - if the size changes, it will redraw the plot.
|
||||
|
||||
There are no options. If you need to disable the plugin for some plots, you
|
||||
can just fix the size of their placeholders.
|
||||
|
||||
*/
|
||||
|
||||
/* Inline dependency:
|
||||
* jQuery resize event - v1.1 - 3/14/2010
|
||||
* http://benalman.com/projects/jquery-resize-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
(function ($, e, t) {
|
||||
"$:nomunge";
|
||||
var i = [],
|
||||
n = ($.resize = $.extend($.resize, {})),
|
||||
a,
|
||||
r = false,
|
||||
s = "setTimeout",
|
||||
u = "resize",
|
||||
m = u + "-special-event",
|
||||
o = "pendingDelay",
|
||||
l = "activeDelay",
|
||||
f = "throttleWindow";
|
||||
n[o] = 200;
|
||||
n[l] = 20;
|
||||
n[f] = true;
|
||||
$.event.special[u] = {
|
||||
setup: function () {
|
||||
if (!n[f] && this[s]) {
|
||||
return false;
|
||||
}
|
||||
var e = $(this);
|
||||
i.push(this);
|
||||
e.data(m, { w: e.width(), h: e.height() });
|
||||
if (i.length === 1) {
|
||||
a = t;
|
||||
h();
|
||||
}
|
||||
},
|
||||
teardown: function () {
|
||||
if (!n[f] && this[s]) {
|
||||
return false;
|
||||
}
|
||||
var e = $(this);
|
||||
for (var t = i.length - 1; t >= 0; t--) {
|
||||
if (i[t] == this) {
|
||||
i.splice(t, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
e.removeData(m);
|
||||
if (!i.length) {
|
||||
if (r) {
|
||||
cancelAnimationFrame(a);
|
||||
} else {
|
||||
clearTimeout(a);
|
||||
}
|
||||
a = null;
|
||||
}
|
||||
},
|
||||
add: function (e) {
|
||||
if (!n[f] && this[s]) {
|
||||
return false;
|
||||
}
|
||||
var i;
|
||||
function a(e, n, a) {
|
||||
var r = $(this),
|
||||
s = r.data(m) || {};
|
||||
s.w = n !== t ? n : r.width();
|
||||
s.h = a !== t ? a : r.height();
|
||||
i.apply(this, arguments);
|
||||
}
|
||||
if ($.isFunction(e)) {
|
||||
i = e;
|
||||
return a;
|
||||
} else {
|
||||
i = e.handler;
|
||||
e.handler = a;
|
||||
}
|
||||
},
|
||||
};
|
||||
function h(t) {
|
||||
if (r === true) {
|
||||
r = t || 1;
|
||||
}
|
||||
for (var s = i.length - 1; s >= 0; s--) {
|
||||
var l = $(i[s]);
|
||||
if (l[0] == e || l.is(":visible")) {
|
||||
var f = l.width(),
|
||||
c = l.height(),
|
||||
d = l.data(m);
|
||||
if (d && (f !== d.w || c !== d.h)) {
|
||||
l.trigger(u, [(d.w = f), (d.h = c)]);
|
||||
r = t || true;
|
||||
}
|
||||
} else {
|
||||
d = l.data(m);
|
||||
d.w = 0;
|
||||
d.h = 0;
|
||||
}
|
||||
}
|
||||
if (a !== null) {
|
||||
if (r && (t == null || t - r < 1e3)) {
|
||||
a = e.requestAnimationFrame(h);
|
||||
} else {
|
||||
a = setTimeout(h, n[o]);
|
||||
r = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!e.requestAnimationFrame) {
|
||||
e.requestAnimationFrame = (function () {
|
||||
return (
|
||||
e.webkitRequestAnimationFrame ||
|
||||
e.mozRequestAnimationFrame ||
|
||||
e.oRequestAnimationFrame ||
|
||||
e.msRequestAnimationFrame ||
|
||||
function (t, i) {
|
||||
return e.setTimeout(function () {
|
||||
t(new Date().getTime());
|
||||
}, n[l]);
|
||||
}
|
||||
);
|
||||
})();
|
||||
}
|
||||
if (!e.cancelAnimationFrame) {
|
||||
e.cancelAnimationFrame = (function () {
|
||||
return (
|
||||
e.webkitCancelRequestAnimationFrame ||
|
||||
e.mozCancelRequestAnimationFrame ||
|
||||
e.oCancelRequestAnimationFrame ||
|
||||
e.msCancelRequestAnimationFrame ||
|
||||
clearTimeout
|
||||
);
|
||||
})();
|
||||
}
|
||||
})(jQuery, this);
|
||||
|
||||
(function ($) {
|
||||
var options = {}; // no options
|
||||
|
||||
function init(plot) {
|
||||
function onResize() {
|
||||
var placeholder = plot.getPlaceholder();
|
||||
|
||||
// somebody might have hidden us and we can't plot
|
||||
// when we don't have the dimensions
|
||||
if (placeholder.width() == 0 || placeholder.height() == 0) return;
|
||||
|
||||
plot.resize();
|
||||
plot.setupGrid();
|
||||
plot.draw();
|
||||
}
|
||||
|
||||
function bindEvents(plot, eventHolder) {
|
||||
plot.getPlaceholder().resize(onResize);
|
||||
}
|
||||
|
||||
function shutdown(plot, eventHolder) {
|
||||
plot.getPlaceholder().unbind("resize", onResize);
|
||||
}
|
||||
|
||||
plot.hooks.bindEvents.push(bindEvents);
|
||||
plot.hooks.shutdown.push(shutdown);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "resize",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+375
@@ -0,0 +1,375 @@
|
||||
/* Flot plugin for selecting regions of a plot.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
selection: {
|
||||
mode: null or "x" or "y" or "xy",
|
||||
color: color,
|
||||
shape: "round" or "miter" or "bevel",
|
||||
minSize: number of pixels
|
||||
}
|
||||
|
||||
Selection support is enabled by setting the mode to one of "x", "y" or "xy".
|
||||
In "x" mode, the user will only be able to specify the x range, similarly for
|
||||
"y" mode. For "xy", the selection becomes a rectangle where both ranges can be
|
||||
specified. "color" is color of the selection (if you need to change the color
|
||||
later on, you can get to it with plot.getOptions().selection.color). "shape"
|
||||
is the shape of the corners of the selection.
|
||||
|
||||
"minSize" is the minimum size a selection can be in pixels. This value can
|
||||
be customized to determine the smallest size a selection can be and still
|
||||
have the selection rectangle be displayed. When customizing this value, the
|
||||
fact that it refers to pixels, not axis units must be taken into account.
|
||||
Thus, for example, if there is a bar graph in time mode with BarWidth set to 1
|
||||
minute, setting "minSize" to 1 will not make the minimum selection size 1
|
||||
minute, but rather 1 pixel. Note also that setting "minSize" to 0 will prevent
|
||||
"plotunselected" events from being fired when the user clicks the mouse without
|
||||
dragging.
|
||||
|
||||
When selection support is enabled, a "plotselected" event will be emitted on
|
||||
the DOM element you passed into the plot function. The event handler gets a
|
||||
parameter with the ranges selected on the axes, like this:
|
||||
|
||||
placeholder.bind( "plotselected", function( event, ranges ) {
|
||||
alert("You selected " + ranges.xaxis.from + " to " + ranges.xaxis.to)
|
||||
// similar for yaxis - with multiple axes, the extra ones are in
|
||||
// x2axis, x3axis, ...
|
||||
});
|
||||
|
||||
The "plotselected" event is only fired when the user has finished making the
|
||||
selection. A "plotselecting" event is fired during the process with the same
|
||||
parameters as the "plotselected" event, in case you want to know what's
|
||||
happening while it's happening,
|
||||
|
||||
A "plotunselected" event with no arguments is emitted when the user clicks the
|
||||
mouse to remove the selection. As stated above, setting "minSize" to 0 will
|
||||
destroy this behavior.
|
||||
|
||||
The plugin allso adds the following methods to the plot object:
|
||||
|
||||
- setSelection( ranges, preventEvent )
|
||||
|
||||
Set the selection rectangle. The passed in ranges is on the same form as
|
||||
returned in the "plotselected" event. If the selection mode is "x", you
|
||||
should put in either an xaxis range, if the mode is "y" you need to put in
|
||||
an yaxis range and both xaxis and yaxis if the selection mode is "xy", like
|
||||
this:
|
||||
|
||||
setSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });
|
||||
|
||||
setSelection will trigger the "plotselected" event when called. If you don't
|
||||
want that to happen, e.g. if you're inside a "plotselected" handler, pass
|
||||
true as the second parameter. If you are using multiple axes, you can
|
||||
specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of
|
||||
xaxis, the plugin picks the first one it sees.
|
||||
|
||||
- clearSelection( preventEvent )
|
||||
|
||||
Clear the selection rectangle. Pass in true to avoid getting a
|
||||
"plotunselected" event.
|
||||
|
||||
- getSelection()
|
||||
|
||||
Returns the current selection in the same format as the "plotselected"
|
||||
event. If there's currently no selection, the function returns null.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
function init(plot) {
|
||||
var selection = {
|
||||
first: { x: -1, y: -1 },
|
||||
second: { x: -1, y: -1 },
|
||||
show: false,
|
||||
active: false,
|
||||
};
|
||||
|
||||
// FIXME: The drag handling implemented here should be
|
||||
// abstracted out, there's some similar code from a library in
|
||||
// the navigation plugin, this should be massaged a bit to fit
|
||||
// the Flot cases here better and reused. Doing this would
|
||||
// make this plugin much slimmer.
|
||||
var savedhandlers = {};
|
||||
|
||||
var mouseUpHandler = null;
|
||||
|
||||
function onMouseMove(e) {
|
||||
if (selection.active) {
|
||||
updateSelection(e);
|
||||
|
||||
plot.getPlaceholder().trigger("plotselecting", [getSelection()]);
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseDown(e) {
|
||||
if (e.which != 1)
|
||||
// only accept left-click
|
||||
return;
|
||||
|
||||
// cancel out any text selections
|
||||
document.body.focus();
|
||||
|
||||
// prevent text selection and drag in old-school browsers
|
||||
if (
|
||||
document.onselectstart !== undefined &&
|
||||
savedhandlers.onselectstart == null
|
||||
) {
|
||||
savedhandlers.onselectstart = document.onselectstart;
|
||||
document.onselectstart = function () {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
if (document.ondrag !== undefined && savedhandlers.ondrag == null) {
|
||||
savedhandlers.ondrag = document.ondrag;
|
||||
document.ondrag = function () {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
setSelectionPos(selection.first, e);
|
||||
|
||||
selection.active = true;
|
||||
|
||||
// this is a bit silly, but we have to use a closure to be
|
||||
// able to whack the same handler again
|
||||
mouseUpHandler = function (e) {
|
||||
onMouseUp(e);
|
||||
};
|
||||
|
||||
$(document).one("mouseup", mouseUpHandler);
|
||||
}
|
||||
|
||||
function onMouseUp(e) {
|
||||
mouseUpHandler = null;
|
||||
|
||||
// revert drag stuff for old-school browsers
|
||||
if (document.onselectstart !== undefined)
|
||||
document.onselectstart = savedhandlers.onselectstart;
|
||||
if (document.ondrag !== undefined) document.ondrag = savedhandlers.ondrag;
|
||||
|
||||
// no more dragging
|
||||
selection.active = false;
|
||||
updateSelection(e);
|
||||
|
||||
if (selectionIsSane()) triggerSelectedEvent();
|
||||
else {
|
||||
// this counts as a clear
|
||||
plot.getPlaceholder().trigger("plotunselected", []);
|
||||
plot.getPlaceholder().trigger("plotselecting", [null]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getSelection() {
|
||||
if (!selectionIsSane()) return null;
|
||||
|
||||
if (!selection.show) return null;
|
||||
|
||||
var r = {},
|
||||
c1 = selection.first,
|
||||
c2 = selection.second;
|
||||
$.each(plot.getAxes(), function (name, axis) {
|
||||
if (axis.used) {
|
||||
var p1 = axis.c2p(c1[axis.direction]),
|
||||
p2 = axis.c2p(c2[axis.direction]);
|
||||
r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };
|
||||
}
|
||||
});
|
||||
return r;
|
||||
}
|
||||
|
||||
function triggerSelectedEvent() {
|
||||
var r = getSelection();
|
||||
|
||||
plot.getPlaceholder().trigger("plotselected", [r]);
|
||||
|
||||
// backwards-compat stuff, to be removed in future
|
||||
if (r.xaxis && r.yaxis)
|
||||
plot.getPlaceholder().trigger("selected", [
|
||||
{
|
||||
x1: r.xaxis.from,
|
||||
y1: r.yaxis.from,
|
||||
x2: r.xaxis.to,
|
||||
y2: r.yaxis.to,
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
function clamp(min, value, max) {
|
||||
return value < min ? min : value > max ? max : value;
|
||||
}
|
||||
|
||||
function setSelectionPos(pos, e) {
|
||||
var o = plot.getOptions();
|
||||
var offset = plot.getPlaceholder().offset();
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());
|
||||
pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());
|
||||
|
||||
if (o.selection.mode == "y")
|
||||
pos.x = pos == selection.first ? 0 : plot.width();
|
||||
|
||||
if (o.selection.mode == "x")
|
||||
pos.y = pos == selection.first ? 0 : plot.height();
|
||||
}
|
||||
|
||||
function updateSelection(pos) {
|
||||
if (pos.pageX == null) return;
|
||||
|
||||
setSelectionPos(selection.second, pos);
|
||||
if (selectionIsSane()) {
|
||||
selection.show = true;
|
||||
plot.triggerRedrawOverlay();
|
||||
} else clearSelection(true);
|
||||
}
|
||||
|
||||
function clearSelection(preventEvent) {
|
||||
if (selection.show) {
|
||||
selection.show = false;
|
||||
plot.triggerRedrawOverlay();
|
||||
if (!preventEvent) plot.getPlaceholder().trigger("plotunselected", []);
|
||||
}
|
||||
}
|
||||
|
||||
// function taken from markings support in Flot
|
||||
function extractRange(ranges, coord) {
|
||||
var axis,
|
||||
from,
|
||||
to,
|
||||
key,
|
||||
axes = plot.getAxes();
|
||||
|
||||
for (var k in axes) {
|
||||
axis = axes[k];
|
||||
if (axis.direction == coord) {
|
||||
key = coord + axis.n + "axis";
|
||||
if (!ranges[key] && axis.n == 1) key = coord + "axis"; // support x1axis as xaxis
|
||||
if (ranges[key]) {
|
||||
from = ranges[key].from;
|
||||
to = ranges[key].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// backwards-compat stuff - to be removed in future
|
||||
if (!ranges[key]) {
|
||||
axis = coord == "x" ? plot.getXAxes()[0] : plot.getYAxes()[0];
|
||||
from = ranges[coord + "1"];
|
||||
to = ranges[coord + "2"];
|
||||
}
|
||||
|
||||
// auto-reverse as an added bonus
|
||||
if (from != null && to != null && from > to) {
|
||||
var tmp = from;
|
||||
from = to;
|
||||
to = tmp;
|
||||
}
|
||||
|
||||
return { from: from, to: to, axis: axis };
|
||||
}
|
||||
|
||||
function setSelection(ranges, preventEvent) {
|
||||
var axis,
|
||||
range,
|
||||
o = plot.getOptions();
|
||||
|
||||
if (o.selection.mode == "y") {
|
||||
selection.first.x = 0;
|
||||
selection.second.x = plot.width();
|
||||
} else {
|
||||
range = extractRange(ranges, "x");
|
||||
|
||||
selection.first.x = range.axis.p2c(range.from);
|
||||
selection.second.x = range.axis.p2c(range.to);
|
||||
}
|
||||
|
||||
if (o.selection.mode == "x") {
|
||||
selection.first.y = 0;
|
||||
selection.second.y = plot.height();
|
||||
} else {
|
||||
range = extractRange(ranges, "y");
|
||||
|
||||
selection.first.y = range.axis.p2c(range.from);
|
||||
selection.second.y = range.axis.p2c(range.to);
|
||||
}
|
||||
|
||||
selection.show = true;
|
||||
plot.triggerRedrawOverlay();
|
||||
if (!preventEvent && selectionIsSane()) triggerSelectedEvent();
|
||||
}
|
||||
|
||||
function selectionIsSane() {
|
||||
var minSize = plot.getOptions().selection.minSize;
|
||||
return (
|
||||
Math.abs(selection.second.x - selection.first.x) >= minSize &&
|
||||
Math.abs(selection.second.y - selection.first.y) >= minSize
|
||||
);
|
||||
}
|
||||
|
||||
plot.clearSelection = clearSelection;
|
||||
plot.setSelection = setSelection;
|
||||
plot.getSelection = getSelection;
|
||||
|
||||
plot.hooks.bindEvents.push(function (plot, eventHolder) {
|
||||
var o = plot.getOptions();
|
||||
if (o.selection.mode != null) {
|
||||
eventHolder.mousemove(onMouseMove);
|
||||
eventHolder.mousedown(onMouseDown);
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.drawOverlay.push(function (plot, ctx) {
|
||||
// draw selection
|
||||
if (selection.show && selectionIsSane()) {
|
||||
var plotOffset = plot.getPlotOffset();
|
||||
var o = plot.getOptions();
|
||||
|
||||
ctx.save();
|
||||
ctx.translate(plotOffset.left, plotOffset.top);
|
||||
|
||||
var c = $.color.parse(o.selection.color);
|
||||
|
||||
ctx.strokeStyle = c.scale("a", 0.8).toString();
|
||||
ctx.lineWidth = 1;
|
||||
ctx.lineJoin = o.selection.shape;
|
||||
ctx.fillStyle = c.scale("a", 0.4).toString();
|
||||
|
||||
var x = Math.min(selection.first.x, selection.second.x) + 0.5,
|
||||
y = Math.min(selection.first.y, selection.second.y) + 0.5,
|
||||
w = Math.abs(selection.second.x - selection.first.x) - 1,
|
||||
h = Math.abs(selection.second.y - selection.first.y) - 1;
|
||||
|
||||
ctx.fillRect(x, y, w, h);
|
||||
ctx.strokeRect(x, y, w, h);
|
||||
|
||||
ctx.restore();
|
||||
}
|
||||
});
|
||||
|
||||
plot.hooks.shutdown.push(function (plot, eventHolder) {
|
||||
eventHolder.unbind("mousemove", onMouseMove);
|
||||
eventHolder.unbind("mousedown", onMouseDown);
|
||||
|
||||
if (mouseUpHandler) $(document).unbind("mouseup", mouseUpHandler);
|
||||
});
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: {
|
||||
selection: {
|
||||
mode: null, // one of null, "x", "y" or "xy"
|
||||
color: "#e8cfac",
|
||||
shape: "round", // one of "round", "miter", or "bevel"
|
||||
minSize: 5, // minimum number of pixels
|
||||
},
|
||||
},
|
||||
name: "selection",
|
||||
version: "1.1",
|
||||
});
|
||||
})(jQuery);
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
/* Flot plugin for stacking data sets rather than overlyaing them.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The plugin assumes the data is sorted on x (or y if stacking horizontally).
|
||||
For line charts, it is assumed that if a line has an undefined gap (from a
|
||||
null point), then the line above it should have the same gap - insert zeros
|
||||
instead of "null" if you want another behaviour. This also holds for the start
|
||||
and end of the chart. Note that stacking a mix of positive and negative values
|
||||
in most instances doesn't make sense (so it looks weird).
|
||||
|
||||
Two or more series are stacked when their "stack" attribute is set to the same
|
||||
key (which can be any number or string or just "true"). To specify the default
|
||||
stack, you can set the stack option like this:
|
||||
|
||||
series: {
|
||||
stack: null/false, true, or a key (number/string)
|
||||
}
|
||||
|
||||
You can also specify it for a single series, like this:
|
||||
|
||||
$.plot( $("#placeholder"), [{
|
||||
data: [ ... ],
|
||||
stack: true
|
||||
}])
|
||||
|
||||
The stacking order is determined by the order of the data series in the array
|
||||
(later series end up on top of the previous).
|
||||
|
||||
Internally, the plugin modifies the datapoints in each series, adding an
|
||||
offset to the y value. For line series, extra data points are inserted through
|
||||
interpolation. If there's a second y value, it's also adjusted (e.g for bar
|
||||
charts or filled areas).
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
series: { stack: null }, // or number/string
|
||||
};
|
||||
|
||||
function init(plot) {
|
||||
function findMatchingSeries(s, allseries) {
|
||||
var res = null;
|
||||
for (var i = 0; i < allseries.length; ++i) {
|
||||
if (s == allseries[i]) break;
|
||||
|
||||
if (allseries[i].stack == s.stack) res = allseries[i];
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
function stackData(plot, s, datapoints) {
|
||||
if (s.stack == null || s.stack === false) return;
|
||||
|
||||
var other = findMatchingSeries(s, plot.getData());
|
||||
if (!other) return;
|
||||
|
||||
var ps = datapoints.pointsize,
|
||||
points = datapoints.points,
|
||||
otherps = other.datapoints.pointsize,
|
||||
otherpoints = other.datapoints.points,
|
||||
newpoints = [],
|
||||
px,
|
||||
py,
|
||||
intery,
|
||||
qx,
|
||||
qy,
|
||||
bottom,
|
||||
withlines = s.lines.show,
|
||||
horizontal = s.bars.horizontal,
|
||||
withbottom =
|
||||
ps > 2 &&
|
||||
(horizontal ? datapoints.format[2].x : datapoints.format[2].y),
|
||||
withsteps = withlines && s.lines.steps,
|
||||
fromgap = true,
|
||||
keyOffset = horizontal ? 1 : 0,
|
||||
accumulateOffset = horizontal ? 0 : 1,
|
||||
i = 0,
|
||||
j = 0,
|
||||
l,
|
||||
m;
|
||||
|
||||
while (true) {
|
||||
if (i >= points.length) break;
|
||||
|
||||
l = newpoints.length;
|
||||
|
||||
if (points[i] == null) {
|
||||
// copy gaps
|
||||
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
||||
i += ps;
|
||||
} else if (j >= otherpoints.length) {
|
||||
// for lines, we can't use the rest of the points
|
||||
if (!withlines) {
|
||||
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
||||
}
|
||||
i += ps;
|
||||
} else if (otherpoints[j] == null) {
|
||||
// oops, got a gap
|
||||
for (m = 0; m < ps; ++m) newpoints.push(null);
|
||||
fromgap = true;
|
||||
j += otherps;
|
||||
} else {
|
||||
// cases where we actually got two points
|
||||
px = points[i + keyOffset];
|
||||
py = points[i + accumulateOffset];
|
||||
qx = otherpoints[j + keyOffset];
|
||||
qy = otherpoints[j + accumulateOffset];
|
||||
bottom = 0;
|
||||
|
||||
if (px == qx) {
|
||||
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
||||
|
||||
newpoints[l + accumulateOffset] += qy;
|
||||
bottom = qy;
|
||||
|
||||
i += ps;
|
||||
j += otherps;
|
||||
} else if (px > qx) {
|
||||
// we got past point below, might need to
|
||||
// insert interpolated extra point
|
||||
if (withlines && i > 0 && points[i - ps] != null) {
|
||||
intery =
|
||||
py +
|
||||
((points[i - ps + accumulateOffset] - py) * (qx - px)) /
|
||||
(points[i - ps + keyOffset] - px);
|
||||
newpoints.push(qx);
|
||||
newpoints.push(intery + qy);
|
||||
for (m = 2; m < ps; ++m) newpoints.push(points[i + m]);
|
||||
bottom = qy;
|
||||
}
|
||||
|
||||
j += otherps;
|
||||
} else {
|
||||
// px < qx
|
||||
if (fromgap && withlines) {
|
||||
// if we come from a gap, we just skip this point
|
||||
i += ps;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
|
||||
|
||||
// we might be able to interpolate a point below,
|
||||
// this can give us a better y
|
||||
if (withlines && j > 0 && otherpoints[j - otherps] != null)
|
||||
bottom =
|
||||
qy +
|
||||
((otherpoints[j - otherps + accumulateOffset] - qy) *
|
||||
(px - qx)) /
|
||||
(otherpoints[j - otherps + keyOffset] - qx);
|
||||
|
||||
newpoints[l + accumulateOffset] += bottom;
|
||||
|
||||
i += ps;
|
||||
}
|
||||
|
||||
fromgap = false;
|
||||
|
||||
if (l != newpoints.length && withbottom) newpoints[l + 2] += bottom;
|
||||
}
|
||||
|
||||
// maintain the line steps invariant
|
||||
if (
|
||||
withsteps &&
|
||||
l != newpoints.length &&
|
||||
l > 0 &&
|
||||
newpoints[l] != null &&
|
||||
newpoints[l] != newpoints[l - ps] &&
|
||||
newpoints[l + 1] != newpoints[l - ps + 1]
|
||||
) {
|
||||
for (m = 0; m < ps; ++m) newpoints[l + ps + m] = newpoints[l + m];
|
||||
newpoints[l + 1] = newpoints[l - ps + 1];
|
||||
}
|
||||
}
|
||||
|
||||
datapoints.points = newpoints;
|
||||
}
|
||||
|
||||
plot.hooks.processDatapoints.push(stackData);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "stack",
|
||||
version: "1.2",
|
||||
});
|
||||
})(jQuery);
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/* Flot plugin that adds some extra symbols for plotting points.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The symbols are accessed as strings through the standard symbol options:
|
||||
|
||||
series: {
|
||||
points: {
|
||||
symbol: "square" // or "diamond", "triangle", "cross"
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
function processRawData(plot, series, datapoints) {
|
||||
// we normalize the area of each symbol so it is approximately the
|
||||
// same as a circle of the given radius
|
||||
|
||||
var handlers = {
|
||||
square: function (ctx, x, y, radius, shadow) {
|
||||
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
|
||||
var size = (radius * Math.sqrt(Math.PI)) / 2;
|
||||
ctx.rect(x - size, y - size, size + size, size + size);
|
||||
},
|
||||
diamond: function (ctx, x, y, radius, shadow) {
|
||||
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
|
||||
var size = radius * Math.sqrt(Math.PI / 2);
|
||||
ctx.moveTo(x - size, y);
|
||||
ctx.lineTo(x, y - size);
|
||||
ctx.lineTo(x + size, y);
|
||||
ctx.lineTo(x, y + size);
|
||||
ctx.lineTo(x - size, y);
|
||||
},
|
||||
triangle: function (ctx, x, y, radius, shadow) {
|
||||
// pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3))
|
||||
var size = radius * Math.sqrt((2 * Math.PI) / Math.sin(Math.PI / 3));
|
||||
var height = size * Math.sin(Math.PI / 3);
|
||||
ctx.moveTo(x - size / 2, y + height / 2);
|
||||
ctx.lineTo(x + size / 2, y + height / 2);
|
||||
if (!shadow) {
|
||||
ctx.lineTo(x, y - height / 2);
|
||||
ctx.lineTo(x - size / 2, y + height / 2);
|
||||
}
|
||||
},
|
||||
cross: function (ctx, x, y, radius, shadow) {
|
||||
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
|
||||
var size = (radius * Math.sqrt(Math.PI)) / 2;
|
||||
ctx.moveTo(x - size, y - size);
|
||||
ctx.lineTo(x + size, y + size);
|
||||
ctx.moveTo(x - size, y + size);
|
||||
ctx.lineTo(x + size, y - size);
|
||||
},
|
||||
};
|
||||
|
||||
var s = series.points.symbol;
|
||||
if (handlers[s]) series.points.symbol = handlers[s];
|
||||
}
|
||||
|
||||
function init(plot) {
|
||||
plot.hooks.processDatapoints.push(processRawData);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
name: "symbols",
|
||||
version: "1.0",
|
||||
});
|
||||
})(jQuery);
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
/* Flot plugin for thresholding data.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
The plugin supports these options:
|
||||
|
||||
series: {
|
||||
threshold: {
|
||||
below: number
|
||||
color: colorspec
|
||||
}
|
||||
}
|
||||
|
||||
It can also be applied to a single series, like this:
|
||||
|
||||
$.plot( $("#placeholder"), [{
|
||||
data: [ ... ],
|
||||
threshold: { ... }
|
||||
}])
|
||||
|
||||
An array can be passed for multiple thresholding, like this:
|
||||
|
||||
threshold: [{
|
||||
below: number1
|
||||
color: color1
|
||||
},{
|
||||
below: number2
|
||||
color: color2
|
||||
}]
|
||||
|
||||
These multiple threshold objects can be passed in any order since they are
|
||||
sorted by the processing function.
|
||||
|
||||
The data points below "below" are drawn with the specified color. This makes
|
||||
it easy to mark points below 0, e.g. for budget data.
|
||||
|
||||
Internally, the plugin works by splitting the data into two series, above and
|
||||
below the threshold. The extra series below the threshold will have its label
|
||||
cleared and the special "originSeries" attribute set to the original series.
|
||||
You may need to check for this in hover events.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
series: { threshold: null }, // or { below: number, color: color spec}
|
||||
};
|
||||
|
||||
function init(plot) {
|
||||
function thresholdData(plot, s, datapoints, below, color) {
|
||||
var ps = datapoints.pointsize,
|
||||
i,
|
||||
x,
|
||||
y,
|
||||
p,
|
||||
prevp,
|
||||
thresholded = $.extend({}, s); // note: shallow copy
|
||||
|
||||
thresholded.datapoints = {
|
||||
points: [],
|
||||
pointsize: ps,
|
||||
format: datapoints.format,
|
||||
};
|
||||
thresholded.label = null;
|
||||
thresholded.color = color;
|
||||
thresholded.threshold = null;
|
||||
thresholded.originSeries = s;
|
||||
thresholded.data = [];
|
||||
|
||||
var origpoints = datapoints.points,
|
||||
addCrossingPoints = s.lines.show;
|
||||
|
||||
var threspoints = [];
|
||||
var newpoints = [];
|
||||
var m;
|
||||
|
||||
for (i = 0; i < origpoints.length; i += ps) {
|
||||
x = origpoints[i];
|
||||
y = origpoints[i + 1];
|
||||
|
||||
prevp = p;
|
||||
if (y < below) p = threspoints;
|
||||
else p = newpoints;
|
||||
|
||||
if (
|
||||
addCrossingPoints &&
|
||||
prevp != p &&
|
||||
x != null &&
|
||||
i > 0 &&
|
||||
origpoints[i - ps] != null
|
||||
) {
|
||||
var interx =
|
||||
x +
|
||||
((below - y) * (x - origpoints[i - ps])) /
|
||||
(y - origpoints[i - ps + 1]);
|
||||
prevp.push(interx);
|
||||
prevp.push(below);
|
||||
for (m = 2; m < ps; ++m) prevp.push(origpoints[i + m]);
|
||||
|
||||
p.push(null); // start new segment
|
||||
p.push(null);
|
||||
for (m = 2; m < ps; ++m) p.push(origpoints[i + m]);
|
||||
p.push(interx);
|
||||
p.push(below);
|
||||
for (m = 2; m < ps; ++m) p.push(origpoints[i + m]);
|
||||
}
|
||||
|
||||
p.push(x);
|
||||
p.push(y);
|
||||
for (m = 2; m < ps; ++m) p.push(origpoints[i + m]);
|
||||
}
|
||||
|
||||
datapoints.points = newpoints;
|
||||
thresholded.datapoints.points = threspoints;
|
||||
|
||||
if (thresholded.datapoints.points.length > 0) {
|
||||
var origIndex = $.inArray(s, plot.getData());
|
||||
// Insert newly-generated series right after original one (to prevent it from becoming top-most)
|
||||
plot.getData().splice(origIndex + 1, 0, thresholded);
|
||||
}
|
||||
|
||||
// FIXME: there are probably some edge cases left in bars
|
||||
}
|
||||
|
||||
function processThresholds(plot, s, datapoints) {
|
||||
if (!s.threshold) return;
|
||||
|
||||
if (s.threshold instanceof Array) {
|
||||
s.threshold.sort(function (a, b) {
|
||||
return a.below - b.below;
|
||||
});
|
||||
|
||||
$(s.threshold).each(function (i, th) {
|
||||
thresholdData(plot, s, datapoints, th.below, th.color);
|
||||
});
|
||||
} else {
|
||||
thresholdData(
|
||||
plot,
|
||||
s,
|
||||
datapoints,
|
||||
s.threshold.below,
|
||||
s.threshold.color
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
plot.hooks.processDatapoints.push(processThresholds);
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "threshold",
|
||||
version: "1.2",
|
||||
});
|
||||
})(jQuery);
|
||||
+515
@@ -0,0 +1,515 @@
|
||||
/* Pretty handling of time axes.
|
||||
|
||||
Copyright (c) 2007-2014 IOLA and Ole Laursen.
|
||||
Licensed under the MIT license.
|
||||
|
||||
Set axis.mode to "time" to enable. See the section "Time series data" in
|
||||
API.txt for details.
|
||||
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var options = {
|
||||
xaxis: {
|
||||
timezone: null, // "browser" for local to the client or timezone for timezone-js
|
||||
timeformat: null, // format string to use
|
||||
twelveHourClock: false, // 12 or 24 time in time mode
|
||||
monthNames: null, // list of names of months
|
||||
},
|
||||
};
|
||||
|
||||
// round to nearby lower multiple of base
|
||||
|
||||
function floorInBase(n, base) {
|
||||
return base * Math.floor(n / base);
|
||||
}
|
||||
|
||||
// Returns a string with the date d formatted according to fmt.
|
||||
// A subset of the Open Group's strftime format is supported.
|
||||
|
||||
function formatDate(d, fmt, monthNames, dayNames) {
|
||||
if (typeof d.strftime == "function") {
|
||||
return d.strftime(fmt);
|
||||
}
|
||||
|
||||
var leftPad = function (n, pad) {
|
||||
n = "" + n;
|
||||
pad = "" + (pad == null ? "0" : pad);
|
||||
return n.length == 1 ? pad + n : n;
|
||||
};
|
||||
|
||||
var r = [];
|
||||
var escape = false;
|
||||
var hours = d.getHours();
|
||||
var isAM = hours < 12;
|
||||
|
||||
if (monthNames == null) {
|
||||
monthNames = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
];
|
||||
}
|
||||
|
||||
if (dayNames == null) {
|
||||
dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
||||
}
|
||||
|
||||
var hours12;
|
||||
|
||||
if (hours > 12) {
|
||||
hours12 = hours - 12;
|
||||
} else if (hours == 0) {
|
||||
hours12 = 12;
|
||||
} else {
|
||||
hours12 = hours;
|
||||
}
|
||||
|
||||
for (var i = 0; i < fmt.length; ++i) {
|
||||
var c = fmt.charAt(i);
|
||||
|
||||
if (escape) {
|
||||
switch (c) {
|
||||
case "a":
|
||||
c = "" + dayNames[d.getDay()];
|
||||
break;
|
||||
case "b":
|
||||
c = "" + monthNames[d.getMonth()];
|
||||
break;
|
||||
case "d":
|
||||
c = leftPad(d.getDate());
|
||||
break;
|
||||
case "e":
|
||||
c = leftPad(d.getDate(), " ");
|
||||
break;
|
||||
case "h": // For back-compat with 0.7; remove in 1.0
|
||||
case "H":
|
||||
c = leftPad(hours);
|
||||
break;
|
||||
case "I":
|
||||
c = leftPad(hours12);
|
||||
break;
|
||||
case "l":
|
||||
c = leftPad(hours12, " ");
|
||||
break;
|
||||
case "m":
|
||||
c = leftPad(d.getMonth() + 1);
|
||||
break;
|
||||
case "M":
|
||||
c = leftPad(d.getMinutes());
|
||||
break;
|
||||
// quarters not in Open Group's strftime specification
|
||||
case "q":
|
||||
c = "" + (Math.floor(d.getMonth() / 3) + 1);
|
||||
break;
|
||||
case "S":
|
||||
c = leftPad(d.getSeconds());
|
||||
break;
|
||||
case "y":
|
||||
c = leftPad(d.getFullYear() % 100);
|
||||
break;
|
||||
case "Y":
|
||||
c = "" + d.getFullYear();
|
||||
break;
|
||||
case "p":
|
||||
c = isAM ? "" + "am" : "" + "pm";
|
||||
break;
|
||||
case "P":
|
||||
c = isAM ? "" + "AM" : "" + "PM";
|
||||
break;
|
||||
case "w":
|
||||
c = "" + d.getDay();
|
||||
break;
|
||||
}
|
||||
r.push(c);
|
||||
escape = false;
|
||||
} else {
|
||||
if (c == "%") {
|
||||
escape = true;
|
||||
} else {
|
||||
r.push(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return r.join("");
|
||||
}
|
||||
|
||||
// To have a consistent view of time-based data independent of which time
|
||||
// zone the client happens to be in we need a date-like object independent
|
||||
// of time zones. This is done through a wrapper that only calls the UTC
|
||||
// versions of the accessor methods.
|
||||
|
||||
function makeUtcWrapper(d) {
|
||||
function addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {
|
||||
sourceObj[sourceMethod] = function () {
|
||||
return targetObj[targetMethod].apply(targetObj, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
var utc = {
|
||||
date: d,
|
||||
};
|
||||
|
||||
// support strftime, if found
|
||||
|
||||
if (d.strftime != undefined) {
|
||||
addProxyMethod(utc, "strftime", d, "strftime");
|
||||
}
|
||||
|
||||
addProxyMethod(utc, "getTime", d, "getTime");
|
||||
addProxyMethod(utc, "setTime", d, "setTime");
|
||||
|
||||
var props = [
|
||||
"Date",
|
||||
"Day",
|
||||
"FullYear",
|
||||
"Hours",
|
||||
"Milliseconds",
|
||||
"Minutes",
|
||||
"Month",
|
||||
"Seconds",
|
||||
];
|
||||
|
||||
for (var p = 0; p < props.length; p++) {
|
||||
addProxyMethod(utc, "get" + props[p], d, "getUTC" + props[p]);
|
||||
addProxyMethod(utc, "set" + props[p], d, "setUTC" + props[p]);
|
||||
}
|
||||
|
||||
return utc;
|
||||
}
|
||||
|
||||
// select time zone strategy. This returns a date-like object tied to the
|
||||
// desired timezone
|
||||
|
||||
function dateGenerator(ts, opts) {
|
||||
if (opts.timezone == "browser") {
|
||||
return new Date(ts);
|
||||
} else if (!opts.timezone || opts.timezone == "utc") {
|
||||
return makeUtcWrapper(new Date(ts));
|
||||
} else if (
|
||||
typeof timezoneJS != "undefined" &&
|
||||
typeof timezoneJS.Date != "undefined"
|
||||
) {
|
||||
var d = new timezoneJS.Date();
|
||||
// timezone-js is fickle, so be sure to set the time zone before
|
||||
// setting the time.
|
||||
d.setTimezone(opts.timezone);
|
||||
d.setTime(ts);
|
||||
return d;
|
||||
} else {
|
||||
return makeUtcWrapper(new Date(ts));
|
||||
}
|
||||
}
|
||||
|
||||
// map of app. size of time units in milliseconds
|
||||
|
||||
var timeUnitSize = {
|
||||
second: 1000,
|
||||
minute: 60 * 1000,
|
||||
hour: 60 * 60 * 1000,
|
||||
day: 24 * 60 * 60 * 1000,
|
||||
month: 30 * 24 * 60 * 60 * 1000,
|
||||
quarter: 3 * 30 * 24 * 60 * 60 * 1000,
|
||||
year: 365.2425 * 24 * 60 * 60 * 1000,
|
||||
};
|
||||
|
||||
// the allowed tick sizes, after 1 year we use
|
||||
// an integer algorithm
|
||||
|
||||
var baseSpec = [
|
||||
[1, "second"],
|
||||
[2, "second"],
|
||||
[5, "second"],
|
||||
[10, "second"],
|
||||
[30, "second"],
|
||||
[1, "minute"],
|
||||
[2, "minute"],
|
||||
[5, "minute"],
|
||||
[10, "minute"],
|
||||
[30, "minute"],
|
||||
[1, "hour"],
|
||||
[2, "hour"],
|
||||
[4, "hour"],
|
||||
[8, "hour"],
|
||||
[12, "hour"],
|
||||
[1, "day"],
|
||||
[2, "day"],
|
||||
[3, "day"],
|
||||
[0.25, "month"],
|
||||
[0.5, "month"],
|
||||
[1, "month"],
|
||||
[2, "month"],
|
||||
];
|
||||
|
||||
// we don't know which variant(s) we'll need yet, but generating both is
|
||||
// cheap
|
||||
|
||||
var specMonths = baseSpec.concat([
|
||||
[3, "month"],
|
||||
[6, "month"],
|
||||
[1, "year"],
|
||||
]);
|
||||
var specQuarters = baseSpec.concat([
|
||||
[1, "quarter"],
|
||||
[2, "quarter"],
|
||||
[1, "year"],
|
||||
]);
|
||||
|
||||
function init(plot) {
|
||||
plot.hooks.processOptions.push(function (plot, options) {
|
||||
$.each(plot.getAxes(), function (axisName, axis) {
|
||||
var opts = axis.options;
|
||||
|
||||
if (opts.mode == "time") {
|
||||
axis.tickGenerator = function (axis) {
|
||||
var ticks = [];
|
||||
var d = dateGenerator(axis.min, opts);
|
||||
var minSize = 0;
|
||||
|
||||
// make quarter use a possibility if quarters are
|
||||
// mentioned in either of these options
|
||||
|
||||
var spec =
|
||||
(opts.tickSize && opts.tickSize[1] === "quarter") ||
|
||||
(opts.minTickSize && opts.minTickSize[1] === "quarter")
|
||||
? specQuarters
|
||||
: specMonths;
|
||||
|
||||
if (opts.minTickSize != null) {
|
||||
if (typeof opts.tickSize == "number") {
|
||||
minSize = opts.tickSize;
|
||||
} else {
|
||||
minSize =
|
||||
opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < spec.length - 1; ++i) {
|
||||
if (
|
||||
axis.delta <
|
||||
(spec[i][0] * timeUnitSize[spec[i][1]] +
|
||||
spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) /
|
||||
2 &&
|
||||
spec[i][0] * timeUnitSize[spec[i][1]] >= minSize
|
||||
) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var size = spec[i][0];
|
||||
var unit = spec[i][1];
|
||||
|
||||
// special-case the possibility of several years
|
||||
|
||||
if (unit == "year") {
|
||||
// if given a minTickSize in years, just use it,
|
||||
// ensuring that it's an integer
|
||||
|
||||
if (opts.minTickSize != null && opts.minTickSize[1] == "year") {
|
||||
size = Math.floor(opts.minTickSize[0]);
|
||||
} else {
|
||||
var magn = Math.pow(
|
||||
10,
|
||||
Math.floor(
|
||||
Math.log(axis.delta / timeUnitSize.year) / Math.LN10
|
||||
)
|
||||
);
|
||||
var norm = axis.delta / timeUnitSize.year / magn;
|
||||
|
||||
if (norm < 1.5) {
|
||||
size = 1;
|
||||
} else if (norm < 3) {
|
||||
size = 2;
|
||||
} else if (norm < 7.5) {
|
||||
size = 5;
|
||||
} else {
|
||||
size = 10;
|
||||
}
|
||||
|
||||
size *= magn;
|
||||
}
|
||||
|
||||
// minimum size for years is 1
|
||||
|
||||
if (size < 1) {
|
||||
size = 1;
|
||||
}
|
||||
}
|
||||
|
||||
axis.tickSize = opts.tickSize || [size, unit];
|
||||
var tickSize = axis.tickSize[0];
|
||||
unit = axis.tickSize[1];
|
||||
|
||||
var step = tickSize * timeUnitSize[unit];
|
||||
|
||||
if (unit == "second") {
|
||||
d.setSeconds(floorInBase(d.getSeconds(), tickSize));
|
||||
} else if (unit == "minute") {
|
||||
d.setMinutes(floorInBase(d.getMinutes(), tickSize));
|
||||
} else if (unit == "hour") {
|
||||
d.setHours(floorInBase(d.getHours(), tickSize));
|
||||
} else if (unit == "month") {
|
||||
d.setMonth(floorInBase(d.getMonth(), tickSize));
|
||||
} else if (unit == "quarter") {
|
||||
d.setMonth(3 * floorInBase(d.getMonth() / 3, tickSize));
|
||||
} else if (unit == "year") {
|
||||
d.setFullYear(floorInBase(d.getFullYear(), tickSize));
|
||||
}
|
||||
|
||||
// reset smaller components
|
||||
|
||||
d.setMilliseconds(0);
|
||||
|
||||
if (step >= timeUnitSize.minute) {
|
||||
d.setSeconds(0);
|
||||
}
|
||||
if (step >= timeUnitSize.hour) {
|
||||
d.setMinutes(0);
|
||||
}
|
||||
if (step >= timeUnitSize.day) {
|
||||
d.setHours(0);
|
||||
}
|
||||
if (step >= timeUnitSize.day * 4) {
|
||||
d.setDate(1);
|
||||
}
|
||||
if (step >= timeUnitSize.month * 2) {
|
||||
d.setMonth(floorInBase(d.getMonth(), 3));
|
||||
}
|
||||
if (step >= timeUnitSize.quarter * 2) {
|
||||
d.setMonth(floorInBase(d.getMonth(), 6));
|
||||
}
|
||||
if (step >= timeUnitSize.year) {
|
||||
d.setMonth(0);
|
||||
}
|
||||
|
||||
var carry = 0;
|
||||
var v = Number.NaN;
|
||||
var prev;
|
||||
|
||||
do {
|
||||
prev = v;
|
||||
v = d.getTime();
|
||||
ticks.push(v);
|
||||
|
||||
if (unit == "month" || unit == "quarter") {
|
||||
if (tickSize < 1) {
|
||||
// a bit complicated - we'll divide the
|
||||
// month/quarter up but we need to take
|
||||
// care of fractions so we don't end up in
|
||||
// the middle of a day
|
||||
|
||||
d.setDate(1);
|
||||
var start = d.getTime();
|
||||
d.setMonth(d.getMonth() + (unit == "quarter" ? 3 : 1));
|
||||
var end = d.getTime();
|
||||
d.setTime(
|
||||
v + carry * timeUnitSize.hour + (end - start) * tickSize
|
||||
);
|
||||
carry = d.getHours();
|
||||
d.setHours(0);
|
||||
} else {
|
||||
d.setMonth(
|
||||
d.getMonth() + tickSize * (unit == "quarter" ? 3 : 1)
|
||||
);
|
||||
}
|
||||
} else if (unit == "year") {
|
||||
d.setFullYear(d.getFullYear() + tickSize);
|
||||
} else {
|
||||
d.setTime(v + step);
|
||||
}
|
||||
} while (v < axis.max && v != prev);
|
||||
|
||||
return ticks;
|
||||
};
|
||||
|
||||
axis.tickFormatter = function (v, axis) {
|
||||
var d = dateGenerator(v, axis.options);
|
||||
|
||||
// first check global format
|
||||
|
||||
if (opts.timeformat != null) {
|
||||
return formatDate(
|
||||
d,
|
||||
opts.timeformat,
|
||||
opts.monthNames,
|
||||
opts.dayNames
|
||||
);
|
||||
}
|
||||
|
||||
// possibly use quarters if quarters are mentioned in
|
||||
// any of these places
|
||||
|
||||
var useQuarters =
|
||||
(axis.options.tickSize &&
|
||||
axis.options.tickSize[1] == "quarter") ||
|
||||
(axis.options.minTickSize &&
|
||||
axis.options.minTickSize[1] == "quarter");
|
||||
|
||||
var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
|
||||
var span = axis.max - axis.min;
|
||||
var suffix = opts.twelveHourClock ? " %p" : "";
|
||||
var hourCode = opts.twelveHourClock ? "%I" : "%H";
|
||||
var fmt;
|
||||
|
||||
if (t < timeUnitSize.minute) {
|
||||
fmt = hourCode + ":%M:%S" + suffix;
|
||||
} else if (t < timeUnitSize.day) {
|
||||
if (span < 2 * timeUnitSize.day) {
|
||||
fmt = hourCode + ":%M" + suffix;
|
||||
} else {
|
||||
fmt = "%b %d " + hourCode + ":%M" + suffix;
|
||||
}
|
||||
} else if (t < timeUnitSize.month) {
|
||||
fmt = "%b %d";
|
||||
} else if (
|
||||
(useQuarters && t < timeUnitSize.quarter) ||
|
||||
(!useQuarters && t < timeUnitSize.year)
|
||||
) {
|
||||
if (span < timeUnitSize.year) {
|
||||
fmt = "%b";
|
||||
} else {
|
||||
fmt = "%b %Y";
|
||||
}
|
||||
} else if (useQuarters && t < timeUnitSize.year) {
|
||||
if (span < timeUnitSize.year) {
|
||||
fmt = "Q%q";
|
||||
} else {
|
||||
fmt = "Q%q %Y";
|
||||
}
|
||||
} else {
|
||||
fmt = "%Y";
|
||||
}
|
||||
|
||||
var rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);
|
||||
|
||||
return rt;
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "time",
|
||||
version: "1.0",
|
||||
});
|
||||
|
||||
// Time-axis support used to be in Flot core, which exposed the
|
||||
// formatDate function on the plot object. Various plugins depend
|
||||
// on the function, so we need to re-expose it here.
|
||||
|
||||
$.plot.formatDate = formatDate;
|
||||
$.plot.dateGenerator = dateGenerator;
|
||||
})(jQuery);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Flot",
|
||||
"version": "0.8.3",
|
||||
"main": "jquery.flot.js",
|
||||
"scripts": {
|
||||
"test": "make test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jshint": "0.9.1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user