NEWS.md (35546B)
1 ## Flot 0.8.1 ## 2 3 ### Bug fixes ### 4 5 - Fixed a regression in the time plugin, introduced in 0.8, that caused dates 6 to align to the minute rather than to the highest appropriate unit. This 7 caused many x-axes in 0.8 to have different ticks than they did in 0.7. 8 (reported by Tom Sheppard, patch by Daniel Shapiro, issue #1017, pull 9 request #1023) 10 11 - Fixed a regression in text rendering, introduced in 0.8, that caused axis 12 labels with the same text as another label on the same axis to disappear. 13 More generally, it's again possible to have the same text in two locations. 14 (issue #1032) 15 16 - Fixed a regression in text rendering, introduced in 0.8, where axis labels 17 were no longer assigned an explicit width, and their text could not wrap. 18 (reported by sabregreen, issue #1019) 19 20 - Fixed a regression in the pie plugin, introduced in 0.8, that prevented it 21 from accepting data in the format '[[x, y]]'. 22 (patch by Nicolas Morel, pull request #1024) 23 24 - The 'zero' series option and 'autoscale' format option are no longer 25 ignored when the series contains a null value. 26 (reported by Daniel Shapiro, issue #1033) 27 28 - Avoid triggering the time-mode plugin exception when there are zero series. 29 (reported by Daniel Rothig, patch by Mark Raymond, issue #1016) 30 31 - When a custom color palette has fewer colors than the default palette, Flot 32 no longer fills out the colors with the remainder of the default. 33 (patch by goorpy, issue #1031, pull request #1034) 34 35 - Fixed missing update for bar highlights after a zoom or other redraw. 36 (reported by Paolo Valleri, issue #1030) 37 38 - Fixed compatibility with jQuery versions earlier than 1.7. 39 (patch by Lee Willis, issue #1027, pull request #1027) 40 41 - The mouse wheel no longer scrolls the page when using the navigate plugin. 42 (patch by vird, pull request #1020) 43 44 - Fixed missing semicolons in the core library. 45 (reported by Michal Zglinski) 46 47 48 ## Flot 0.8.0 ## 49 50 ### API changes ### 51 52 Support for time series has been moved into a plugin, jquery.flot.time.js. 53 This results in less code if time series are not used. The functionality 54 remains the same (plus timezone support, as described below); however, the 55 plugin must be included if axis.mode is set to "time". 56 57 When the axis mode is "time", the axis option "timezone" can be set to null, 58 "browser", or a particular timezone (e.g. "America/New_York") to control how 59 the dates are displayed. If null, the dates are displayed as UTC. If 60 "browser", the dates are displayed in the time zone of the user's browser. 61 62 Date/time formatting has changed and now follows a proper subset of the 63 standard strftime specifiers, plus one nonstandard specifier for quarters. 64 Additionally, if a strftime function is found in the Date object's prototype, 65 it will be used instead of the built-in formatter. 66 67 Axis tick labels now use the class 'flot-tick-label' instead of 'tickLabel'. 68 The text containers for each axis now use the classes 'flot-[x|y]-axis' and 69 'flot-[x|y]#-axis' instead of '[x|y]Axis' and '[x|y]#Axis'. For compatibility 70 with Flot 0.7 and earlier text will continue to use the old classes as well, 71 but they are considered deprecated and will be removed in a future version. 72 73 In previous versions the axis 'color' option was used to set the color of tick 74 marks and their label text. It now controls the color of the axis line, which 75 previously could not be changed separately, and continues to act as a default 76 for the tick-mark color. The color of tick label text is now set either by 77 overriding the 'flot-tick-label' CSS rule or via the axis 'font' option. 78 79 A new plugin, jquery.flot.canvas.js, allows axis tick labels to be rendered 80 directly to the canvas, rather than using HTML elements. This feature can be 81 toggled with a simple option, making it easy to create interactive plots in the 82 browser using HTML, then re-render them to canvas for export as an image. 83 84 The plugin tries to remain as faithful as possible to the original HTML render, 85 and goes so far as to automatically extract styles from CSS, to avoid having to 86 provide a separate set of styles when rendering to canvas. Due to limitations 87 of the canvas text API, the plugin cannot reproduce certain features, including 88 HTML markup embedded in labels, and advanced text styles such as 'em' units. 89 90 The plugin requires support for canvas text, which may not be present in some 91 older browsers, even if they support the canvas tag itself. To use the plugin 92 with these browsers try using a shim such as canvas-text or FlashCanvas. 93 94 The base and overlay canvas are now using the CSS classes "flot-base" and 95 "flot-overlay" to prevent accidental clashes (issue 540). 96 97 ### Changes ### 98 99 - Addition of nonstandard %q specifier to date/time formatting. (patch 100 by risicle, issue 49) 101 102 - Date/time formatting follows proper subset of strftime specifiers, and 103 support added for Date.prototype.strftime, if found. (patch by Mark Cote, 104 issues 419 and 558) 105 106 - Fixed display of year ticks. (patch by Mark Cote, issue 195) 107 108 - Support for time series moved to plugin. (patch by Mark Cote) 109 110 - Display time series in different time zones. (patch by Knut Forkalsrud, 111 issue 141) 112 113 - Added a canvas plugin to enable rendering axis tick labels to the canvas. 114 (sponsored by YCharts.com, implementation by Ole Laursen and David Schnur) 115 116 - Support for setting the interval between redraws of the overlay canvas with 117 redrawOverlayInterval. (suggested in issue 185) 118 119 - Support for multiple thresholds in thresholds plugin. (patch by Arnaud 120 Bellec, issue 523) 121 122 - Support for plotting categories/textual data directly with new categories 123 plugin. 124 125 - Tick generators now get the whole axis rather than just min/max. 126 127 - Added processOffset and drawBackground hooks. (suggested in issue 639) 128 129 - Added a grid "margin" option to set the space between the canvas edge and 130 the grid. 131 132 - Prevent the pie example page from generating single-slice pies. (patch by 133 Shane Reustle) 134 135 - In addition to "left" and "center", bars now recognize "right" as an 136 alignment option. (patch by Michael Mayer, issue 520) 137 138 - Switched from toFixed to a much faster default tickFormatter. (patch by 139 Clemens Stolle) 140 141 - Added to a more helpful error when using a time-mode axis without including 142 the flot.time plugin. (patch by Yael Elmatad) 143 144 - Added a legend "sorted" option to control sorting of legend entries 145 independent of their series order. (patch by Tom Cleaveland) 146 147 - Added a series "highlightColor" option to control the color of the 148 translucent overlay that identifies the dataset when the mouse hovers over 149 it. (patch by Eric Wendelin and Nate Abele, issues 168 and 299) 150 151 - Added a plugin jquery.flot.errorbars, with an accompanying example, that 152 adds the ability to plot error bars, commonly used in many kinds of 153 statistical data visualizations. (patch by Rui Pereira, issue 215) 154 155 - The legend now omits entries whose labelFormatter returns null. (patch by 156 Tom Cleaveland, Christopher Lambert, and Simon Strandgaard) 157 158 - Added support for high pixel density (retina) displays, resulting in much 159 crisper charts on such devices. (patch by Olivier Guerriat, additional 160 fixes by Julien Thomas, maimairel, and Lau Bech Lauritzen) 161 162 - Added the ability to control pie shadow position and alpha via a new pie 163 'shadow' option. (patch by Julien Thomas, pull request #78) 164 165 - Added the ability to set width and color for individual sides of the grid. 166 (patch by Ara Anjargolian, additional fixes by Karl Swedberg, pull requests #855 167 and #880) 168 169 - The selection plugin's getSelection now returns null when the selection 170 has been cleared. (patch by Nick Campbell, pull request #852) 171 172 - Added a new option called 'zero' to bars and filled lines series, to control 173 whether the y-axis minimum is scaled to fit the data or set to zero. 174 (patch by David Schnur, issues #316, #529, and #856, pull request #911) 175 176 - The plot function is now also a jQuery chainable property. 177 (patch by David Schnur, issues #734 and #816, pull request #953) 178 179 - When only a single pie slice is beneath the combine threshold it is no longer 180 replaced by an 'other' slice. (suggested by Devin Bayer, issue #638) 181 182 - Added lineJoin and minSize options to the selection plugin to control the 183 corner style and minimum size of the selection, respectively. 184 (patch by Ruth Linehan, pull request #963) 185 186 ### Bug fixes ### 187 188 - Fix problem with null values and pie plugin. (patch by gcruxifix, 189 issue 500) 190 191 - Fix problem with threshold plugin and bars. (based on patch by 192 kaarlenkaski, issue 348) 193 194 - Fix axis box calculations so the boxes include the outermost part of the 195 labels too. 196 197 - Fix problem with event clicking and hovering in IE 8 by updating Excanvas 198 and removing previous work-around. (test case by Ara Anjargolian) 199 200 - Fix issues with blurry 1px border when some measures aren't integer. 201 (reported by Ara Anjargolian) 202 203 - Fix bug with formats in the data processor. (reported by Peter Hull, 204 issue 534) 205 206 - Prevent i from being declared global in extractRange. (reported by 207 Alexander Obukhov, issue 627) 208 209 - Throw errors in a more cross-browser-compatible manner. (patch by 210 Eddie Kay) 211 212 - Prevent pie slice outlines from being drawn when the stroke width is zero. 213 (reported by Chris Minett, issue 585) 214 215 - Updated the navigate plugin's inline copy of jquery.mousewheel to fix 216 Webkit zoom problems. (reported by Hau Nguyen, issue 685) 217 218 - Axis labels no longer appear as decimals rather than integers in certain 219 cases. (patch by Clemens Stolle, issue 541) 220 221 - Automatic color generation no longer produces only whites and blacks when 222 there are many series. (patch by David Schnur and Tom Cleaveland) 223 224 - Fixed an error when custom tick labels weren't provided as strings. (patch 225 by Shad Downey) 226 227 - Prevented the local insertSteps and fmt variables from becoming global. 228 (first reported by Marc Bennewitz and Szymon Barglowski, patch by Nick 229 Campbell, issues #825 and #831, pull request #851) 230 231 - Prevented several threshold plugin variables from becoming global. (patch 232 by Lasse Dahl Ebert) 233 234 - Fixed various jQuery 1.8 compatibility issues. (issues #814 and #819, 235 pull request #877) 236 237 - Pie charts with a slice equal to or approaching 100% of the pie no longer 238 appear invisible. (patch by David Schnur, issues #444, #658, #726, #824 239 and #850, pull request #879) 240 241 - Prevented several local variables from becoming global. (patch by aaa707) 242 243 - Ensure that the overlay and primary canvases remain aligned. (issue #670, 244 pull request #901) 245 246 - Added support for jQuery 1.9 by removing and replacing uses of $.browser. 247 (analysis and patch by Anthony Ryan, pull request #905) 248 249 - Pie charts no longer disappear when redrawn during a resize or update. 250 (reported by Julien Bec, issue #656, pull request #910) 251 252 - Avoided floating-point precision errors when calculating pie percentages. 253 (patch by James Ward, pull request #918) 254 255 - Fixed compatibility with jQuery 1.2.6, which has no 'mouseleave' shortcut. 256 (reported by Bevan, original pull request #920, replaced by direct patch) 257 258 - Fixed sub-pixel rendering issues with crosshair and selection lines. 259 (patches by alanayoub and Daniel Shapiro, pull requests #17 and #925) 260 261 - Fixed rendering issues when using the threshold plugin with several series. 262 (patch by Ivan Novikov, pull request #934) 263 264 - Pie charts no longer disappear when redrawn after calling setData(). 265 (reported by zengge1984 and pareeohnos, issues #810 and #945) 266 267 - Added a work-around for the problem where points with a lineWidth of zero 268 still showed up with a visible line. (reported by SalvoSav, issue #842, 269 patch by Jamie Hamel-Smith, pull request #937) 270 271 - Pie charts now accept values in string form, like other plot types. 272 (reported by laerdal.no, issue #534) 273 274 - Avoid rounding errors in the threshold plugin. 275 (reported by jerikojerk, issue #895) 276 277 - Fixed an error when using the navigate plugin with jQuery 1.9.x or later. 278 (reported by Paolo Valleri, issue #964) 279 280 - Fixed inconsistencies between the highlight and unhighlight functions. 281 (reported by djamshed, issue #987) 282 283 - Fixed recalculation of tickSize and tickDecimals on calls to setupGrid. 284 (patch by thecountofzero, pull request #861, issues #860, #1000) 285 286 287 ## Flot 0.7 ## 288 289 ### API changes ### 290 291 Multiple axes support. Code using dual axes should be changed from using 292 x2axis/y2axis in the options to using an array (although backwards- 293 compatibility hooks are in place). For instance, 294 295 ```js 296 { 297 xaxis: { ... }, x2axis: { ... }, 298 yaxis: { ... }, y2axis: { ... } 299 } 300 ``` 301 302 becomes 303 304 ```js 305 { 306 xaxes: [ { ... }, { ... } ], 307 yaxes: [ { ... }, { ... } ] 308 } 309 ``` 310 311 Note that if you're just using one axis, continue to use the xaxis/yaxis 312 directly (it now sets the default settings for the arrays). Plugins touching 313 the axes must be ported to take the extra axes into account, check the source 314 to see some examples. 315 316 A related change is that the visibility of axes is now auto-detected. So if 317 you were relying on an axis to show up even without any data in the chart, you 318 now need to set the axis "show" option explicitly. 319 320 "tickColor" on the grid options is now deprecated in favour of a corresponding 321 option on the axes, so: 322 323 ```js 324 { grid: { tickColor: "#000" }} 325 ``` 326 327 becomes 328 329 ```js 330 { xaxis: { tickColor: "#000"}, yaxis: { tickColor: "#000"} } 331 ``` 332 333 But if you just configure a base color Flot will now autogenerate a tick color 334 by adding transparency. Backwards-compatibility hooks are in place. 335 336 Final note: now that IE 9 is coming out with canvas support, you may want to 337 adapt the excanvas include to skip loading it in IE 9 (the examples have been 338 adapted thanks to Ryley Breiddal). An alternative to excanvas using Flash has 339 also surfaced, if your graphs are slow in IE, you may want to give it a spin: 340 341 http://code.google.com/p/flashcanvas/ 342 343 ### Changes ### 344 345 - Support for specifying a bottom for each point for line charts when filling 346 them, this means that an arbitrary bottom can be used instead of just the x 347 axis. (based on patches patiently provided by Roman V. Prikhodchenko) 348 349 - New fillbetween plugin that can compute a bottom for a series from another 350 series, useful for filling areas between lines. 351 352 See new example percentiles.html for a use case. 353 354 - More predictable handling of gaps for the stacking plugin, now all 355 undefined ranges are skipped. 356 357 - Stacking plugin can stack horizontal bar charts. 358 359 - Navigate plugin now redraws the plot while panning instead of only after 360 the fact. (raised by lastthemy, issue 235) 361 362 Can be disabled by setting the pan.frameRate option to null. 363 364 - Date formatter now accepts %0m and %0d to get a zero-padded month or day. 365 (issue raised by Maximillian Dornseif) 366 367 - Revamped internals to support an unlimited number of axes, not just dual. 368 (sponsored by Flight Data Services, www.flightdataservices.com) 369 370 - New setting on axes, "tickLength", to control the size of ticks or turn 371 them off without turning off the labels. 372 373 - Axis labels are now put in container divs with classes, for instance labels 374 in the x axes can be reached via ".xAxis .tickLabel". 375 376 - Support for setting the color of an axis. (sponsored by Flight Data 377 Services, www.flightdataservices.com) 378 379 - Tick color is now auto-generated as the base color with some transparency, 380 unless you override it. 381 382 - Support for aligning ticks in the axes with "alignTicksWithAxis" to ensure 383 that they appear next to each other rather than in between, at the expense 384 of possibly awkward tick steps. (sponsored by Flight Data Services, 385 www.flightdataservices.com) 386 387 - Support for customizing the point type through a callback when plotting 388 points and new symbol plugin with some predefined point types. (sponsored 389 by Utility Data Corporation) 390 391 - Resize plugin for automatically redrawing when the placeholder changes 392 size, e.g. on window resizes. (sponsored by Novus Partners) 393 394 A resize() method has been added to plot object facilitate this. 395 396 - Support Infinity/-Infinity for plotting asymptotes by hacking it into 397 +/-Number.MAX_VALUE. (reported by rabaea.mircea) 398 399 - Support for restricting navigate plugin to not pan/zoom an axis. (based on 400 patch by kkaefer) 401 402 - Support for providing the drag cursor for the navigate plugin as an option. 403 (based on patch by Kelly T. Moore) 404 405 - Options for controlling whether an axis is shown or not (suggestion by Timo 406 Tuominen) and whether to reserve space for it even if it isn't shown. 407 408 - New attribute $.plot.version with the Flot version as a string. 409 410 - The version comment is now included in the minified jquery.flot.min.js. 411 412 - New options.grid.minBorderMargin for adjusting the minimum margin provided 413 around the border (based on patch by corani, issue 188). 414 415 - Refactor replot behaviour so Flot tries to reuse the existing canvas, 416 adding shutdown() methods to the plot. (based on patch by Ryley Breiddal, 417 issue 269) 418 419 This prevents a memory leak in Chrome and hopefully makes replotting faster 420 for those who are using $.plot instead of .setData()/.draw(). Also update 421 jQuery to 1.5.1 to prevent IE leaks fixed in jQuery. 422 423 - New real-time line chart example. 424 425 - New hooks: drawSeries, shutdown. 426 427 ### Bug fixes ### 428 429 - Fixed problem with findNearbyItem and bars on top of each other. (reported 430 by ragingchikn, issue 242) 431 432 - Fixed problem with ticks and the border. (based on patch from 433 ultimatehustler69, issue 236) 434 435 - Fixed problem with plugins adding options to the series objects. 436 437 - Fixed a problem introduced in 0.6 with specifying a gradient with: 438 439 ```{brightness: x, opacity: y }``` 440 441 - Don't use $.browser.msie, check for getContext on the created canvas element 442 instead and try to use excanvas if it's not found. 443 444 Fixes IE 9 compatibility. 445 446 - highlight(s, index) was looking up the point in the original s.data instead 447 of in the computed datapoints array, which breaks with plugins that modify 448 the datapoints, such as the stacking plugin. (reported by curlypaul924, 449 issue 316) 450 451 - More robust handling of axis from data passed in from getData(). (reported) 452 by Morgan) 453 454 - Fixed problem with turning off bar outline. (fix by Jordi Castells, 455 issue 253) 456 457 - Check the selection passed into setSelection in the selection 458 plugin, to guard against errors when synchronizing plots (fix by Lau 459 Bech Lauritzen). 460 461 - Fix bug in crosshair code with mouseout resetting the crosshair even 462 if it is locked (fix by Lau Bech Lauritzen and Banko Adam). 463 464 - Fix bug with points plotting using line width from lines rather than 465 points. 466 467 - Fix bug with passing non-array 0 data (for plugins that don't expect 468 arrays, patch by vpapp1). 469 470 - Fix errors in JSON in examples so they work with jQuery 1.4.2 471 (fix reported by honestbleeps, issue 357). 472 473 - Fix bug with tooltip in interacting.html, this makes the tooltip 474 much smoother (fix by bdkahn). Fix related bug inside highlighting 475 handler in Flot. 476 477 - Use closure trick to make inline colorhelpers plugin respect 478 jQuery.noConflict(true), renaming the global jQuery object (reported 479 by Nick Stielau). 480 481 - Listen for mouseleave events and fire a plothover event with empty 482 item when it occurs to drop highlights when the mouse leaves the 483 plot (reported by by outspirit). 484 485 - Fix bug with using aboveData with a background (reported by 486 amitayd). 487 488 - Fix possible excanvas leak (report and suggested fix by tom9729). 489 490 - Fix bug with backwards compatibility for shadowSize = 0 (report and 491 suggested fix by aspinak). 492 493 - Adapt examples to skip loading excanvas (fix by Ryley Breiddal). 494 495 - Fix bug that prevent a simple f(x) = -x transform from working 496 correctly (fix by Mike, issue 263). 497 498 - Fix bug in restoring cursor in navigate plugin (reported by Matteo 499 Gattanini, issue 395). 500 501 - Fix bug in picking items when transform/inverseTransform is in use 502 (reported by Ofri Raviv, and patches and analysis by Jan and Tom 503 Paton, issue 334 and 467). 504 505 - Fix problem with unaligned ticks and hover/click events caused by 506 padding on the placeholder by hardcoding the placeholder padding to 507 0 (reported by adityadineshsaxena, Matt Sommer, Daniel Atos and some 508 other people, issue 301). 509 510 - Update colorhelpers plugin to avoid dying when trying to parse an 511 invalid string (reported by cadavor, issue 483). 512 513 514 515 ## Flot 0.6 ## 516 517 ### API changes ### 518 519 Selection support has been moved to a plugin. Thus if you're passing 520 selection: { mode: something }, you MUST include the file 521 jquery.flot.selection.js after jquery.flot.js. This reduces the size of 522 base Flot and makes it easier to customize the selection as well as 523 improving code clarity. The change is based on a patch from andershol. 524 525 In the global options specified in the $.plot command, "lines", "points", 526 "bars" and "shadowSize" have been moved to a sub-object called "series": 527 528 ```js 529 $.plot(placeholder, data, { lines: { show: true }}) 530 ``` 531 532 should be changed to 533 534 ```js 535 $.plot(placeholder, data, { series: { lines: { show: true }}}) 536 ``` 537 538 All future series-specific options will go into this sub-object to 539 simplify plugin writing. Backward-compatibility code is in place, so 540 old code should not break. 541 542 "plothover" no longer provides the original data point, but instead a 543 normalized one, since there may be no corresponding original point. 544 545 Due to a bug in previous versions of jQuery, you now need at least 546 jQuery 1.2.6. But if you can, try jQuery 1.3.2 as it got some improvements 547 in event handling speed. 548 549 ## Changes ## 550 551 - Added support for disabling interactivity for specific data series. 552 (request from Ronald Schouten and Steve Upton) 553 554 - Flot now calls $() on the placeholder and optional legend container passed 555 in so you can specify DOM elements or CSS expressions to make it easier to 556 use Flot with libraries like Prototype or Mootools or through raw JSON from 557 Ajax responses. 558 559 - A new "plotselecting" event is now emitted while the user is making a 560 selection. 561 562 - The "plothover" event is now emitted immediately instead of at most 10 563 times per second, you'll have to put in a setTimeout yourself if you're 564 doing something really expensive on this event. 565 566 - The built-in date formatter can now be accessed as $.plot.formatDate(...) 567 (suggestion by Matt Manela) and even replaced. 568 569 - Added "borderColor" option to the grid. (patches from Amaury Chamayou and 570 Mike R. Williamson) 571 572 - Added support for gradient backgrounds for the grid. (based on patch from 573 Amaury Chamayou, issue 90) 574 575 The "setting options" example provides a demonstration. 576 577 - Gradient bars. (suggestion by stefpet) 578 579 - Added a "plotunselected" event which is triggered when the selection is 580 removed, see "selection" example. (suggestion by Meda Ugo) 581 582 - The option legend.margin can now specify horizontal and vertical margins 583 independently. (suggestion by someone who's annoyed) 584 585 - Data passed into Flot is now copied to a new canonical format to enable 586 further processing before it hits the drawing routines. As a side-effect, 587 this should make Flot more robust in the face of bad data. (issue 112) 588 589 - Step-wise charting: line charts have a new option "steps" that when set to 590 true connects the points with horizontal/vertical steps instead of diagonal 591 lines. 592 593 - The legend labelFormatter now passes the series in addition to just the 594 label. (suggestion by Vincent Lemeltier) 595 596 - Horizontal bars (based on patch by Jason LeBrun). 597 598 - Support for partial bars by specifying a third coordinate, i.e. they don't 599 have to start from the axis. This can be used to make stacked bars. 600 601 - New option to disable the (grid.show). 602 603 - Added pointOffset method for converting a point in data space to an offset 604 within the placeholder. 605 606 - Plugin system: register an init method in the $.flot.plugins array to get 607 started, see PLUGINS.txt for details on how to write plugins (it's easy). 608 There are also some extra methods to enable access to internal state. 609 610 - Hooks: you can register functions that are called while Flot is crunching 611 the data and doing the plot. This can be used to modify Flot without 612 changing the source, useful for writing plugins. Some hooks are defined, 613 more are likely to come. 614 615 - Threshold plugin: you can set a threshold and a color, and the data points 616 below that threshold will then get the color. Useful for marking data 617 below 0, for instance. 618 619 - Stack plugin: you can specify a stack key for each series to have them 620 summed. This is useful for drawing additive/cumulative graphs with bars and 621 (currently unfilled) lines. 622 623 - Crosshairs plugin: trace the mouse position on the axes, enable with 624 crosshair: { mode: "x"} (see the new tracking example for a use). 625 626 - Image plugin: plot prerendered images. 627 628 - Navigation plugin for panning and zooming a plot. 629 630 - More configurable grid. 631 632 - Axis transformation support, useful for non-linear plots, e.g. log axes and 633 compressed time axes (like omitting weekends). 634 635 - Support for twelve-hour date formatting (patch by Forrest Aldridge). 636 637 - The color parsing code in Flot has been cleaned up and split out so it's 638 now available as a separate jQuery plugin. It's included inline in the Flot 639 source to make dependency managing easier. This also makes it really easy 640 to use the color helpers in Flot plugins. 641 642 ## Bug fixes ## 643 644 - Fixed two corner-case bugs when drawing filled curves. (report and analysis 645 by Joshua Varner) 646 647 - Fix auto-adjustment code when setting min to 0 for an axis where the 648 dataset is completely flat on that axis. (report by chovy) 649 650 - Fixed a bug with passing in data from getData to setData when the secondary 651 axes are used. (reported by nperelman, issue 65) 652 653 - Fixed so that it is possible to turn lines off when no other chart type is 654 shown (based on problem reported by Glenn Vanderburg), and fixed so that 655 setting lineWidth to 0 also hides the shadow. (based on problem reported by 656 Sergio Nunes) 657 658 - Updated mousemove position expression to the latest from jQuery. (reported 659 by meyuchas) 660 661 - Use CSS borders instead of background in legend. (issues 25 and 45) 662 663 - Explicitly convert axis min/max to numbers. 664 665 - Fixed a bug with drawing marking lines with different colors. (reported by 666 Khurram) 667 668 - Fixed a bug with returning y2 values in the selection event. (fix by 669 exists, issue 75) 670 671 - Only set position relative on placeholder if it hasn't already a position 672 different from static. (reported by kyberneticist, issue 95) 673 674 - Don't round markings to prevent sub-pixel problems. (reported by 675 Dan Lipsitt) 676 677 - Make the grid border act similarly to a regular CSS border, i.e. prevent 678 it from overlapping the plot itself. This also fixes a problem with anti- 679 aliasing when the width is 1 pixel. (reported by Anthony Ettinger) 680 681 - Imported version 3 of excanvas and fixed two issues with the newer version. 682 Hopefully, this will make Flot work with IE8. (nudge by Fabien Menager, 683 further analysis by Booink, issue 133) 684 685 - Changed the shadow code for lines to hopefully look a bit better with 686 vertical lines. 687 688 - Round tick positions to avoid possible problems with fractions. (suggestion 689 by Fred, issue 130) 690 691 - Made the heuristic for determining how many ticks to aim for a bit smarter. 692 693 - Fix for uneven axis margins (report and patch by Paul Kienzle) and snapping 694 to ticks. (report and patch by lifthrasiir) 695 696 - Fixed bug with slicing in findNearbyItems. (patch by zollman) 697 698 - Make heuristic for x axis label widths more dynamic. (patch by 699 rickinhethuis) 700 701 - Make sure points on top take precedence when finding nearby points when 702 hovering. (reported by didroe, issue 224) 703 704 705 706 ## Flot 0.5 ## 707 708 Timestamps are now in UTC. Also "selected" event -> becomes "plotselected" 709 with new data, the parameters for setSelection are now different (but 710 backwards compatibility hooks are in place), coloredAreas becomes markings 711 with a new interface (but backwards compatibility hooks are in place). 712 713 ### API changes ### 714 715 Timestamps in time mode are now displayed according to UTC instead of the time 716 zone of the visitor. This affects the way the timestamps should be input; 717 you'll probably have to offset the timestamps according to your local time 718 zone. It also affects any custom date handling code (which basically now 719 should use the equivalent UTC date mehods, e.g. .setUTCMonth() instead of 720 .setMonth(). 721 722 Markings, previously coloredAreas, are now specified as ranges on the axes, 723 like ```{ xaxis: { from: 0, to: 10 }}```. Furthermore with markings you can 724 now draw horizontal/vertical lines by setting from and to to the same 725 coordinate. (idea from line support patch by by Ryan Funduk) 726 727 Interactivity: added a new "plothover" event and this and the "plotclick" 728 event now returns the closest data item (based on patch by /david, patch by 729 Mark Byers for bar support). See the revamped "interacting with the data" 730 example for some hints on what you can do. 731 732 Highlighting: you can now highlight points and datapoints are autohighlighted 733 when you hover over them (if hovering is turned on). 734 735 Support for dual axis has been added (based on patch by someone who's annoyed 736 and /david). For each data series you can specify which axes it belongs to, 737 and there are two more axes, x2axis and y2axis, to customize. This affects the 738 "selected" event which has been renamed to "plotselected" and spews out 739 ```{ xaxis: { from: -10, to: 20 } ... },``` setSelection in which the 740 parameters are on a new form (backwards compatible hooks are in place so old 741 code shouldn't break) and markings (formerly coloredAreas). 742 743 ## Changes ## 744 745 - Added support for specifying the size of tick labels (axis.labelWidth, 746 axis.labelHeight). Useful for specifying a max label size to keep multiple 747 plots aligned. 748 749 - The "fill" option can now be a number that specifies the opacity of the 750 fill. 751 752 - You can now specify a coordinate as null (like [2, null]) and Flot will 753 take the other coordinate into account when scaling the axes. (based on 754 patch by joebno) 755 756 - New option for bars "align". Set it to "center" to center the bars on the 757 value they represent. 758 759 - setSelection now takes a second parameter which you can use to prevent the 760 method from firing the "plotselected" handler. 761 762 - Improved the handling of axis auto-scaling with bars. 763 764 ## Bug fixes ## 765 766 - Fixed a bug in calculating spacing around the plot. (reported by 767 timothytoe) 768 769 - Fixed a bug in finding max values for all-negative data sets. 770 771 - Prevent the possibility of eternal looping in tick calculations. 772 773 - Fixed a bug when borderWidth is set to 0. (reported by Rob/sanchothefat) 774 775 - Fixed a bug with drawing bars extending below 0. (reported by James Hewitt, 776 patch by Ryan Funduk). 777 778 - Fixed a bug with line widths of bars. (reported by MikeM) 779 780 - Fixed a bug with 'nw' and 'sw' legend positions. 781 782 - Fixed a bug with multi-line x-axis tick labels. (reported by Luca Ciano, 783 IE-fix help by Savage Zhang) 784 785 - Using the "container" option in legend now overwrites the container element 786 instead of just appending to it, fixing the infinite legend bug. (reported 787 by several people, fix by Brad Dewey) 788 789 790 791 ## Flot 0.4 ## 792 793 ### API changes ### 794 795 Deprecated axis.noTicks in favor of just specifying the number as axis.ticks. 796 So ```xaxis: { noTicks: 10 }``` becomes ```xaxis: { ticks: 10 }```. 797 798 Time series support. Specify axis.mode: "time", put in Javascript timestamps 799 as data, and Flot will automatically spit out sensible ticks. Take a look at 800 the two new examples. The format can be customized with axis.timeformat and 801 axis.monthNames, or if that fails with axis.tickFormatter. 802 803 Support for colored background areas via grid.coloredAreas. Specify an array 804 of { x1, y1, x2, y2 } objects or a function that returns these given 805 { xmin, xmax, ymin, ymax }. 806 807 More members on the plot object (report by Chris Davies and others). 808 "getData" for inspecting the assigned settings on data series (e.g. color) and 809 "setData", "setupGrid" and "draw" for updating the contents without a total 810 replot. 811 812 The default number of ticks to aim for is now dependent on the size of the 813 plot in pixels. Support for customizing tick interval sizes directly with 814 axis.minTickSize and axis.tickSize. 815 816 Cleaned up the automatic axis scaling algorithm and fixed how it interacts 817 with ticks. Also fixed a couple of tick-related corner case bugs (one reported 818 by mainstreetmark, another reported by timothytoe). 819 820 The option axis.tickFormatter now takes a function with two parameters, the 821 second parameter is an optional object with information about the axis. It has 822 min, max, tickDecimals, tickSize. 823 824 ## Changes ## 825 826 - Added support for segmented lines. (based on patch from Michael MacDonald) 827 828 - Added support for ignoring null and bad values. (suggestion from Nick 829 Konidaris and joshwaihi) 830 831 - Added support for changing the border width. (thanks to joebno and safoo) 832 833 - Label colors can be changed via CSS by selecting the tickLabel class. 834 835 ## Bug fixes ## 836 837 - Fixed a bug in handling single-item bar series. (reported by Emil Filipov) 838 839 - Fixed erratic behaviour when interacting with the plot with IE 7. (reported 840 by Lau Bech Lauritzen). 841 842 - Prevent IE/Safari text selection when selecting stuff on the canvas. 843 844 845 846 ## Flot 0.3 ## 847 848 This is mostly a quick-fix release because jquery.js wasn't included in the 849 previous zip/tarball. 850 851 ## Changes ## 852 853 - Include jquery.js in the zip/tarball. 854 855 - Support clicking on the plot. Turn it on with grid: { clickable: true }, 856 then you get a "plotclick" event on the graph placeholder with the position 857 in units of the plot. 858 859 ## Bug fixes ## 860 861 - Fixed a bug in dealing with data where min = max. (thanks to Michael 862 Messinides) 863 864 865 866 ## Flot 0.2 ## 867 868 The API should now be fully documented. 869 870 ### API changes ### 871 872 Moved labelMargin option to grid from x/yaxis. 873 874 ## Changes ## 875 876 - Added support for putting a background behind the default legend. The 877 default is the partly transparent background color. Added backgroundColor 878 and backgroundOpacity to the legend options to control this. 879 880 - The ticks options can now be a callback function that takes one parameter, 881 an object with the attributes min and max. The function should return a 882 ticks array. 883 884 - Added labelFormatter option in legend, useful for turning the legend 885 labels into links. 886 887 - Reduced the size of the code. (patch by Guy Fraser) 888 889 890 891 ## Flot 0.1 ## 892 893 First public release.