Socket
Socket
Sign inDemoInstall

flot

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flot - npm Package Compare versions

Comparing version 0.8.0-alpha to 0.8.3

examples/canvas/index.html

89

API.md
# Flot Reference #
**Table of Contents**
[Introduction](#introduction)
| [Data Format](#data-format)
| [Plot Options](#plot-options)
| [Customizing the legend](#customizing-the-legend)
| [Customizing the axes](#customizing-the-axes)
| [Multiple axes](#multiple-axes)
| [Time series data](#time-series-data)
| [Customizing the data series](#customizing-the-data-series)
| [Customizing the grid](#customizing-the-grid)
| [Specifying gradients](#specifying-gradients)
| [Plot Methods](#plot-methods)
| [Hooks](#hooks)
| [Plugins](#plugins)
| [Version number](#version-number)
---
## Introduction ##
Consider a call to the plot function:

@@ -11,3 +32,3 @@

that the plot will be put into. This placeholder needs to have its
width and height set as explained in the README (go read that now if
width and height set as explained in the [README](README.md) (go read that now if
you haven't, it's short). The plot will modify some properties of the

@@ -273,24 +294,43 @@ placeholder so it's recommended you simply pass in a div that you

The "color" option determines the color of the labels and ticks for
the axis (default is the grid color). For more fine-grained control
you can also set the color of the ticks separately with "tickColor"
(otherwise it's autogenerated as the base color with some
transparency).
The "color" option determines the color of the line and ticks for the axis, and
defaults to the grid color with transparency. For more fine-grained control you
can also set the color of the ticks separately with "tickColor".
You can customize the font used to draw the labels with CSS or
directly with "font". The default value of null means that the font is
read from the font style on the placeholder element (80% the size of
that to be precise). If you set it directly with "font: { ... }", the
format is like this:
You can customize the font and color used to draw the axis tick labels with CSS
or directly via the "font" option. When "font" is null - the default - each
tick label is given the 'flot-tick-label' class. For compatibility with Flot
0.7 and earlier the labels are also given the 'tickLabel' class, but this is
deprecated and scheduled to be removed with the release of version 1.0.0.
To enable more granular control over styles, labels are divided between a set
of text containers, with each holding the labels for one axis. These containers
are given the classes 'flot-[x|y]-axis', and 'flot-[x|y]#-axis', where '#' is
the number of the axis when there are multiple axes. For example, the x-axis
labels for a simple plot with only a single x-axis might look like this:
```html
<div class='flot-x-axis flot-x1-axis'>
<div class='flot-tick-label'>January 2013</div>
...
</div>
```
For direct control over label styles you can also provide "font" as an object
with this format:
```js
{
size: 11,
lineHeight: 13,
style: "italic",
weight: "bold",
family: "sans-serif",
variant: "small-caps"
variant: "small-caps",
color: "#545454"
}
```
The size and lineHeight must be expressed in pixels; CSS units such as 'em'
or 'smaller' are not allowed.
The options "min"/"max" are the precise minimum/maximum value on the

@@ -509,3 +549,3 @@ scale. If you don't specify either of them, a value will automatically

There are different schools of thought when it comes to diplay of
There are different schools of thought when it comes to display of
timestamps. Many will want the timestamps to be displayed according to

@@ -540,3 +580,16 @@ a certain time zone, usually the time zone in which the data has been

```
In Ruby you can get it using the `#to_i` method on the
[`Time`](http://apidock.com/ruby/Time/to_i) object. If you're using the
`active_support` gem (default for Ruby on Rails applications) `#to_i` is also
available on the `DateTime` and `ActiveSupport::TimeWithZone` objects. You
simply need to multiply the result by 1000:
```ruby
Time.now.to_i * 1000 # => 1383582043000
# ActiveSupport examples:
DateTime.now.to_i * 1000 # => 1383582043000
ActiveSupport::TimeZone.new('Asia/Shanghai').now.to_i * 1000
# => 1383582043000
```
In .NET you can get it with something like:

@@ -598,3 +651,3 @@

xaxis: {
mode: "time"
mode: "time",
timeformat: "%Y/%m/%d"

@@ -625,2 +678,6 @@ }

Flot 0.8 switched from %h to the standard %H hours specifier. The %h specifier
is still available, for backwards-compatibility, but is deprecated and
scheduled to be removed permanently with the release of version 1.0.
You can customize the month names with the "monthNames" option. For

@@ -1419,3 +1476,3 @@ instance, for Danish you might specify:

add a callback to clean up after you. Take a look at the section in
PLUGINS.txt for more info.
the [PLUGINS](PLUGINS.md) document for more info.

@@ -1442,3 +1499,3 @@

See the PLUGINS.txt file for details on how to write a plugin. As the
See the [PLUGINS](PLUGINS.md) document for details on how to write a plugin. As the
above description hints, it's actually pretty easy.

@@ -1445,0 +1502,0 @@

2

component.json
{
"name": "Flot",
"version": "0.8.0-alpha",
"version": "0.8.3",
"main": "jquery.flot.js",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -11,5 +11,4 @@ ## Contributing to Flot ##

[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
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

@@ -22,2 +21,7 @@ environment (browser and version, jQuery version, other libraries) that you're

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 ###

@@ -27,9 +31,13 @@

1. Divide larger changes into a series of small, logical commits with
descriptive messages.
1. Submit new features or architectural changes to the *&lt;version&gt;-work*
branch for the next major release. Submit bug fixes to the master branch.
2. Format your code according to the style guidelines below.
2. Divide larger changes into a series of small, logical commits with
descriptive messages.
3. Rebase against master, if necessary, before submitting your pull request.
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 ###

@@ -42,17 +50,17 @@

Do not add horizontal space around parameter lists, loop definitions, or
array/object indices. For example:
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 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;
}
}
for (var i = 0; i < data.length; i++) { // This block is correct!
if (data[i] > 1) {
data[i] = 2;
}
}
```

@@ -62,4 +70,4 @@

Use // for all comments except the header at the top of a file or inline
include.
Use [jsDoc](http://usejsdoc.org) comments for all file and function headers.
Use // for all inline and block comments, regardless of length.

@@ -70,8 +78,8 @@ All // comment blocks should have an empty line above *and* below them. For

```js
var a = 5;
var a = 5;
// We're going to loop here
// TODO: Make this loop faster, better, stronger!
// We're going to loop here
// TODO: Make this loop faster, better, stronger!
for (var x = 0; x < 10; x++) {}
for (var x = 0; x < 10; x++) {}
```

@@ -91,7 +99,7 @@

```js
if (a == 1 && // This block is wrong!
b == 2 &&
c == 3) {}
if (a == 1 && // This block is wrong!
b == 2 &&
c == 3) {}
if (a == 1 && b == 2 && c == 3) {} // This block is correct!
```
if (a == 1 && b == 2 && c == 3) {} // This block is correct!
```
{
"name": "flot",
"version": "0.8.0-alpha",
"version": "0.8.3",
"title": "Flot",

@@ -11,3 +11,3 @@ "author": {

"type": "MIT",
"url": "https://github.com/flot/flot/blob/master/LICENSE.txt"
"url": "http://github.com/flot/flot/blob/master/LICENSE.txt"
}],

@@ -19,5 +19,6 @@ "dependencies": {

"keywords": ["plot", "chart", "graph", "visualization", "canvas", "graphics"],
"homepage": "http://flotcharts.org",
"docs": "https://github.com/flot/flot/blob/master/API.md",
"demo": "http://people.iola.dk/olau/flot/examples",
"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": [{

@@ -28,2 +29,2 @@ "name": "David Schnur",

}]
}
}

@@ -77,10 +77,11 @@ /* Plugin for jQuery for working with colors.

var c;
do {
c = elem.css(css).toLowerCase();
// keep going until we find an element that has color, or
// we hit the body
// we hit the body or root (have no parent)
if (c != '' && c != 'transparent')
break;
elem = elem.parent();
} while (!$.nodeName(elem.get(0), "body"));
} while (elem.length && !$.nodeName(elem.get(0), "body"));

@@ -87,0 +88,0 @@ // catch Safari's way of signalling transparent

/* Flot plugin for plotting textual data or categories.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for showing crosshairs when the mouse hovers over the plot.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -142,3 +142,3 @@

if (crosshair.x != -1) {
var adj = plot.getOptions().crosshair.lineWidth % 2 === 0 ? 0 : 0.5;
var adj = plot.getOptions().crosshair.lineWidth % 2 ? 0.5 : 0;

@@ -151,3 +151,3 @@ ctx.strokeStyle = c.color;

if (c.mode.indexOf("x") != -1) {
var drawX = Math.round(crosshair.x) + adj;
var drawX = Math.floor(crosshair.x) + adj;
ctx.moveTo(drawX, 0);

@@ -157,3 +157,3 @@ ctx.lineTo(drawX, plot.height());

if (c.mode.indexOf("y") != -1) {
var drawY = Math.round(crosshair.y) + adj;
var drawY = Math.floor(crosshair.y) + adj;
ctx.moveTo(0, drawY);

@@ -160,0 +160,0 @@ ctx.lineTo(plot.width(), drawY);

/* Flot plugin for plotting error bars.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for computing bottoms for filled line and bar charts.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for plotting images.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for adding the ability to pan and zoom the plot.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -138,2 +138,3 @@

function onMouseWheel(e, delta) {
e.preventDefault();
onZoomClick(e, delta < 0);

@@ -263,4 +264,4 @@ return false;

if (zr &&
((zr[0] != null && range < zr[0]) ||
(zr[1] != null && range > zr[1])))
((zr[0] != null && range < zr[0] && amount >1) ||
(zr[1] != null && range > zr[1] && amount <1)))
return;

@@ -267,0 +268,0 @@

/* Flot plugin for rendering pie charts.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -72,2 +72,3 @@

target = null,
options = null,
maxRadius = null,

@@ -184,4 +185,9 @@ centerLeft = null,

if ($.isArray(value) && value.length == 1) {
value = value[0];
}
if ($.isArray(value)) {
if ($.isNumeric(value[1])) {
// Equivalent to $.isNumeric() but compatible with jQuery < 1.7
if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
value[1] = +value[1];

@@ -191,3 +197,3 @@ } else {

}
} else if ($.isNumeric(value)) {
} else if (!isNaN(parseFloat(value)) && isFinite(value)) {
value = [1, +value];

@@ -224,9 +230,12 @@ } else {

if (numCombined < 2 || value / total > options.series.pie.combine.threshold) {
newdata.push({
data: [[1, value]],
color: data[i].color,
label: data[i].label,
angle: value * Math.PI * 2 / total,
percent: value / (total / 100)
});
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)
})
);
}

@@ -295,2 +304,7 @@ }

}
if (centerLeft < maxRadius) {
centerLeft = maxRadius;
} else if (centerLeft > canvasWidth - maxRadius) {
centerLeft = canvasWidth - maxRadius;
}
} else {

@@ -300,8 +314,2 @@ centerLeft += options.series.pie.offset.left;

if (centerLeft < maxRadius) {
centerLeft = maxRadius;
} else if (centerLeft > canvasWidth - maxRadius) {
centerLeft = canvasWidth - maxRadius;
}
var slices = plot.getData(),

@@ -308,0 +316,0 @@ attempts = 0;

/* Flot plugin for automatically redrawing plots as the placeholder resizes.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -22,5 +22,4 @@

*/
(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($,h,c){var a=$([]),e=$.resize=$.extend($.resize,{}),i,k="setTimeout",j="resize",d=j+"-special-event",b="delay",f="throttleWindow";e[b]=250;e[f]=true;$.event.special[j]={setup:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.add(l);$.data(this,d,{w:l.width(),h:l.height()});if(a.length===1){g()}},teardown:function(){if(!e[f]&&this[k]){return false}var l=$(this);a=a.not(l);l.removeData(d);if(!a.length){clearTimeout(i)}},add:function(l){if(!e[f]&&this[k]){return false}var n;function m(s,o,p){var q=$(this),r=$.data(this,d);r.w=o!==c?o:q.width();r.h=p!==c?p:q.height();n.apply(this,arguments)}if($.isFunction(l)){n=l;return m}else{n=l.handler;l.handler=m}}};function g(){i=h[k](function(){a.each(function(){var n=$(this),m=n.width(),l=n.height(),o=$.data(this,d);if(m!==o.w||l!==o.h){n.trigger(j,[o.w=m,o.h=l])}});g()},e[b])}})(jQuery,this);
(function ($) {

@@ -27,0 +26,0 @@ var options = { }; // no options

/* Flot plugin for selecting regions of a plot.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for stacking data sets rather than overlyaing them.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin that adds some extra symbols for plotting points.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Flot plugin for thresholding data.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -5,0 +5,0 @@

/* Pretty handling of time axes.
Copyright (c) 2007-2012 IOLA and Ole Laursen.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.

@@ -13,3 +13,10 @@

var options = {};
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
}
};

@@ -70,2 +77,3 @@ // round to nearby lower multiple of base

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;

@@ -192,3 +200,3 @@ case 'I': c = leftPad(hours12); break;

function init(plot) {
plot.hooks.processDatapoints.push(function (plot, series, datapoints) {
plot.hooks.processOptions.push(function (plot, options) {
$.each(plot.getAxes(), function(axisName, axis) {

@@ -293,13 +301,19 @@

d.setSeconds(0);
} else if (step >= timeUnitSize.hour) {
}
if (step >= timeUnitSize.hour) {
d.setMinutes(0);
} else if (step >= timeUnitSize.day) {
}
if (step >= timeUnitSize.day) {
d.setHours(0);
} else if (step >= timeUnitSize.day * 4) {
}
if (step >= timeUnitSize.day * 4) {
d.setDate(1);
} else if (step >= timeUnitSize.month * 2) {
}
if (step >= timeUnitSize.month * 2) {
d.setMonth(floorInBase(d.getMonth(), 3));
} else if (step >= timeUnitSize.quarter * 2) {
}
if (step >= timeUnitSize.quarter * 2) {
d.setMonth(floorInBase(d.getMonth(), 6));
} else if (step >= timeUnitSize.year) {
}
if (step >= timeUnitSize.year) {
d.setMonth(0);

@@ -420,3 +434,4 @@ }

$.plot.formatDate = formatDate;
$.plot.dateGenerator = dateGenerator;
})(jQuery);

@@ -1,2 +0,2 @@

Copyright (c) 2007-2012 IOLA and Ole Laursen
Copyright (c) 2007-2014 IOLA and Ole Laursen

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person

@@ -1,3 +0,183 @@

## Flot 0.8 alpha ##
## Flot 0.8.3 ##
### Changes ###
- Updated example code to avoid encouraging unnecessary re-plots.
(patch by soenter, pull request #1221)
### Bug fixes ###
- Added a work-around to disable the allocation of extra space for first and
last axis ticks, allowing plots to span the full width of their container.
A proper solution for this bug will be implemented in the 0.9 release.
(reported by Josh Pigford and andig, issue #1212, pull request #1290)
- Fixed a regression introduced in 0.8.1, where the last tick label would
sometimes wrap rather than extending the plot's offset to create space.
(reported by Elite Gamer, issue #1283)
- Fixed a regression introduced in 0.8.2, where the resize plugin would use
unexpectedly high amounts of CPU even when idle.
(reported by tommie, issue #1277, pull request #1289)
- Fixed the selection example to work with jQuery 1.9.x and later.
(reported by EGLadona and dmfalke, issue #1250, pull request #1285)
- Added a detach shim to fix support for jQuery versions earlier than 1.4.x.
(reported by ngavard, issue #1240, pull request #1286)
- Fixed a rare 'Uncaught TypeError' when using the resize plugin in IE 7/8.
(reported by tleish, issue #1265, pull request #1289)
- Fixed zoom constraints to apply only in the direction of the zoom.
(patch by Neil Katin, issue #1204, pull request #1205)
- Markings lines are no longer blurry when drawn on pixel boundaries.
(reported by btccointicker and Rouillard, issue #1210)
- Don't discard original pie data-series values when combining slices.
(patch by Phil Tsarik, pull request #1238)
- Fixed broken auto-scale behavior when using deprecated [x|y]2axis options.
(reported by jorese, issue #1228, pull request #1284)
- Exposed the dateGenerator function on the plot object, as it used to be
before time-mode was moved into a separate plugin.
(patch by Paolo Valleri, pull request #1028)
## Flot 0.8.2 ##
### Changes ###
- Added a plot.destroy method as a way to free memory when emptying the plot
placeholder and then re-using it for some other purpose.
(patch by Thodoris Greasidis, issue #1129, pull request #1130)
- Added a table of contents and PLUGINS link to the API documentation.
(patches by Brian Peiris, pull requests #1064 and #1127)
- Added Ruby code examples for time conversion.
(patch by Mike Połtyn, pull request #1182)
- Minor improvements to API.md and README.md.
(patches by Patrik Ragnarsson, pull requests #1085 and #1086)
- Updated inlined jQuery Resize to the latest version to fix errors.
(reported by Matthew Sabol and sloker, issues #997 ad #1081)
### Bug fixes ###
- Fixed an unexpected change in behavior that resulted in duplicate tick
labels when using a plugin, like flot-tickrotor, that overrode tick labels.
(patch by Mark Cote, pull request #1091)
- Fixed a regression from 0.7 where axis labels were given the wrong width,
causing them to overlap at certain scales and ignore the labelWidth option.
(patch by Benjamin Gram, pull request #1177)
- Fixed a bug where the second axis in an xaxes/yaxes array incorrectly had
its 'innermost' property set to false or undefined, even if it was on the
other side of the plot from the first axis. This resulted in the axis bar
being visible when it shouldn't have been, which was especially obvious
when the grid had a left/right border width of zero.
(reported by Teq1, fix researched by ryleyb, issue #1056)
- Fixed an error when using a placeholder that has no font-size property.
(patch by Craig Oldford, pull request #1135)
- Fixed a regression from 0.7 where nulls at the end of a series were ignored
for purposes of determing the range of the x-axis.
(reported by Munsifali Rashid, issue #1095)
- If a font size is provided, base the default lineHeight on that size rather
that the font size of the plot placeholder, which may be very different.
(reported by Daniel Hoffmann Bernardes, issue #1131, pull request #1199)
- Fix broken highlighting for right-aligned bars.
(reported by BeWiBu and Mihai Stanciu, issues #975 and #1093, with further
assistance by Eric Byers, pull request #1120)
- Prevent white circles from sometimes showing up inside of pie charts.
(reported by Pierre Dubois and Jack Klink, issues #1128 and #1073)
- Label formatting no longer breaks when a page contains multiple pie charts.
(reported by Brend Wanders, issue #1055)
- When using multiple axes on opposite sides of the plot, the innermost axis
coming later in the list no longer has its bar drawn incorrectly.
(reported by ryleyb, issue #1056)
- When removing series labels and redrawing the plot, the legend now updates
correctly even when using an external container.
(patch by Luis Silva, issue #1159, pull request #1160)
- The pie plugin no longer ignores the value of the left offset option.
(reported by melanker, issue #1136)
- Fixed a regression from 0.7, where extra padding was added unnecessarily to
sides of the plot where there was no last tick label.
(reported by sknob001, issue #1048, pull request #1200)
- Fixed incorrect tooltip behavior in the interacting example.
(patch by cleroux, issue #686, pull request #1074)
- Fixed an error in CSS color extraction with elements outside the DOM.
(patch by execjosh, pull request #1084)
- Fixed :not selector error when using jQuery without Sizzle.
(patch by Anthony Ryan, pull request #1180)
- Worked around a browser issue that caused bars to appear un-filled.
(reported by irbian, issue #915)
## Flot 0.8.1 ##
### Bug fixes ###
- Fixed a regression in the time plugin, introduced in 0.8, that caused dates
to align to the minute rather than to the highest appropriate unit. This
caused many x-axes in 0.8 to have different ticks than they did in 0.7.
(reported by Tom Sheppard, patch by Daniel Shapiro, issue #1017, pull
request #1023)
- Fixed a regression in text rendering, introduced in 0.8, that caused axis
labels with the same text as another label on the same axis to disappear.
More generally, it's again possible to have the same text in two locations.
(issue #1032)
- Fixed a regression in text rendering, introduced in 0.8, where axis labels
were no longer assigned an explicit width, and their text could not wrap.
(reported by sabregreen, issue #1019)
- Fixed a regression in the pie plugin, introduced in 0.8, that prevented it
from accepting data in the format '[[x, y]]'.
(patch by Nicolas Morel, pull request #1024)
- The 'zero' series option and 'autoscale' format option are no longer
ignored when the series contains a null value.
(reported by Daniel Shapiro, issue #1033)
- Avoid triggering the time-mode plugin exception when there are zero series.
(reported by Daniel Rothig, patch by Mark Raymond, issue #1016)
- When a custom color palette has fewer colors than the default palette, Flot
no longer fills out the colors with the remainder of the default.
(patch by goorpy, issue #1031, pull request #1034)
- Fixed missing update for bar highlights after a zoom or other redraw.
(reported by Paolo Valleri, issue #1030)
- Fixed compatibility with jQuery versions earlier than 1.7.
(patch by Lee Willis, issue #1027, pull request #1027)
- The mouse wheel no longer scrolls the page when using the navigate plugin.
(patch by vird, pull request #1020)
- Fixed missing semicolons in the core library.
(reported by Michal Zglinski)
## Flot 0.8.0 ##
### API changes ###

@@ -20,9 +200,29 @@

Axis labels are now drawn with canvas text with some parsing to support
newlines. This solves various issues but also means that they no longer
support HTML markup, can be accessed as DOM elements or styled directly with
CSS. Some older browsers lack this function of the canvas API (this doesn't
affect IE); if this is a problem, either continue using an older version of
Flot or try an emulation helper such as canvas-text or Flashcanvas.
Axis tick labels now use the class 'flot-tick-label' instead of 'tickLabel'.
The text containers for each axis now use the classes 'flot-[x|y]-axis' and
'flot-[x|y]#-axis' instead of '[x|y]Axis' and '[x|y]#Axis'. For compatibility
with Flot 0.7 and earlier text will continue to use the old classes as well,
but they are considered deprecated and will be removed in a future version.
In previous versions the axis 'color' option was used to set the color of tick
marks and their label text. It now controls the color of the axis line, which
previously could not be changed separately, and continues to act as a default
for the tick-mark color. The color of tick label text is now set either by
overriding the 'flot-tick-label' CSS rule or via the axis 'font' option.
A new plugin, jquery.flot.canvas.js, allows axis tick labels to be rendered
directly to the canvas, rather than using HTML elements. This feature can be
toggled with a simple option, making it easy to create interactive plots in the
browser using HTML, then re-render them to canvas for export as an image.
The plugin tries to remain as faithful as possible to the original HTML render,
and goes so far as to automatically extract styles from CSS, to avoid having to
provide a separate set of styles when rendering to canvas. Due to limitations
of the canvas text API, the plugin cannot reproduce certain features, including
HTML markup embedded in labels, and advanced text styles such as 'em' units.
The plugin requires support for canvas text, which may not be present in some
older browsers, even if they support the canvas tag itself. To use the plugin
with these browsers try using a shim such as canvas-text or FlashCanvas.
The base and overlay canvas are now using the CSS classes "flot-base" and

@@ -47,3 +247,4 @@ "flot-overlay" to prevent accidental clashes (issue 540).

- Canvas text support for labels. (sponsored by YCharts.com)
- Added a canvas plugin to enable rendering axis tick labels to the canvas.
(sponsored by YCharts.com, implementation by Ole Laursen and David Schnur)

@@ -113,2 +314,9 @@ - Support for setting the interval between redraws of the overlay canvas with

- When only a single pie slice is beneath the combine threshold it is no longer
replaced by an 'other' slice. (suggested by Devin Bayer, issue #638)
- Added lineJoin and minSize options to the selection plugin to control the
corner style and minimum size of the selection, respectively.
(patch by Ruth Linehan, pull request #963)
### Bug fixes ###

@@ -208,3 +416,9 @@

- Fixed inconsistencies between the highlight and unhighlight functions.
(reported by djamshed, issue #987)
- Fixed recalculation of tickSize and tickDecimals on calls to setupGrid.
(patch by thecountofzero, pull request #861, issues #860, #1000)
## Flot 0.7 ##

@@ -211,0 +425,0 @@

{
"name": "flot",
"version": "0.8.0-alpha",
"version": "0.8.3",
"main": "jquery.flot.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -74,5 +74,5 @@ # Flot [![Build status](https://travis-ci.org/flot/flot.png)](https://travis-ci.org/flot/flot)

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 reference
in the file `API.txt`. Here's a quick example that'll draw a line from
(0, 0) to (1, 1):
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):

@@ -111,2 +111,2 @@ ```js

[timezone-js]: https://github.com/mde/timezone-js
[olson]: ftp://ftp.iana.org/tz/
[olson]: http://ftp.iana.org/time-zones

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc