github flot/flot v0.8.0
0.8.0

latest releases: v4.2.6, v4.2.5, v4.2.4...
10 years ago

API changes

Support for time series has been moved into a plugin, jquery.flot.time.js.
This results in less code if time series are not used. The functionality
remains the same (plus timezone support, as described below); however, the
plugin must be included if axis.mode is set to "time".

When the axis mode is "time", the axis option "timezone" can be set to null,
"browser", or a particular timezone (e.g. "America/New_York") to control how
the dates are displayed. If null, the dates are displayed as UTC. If
"browser", the dates are displayed in the time zone of the user's browser.

Date/time formatting has changed and now follows a proper subset of the
standard strftime specifiers, plus one nonstandard specifier for quarters.
Additionally, if a strftime function is found in the Date object's prototype,
it will be used instead of the built-in formatter.

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
"flot-overlay" to prevent accidental clashes (issue 540).

Changes

  • Addition of nonstandard %q specifier to date/time formatting. (patch
    by risicle, issue 49)
  • Date/time formatting follows proper subset of strftime specifiers, and
    support added for Date.prototype.strftime, if found. (patch by Mark Cote,
    issues 419 and 558)
  • Fixed display of year ticks. (patch by Mark Cote, issue 195)
  • Support for time series moved to plugin. (patch by Mark Cote)
  • Display time series in different time zones. (patch by Knut Forkalsrud,
    issue 141)
  • Added a canvas plugin to enable rendering axis tick labels to the canvas.
    (sponsored by YCharts.com, implementation by Ole Laursen and David Schnur)
  • Support for setting the interval between redraws of the overlay canvas with
    redrawOverlayInterval. (suggested in issue 185)
  • Support for multiple thresholds in thresholds plugin. (patch by Arnaud
    Bellec, issue 523)
  • Support for plotting categories/textual data directly with new categories
    plugin.
  • Tick generators now get the whole axis rather than just min/max.
  • Added processOffset and drawBackground hooks. (suggested in issue 639)
  • Added a grid "margin" option to set the space between the canvas edge and
    the grid.
  • Prevent the pie example page from generating single-slice pies. (patch by
    Shane Reustle)
  • In addition to "left" and "center", bars now recognize "right" as an
    alignment option. (patch by Michael Mayer, issue 520)
  • Switched from toFixed to a much faster default tickFormatter. (patch by
    Clemens Stolle)
  • Added to a more helpful error when using a time-mode axis without including
    the flot.time plugin. (patch by Yael Elmatad)
  • Added a legend "sorted" option to control sorting of legend entries
    independent of their series order. (patch by Tom Cleaveland)
  • Added a series "highlightColor" option to control the color of the
    translucent overlay that identifies the dataset when the mouse hovers over
    it. (patch by Eric Wendelin and Nate Abele, issues 168 and 299)
  • Added a plugin jquery.flot.errorbars, with an accompanying example, that
    adds the ability to plot error bars, commonly used in many kinds of
    statistical data visualizations. (patch by Rui Pereira, issue 215)
  • The legend now omits entries whose labelFormatter returns null. (patch by
    Tom Cleaveland, Christopher Lambert, and Simon Strandgaard)
  • Added support for high pixel density (retina) displays, resulting in much
    crisper charts on such devices. (patch by Olivier Guerriat, additional
    fixes by Julien Thomas, maimairel, and Lau Bech Lauritzen)
  • Added the ability to control pie shadow position and alpha via a new pie
    'shadow' option. (patch by Julien Thomas, pull request #78)
  • Added the ability to set width and color for individual sides of the grid.
    (patch by Ara Anjargolian, additional fixes by Karl Swedberg, pull requests #855
    and #880)
  • The selection plugin's getSelection now returns null when the selection
    has been cleared. (patch by Nick Campbell, pull request #852)
  • Added a new option called 'zero' to bars and filled lines series, to control
    whether the y-axis minimum is scaled to fit the data or set to zero.
    (patch by David Schnur, issues #316, #529, and #856, pull request #911)
  • The plot function is now also a jQuery chainable property.
    (patch by David Schnur, issues #734 and #816, pull request #953)
  • 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

  • Fix problem with null values and pie plugin. (patch by gcruxifix,
    issue 500)
  • Fix problem with threshold plugin and bars. (based on patch by
    kaarlenkaski, issue 348)
  • Fix axis box calculations so the boxes include the outermost part of the
    labels too.
  • Fix problem with event clicking and hovering in IE 8 by updating Excanvas
    and removing previous work-around. (test case by Ara Anjargolian)
  • Fix issues with blurry 1px border when some measures aren't integer.
    (reported by Ara Anjargolian)
  • Fix bug with formats in the data processor. (reported by Peter Hull,
    issue 534)
  • Prevent i from being declared global in extractRange. (reported by
    Alexander Obukhov, issue 627)
  • Throw errors in a more cross-browser-compatible manner. (patch by
    Eddie Kay)
  • Prevent pie slice outlines from being drawn when the stroke width is zero.
    (reported by Chris Minett, issue 585)
  • Updated the navigate plugin's inline copy of jquery.mousewheel to fix
    Webkit zoom problems. (reported by Hau Nguyen, issue 685)
  • Axis labels no longer appear as decimals rather than integers in certain
    cases. (patch by Clemens Stolle, issue 541)
  • Automatic color generation no longer produces only whites and blacks when
    there are many series. (patch by David Schnur and Tom Cleaveland)
  • Fixed an error when custom tick labels weren't provided as strings. (patch
    by Shad Downey)
  • Prevented the local insertSteps and fmt variables from becoming global.
    (first reported by Marc Bennewitz and Szymon Barglowski, patch by Nick
    Campbell, issues #825 and #831, pull request #851)
  • Prevented several threshold plugin variables from becoming global. (patch
    by Lasse Dahl Ebert)
  • Fixed various jQuery 1.8 compatibility issues. (issues #814 and #819,
    pull request #877)
  • Pie charts with a slice equal to or approaching 100% of the pie no longer
    appear invisible. (patch by David Schnur, issues #444, #658, #726, #824
    and #850, pull request #879)
  • Prevented several local variables from becoming global. (patch by aaa707)
  • Ensure that the overlay and primary canvases remain aligned. (issue #670,
    pull request #901)
  • Added support for jQuery 1.9 by removing and replacing uses of $.browser.
    (analysis and patch by Anthony Ryan, pull request #905)
  • Pie charts no longer disappear when redrawn during a resize or update.
    (reported by Julien Bec, issue #656, pull request #910)
  • Avoided floating-point precision errors when calculating pie percentages.
    (patch by James Ward, pull request #918)
  • Fixed compatibility with jQuery 1.2.6, which has no 'mouseleave' shortcut.
    (reported by Bevan, original pull request #920, replaced by direct patch)
  • Fixed sub-pixel rendering issues with crosshair and selection lines.
    (patches by alanayoub and Daniel Shapiro, pull requests #17 and #925)
  • Fixed rendering issues when using the threshold plugin with several series.
    (patch by Ivan Novikov, pull request #934)
  • Pie charts no longer disappear when redrawn after calling setData().
    (reported by zengge1984 and pareeohnos, issues #810 and #945)
  • Added a work-around for the problem where points with a lineWidth of zero
    still showed up with a visible line. (reported by SalvoSav, issue #842,
    patch by Jamie Hamel-Smith, pull request #937)
  • Pie charts now accept values in string form, like other plot types.
    (reported by laerdal.no, issue #534)
  • Avoid rounding errors in the threshold plugin.
    (reported by jerikojerk, issue #895)
  • Fixed an error when using the navigate plugin with jQuery 1.9.x or later.
    (reported by Paolo Valleri, issue #964)
  • 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)

Don't miss a new flot release

NewReleases is sending notifications on new releases.