NEWS.txt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. Flot 0.7
  2. --------
  3. API changes:
  4. Multiple axes support. Code using dual axes should be changed from
  5. using x2axis/y2axis in the options to using an array (although
  6. backwards-compatibility hooks are in place). For instance,
  7. {
  8. xaxis: { ... }, x2axis: { ... },
  9. yaxis: { ... }, y2axis: { ... }
  10. }
  11. becomes
  12. {
  13. xaxes: [ { ... }, { ... } ],
  14. yaxes: [ { ... }, { ... } ]
  15. }
  16. Note that if you're just using one axis, continue to use the
  17. xaxis/yaxis directly (it now sets the default settings for the
  18. arrays). Plugins touching the axes must be ported to take the extra
  19. axes into account, check the source to see some examples.
  20. A related change is that the visibility of axes is now auto-detected.
  21. So if you were relying on an axis to show up even without any data in
  22. the chart, you now need to set the axis "show" option explicitly.
  23. "tickColor" on the grid options is now deprecated in favour of a
  24. corresponding option on the axes, so { grid: { tickColor: "#000" }}
  25. becomes { xaxis: { tickColor: "#000"}, yaxis: { tickColor: "#000"} },
  26. but if you just configure a base color Flot will now autogenerate a
  27. tick color by adding transparency. Backwards-compatibility hooks are
  28. in place.
  29. Final note: now that IE 9 is coming out with canvas support, you may
  30. want to adapt the excanvas include to skip loading it in IE 9 (the
  31. examples have been adapted thanks to Ryley Breiddal). An alternative
  32. to excanvas using Flash has also surfaced, if your graphs are slow in
  33. IE, you may want to give it a spin:
  34. http://code.google.com/p/flashcanvas/
  35. Changes:
  36. - Support for specifying a bottom for each point for line charts when
  37. filling them, this means that an arbitrary bottom can be used
  38. instead of just the x axis (based on patches patiently provided by
  39. Roman V. Prikhodchenko).
  40. - New fillbetween plugin that can compute a bottom for a series from
  41. another series, useful for filling areas between lines (see new
  42. example percentiles.html for a use case).
  43. - More predictable handling of gaps for the stacking plugin, now all
  44. undefined ranges are skipped.
  45. - Stacking plugin can stack horizontal bar charts.
  46. - Navigate plugin now redraws the plot while panning instead of only
  47. after the fact (can be disabled by setting the pan.frameRate option
  48. to null), raised by lastthemy (issue 235).
  49. - Date formatter now accepts %0m and %0d to get a zero-padded month or
  50. day (issue raised by Maximillian Dornseif).
  51. - Revamped internals to support an unlimited number of axes, not just
  52. dual (sponsored by Flight Data Services,
  53. www.flightdataservices.com).
  54. - New setting on axes, "tickLength", to control the size of ticks or
  55. turn them off without turning off the labels.
  56. - Axis labels are now put in container divs with classes, for instance
  57. labels in the x axes can be reached via ".xAxis .tickLabel".
  58. - Support for setting the color of an axis (sponsored by Flight Data
  59. Services, www.flightdataservices.com).
  60. - Tick color is now auto-generated as the base color with some
  61. transparency (unless you override it).
  62. - Support for aligning ticks in the axes with "alignTicksWithAxis" to
  63. ensure that they appear next to each other rather than in between,
  64. at the expense of possibly awkward tick steps (sponsored by Flight
  65. Data Services, www.flightdataservices.com).
  66. - Support for customizing the point type through a callback when
  67. plotting points and new symbol plugin with some predefined point
  68. types (sponsored by Utility Data Corporation).
  69. - Resize plugin for automatically redrawing when the placeholder
  70. changes size, e.g. on window resizes (sponsored by Novus Partners).
  71. A resize() method has been added to plot object facilitate this.
  72. - Support Infinity/-Infinity for plotting asymptotes by hacking it
  73. into +/-Number.MAX_VALUE (reported by rabaea.mircea).
  74. - Support for restricting navigate plugin to not pan/zoom an axis (based
  75. on patch by kkaefer).
  76. - Support for providing the drag cursor for the navigate plugin as an
  77. option (based on patch by Kelly T. Moore).
  78. - Options for controlling whether an axis is shown or not (suggestion
  79. by Timo Tuominen) and whether to reserve space for it even if it
  80. isn't shown.
  81. - New attribute $.plot.version with the Flot version as a string.
  82. - The version comment is now included in the minified jquery.flot.min.js.
  83. - New options.grid.minBorderMargin for adjusting the minimum margin
  84. provided around the border (based on patch by corani, issue 188).
  85. - Refactor replot behaviour so Flot tries to reuse the existing
  86. canvas, adding shutdown() methods to the plot (based on patch by
  87. Ryley Breiddal, issue 269). This prevents a memory leak in Chrome
  88. and hopefully makes replotting faster for those who are using $.plot
  89. instead of .setData()/.draw(). Also update jQuery to 1.5.1 to
  90. prevent IE leaks fixed in jQuery.
  91. - New real-time line chart example.
  92. - New hooks: drawSeries, shutdown
  93. Bug fixes:
  94. - Fixed problem with findNearbyItem and bars on top of each other
  95. (reported by ragingchikn, issue 242).
  96. - Fixed problem with ticks and the border (based on patch from
  97. ultimatehustler69, issue 236).
  98. - Fixed problem with plugins adding options to the series objects.
  99. - Fixed a problem introduced in 0.6 with specifying a gradient with {
  100. brightness: x, opacity: y }.
  101. - Don't use $.browser.msie, check for getContext on the created canvas
  102. element instead and try to use excanvas if it's not found (fixes IE
  103. 9 compatibility).
  104. - highlight(s, index) was looking up the point in the original s.data
  105. instead of in the computed datapoints array, which breaks with
  106. plugins that modify the datapoints (such as the stacking plugin).
  107. Issue 316 reported by curlypaul924.
  108. - More robust handling of axis from data passed in from getData()
  109. (problem reported by Morgan).
  110. - Fixed problem with turning off bar outline (issue 253, fix by Jordi
  111. Castells).
  112. - Check the selection passed into setSelection in the selection
  113. plugin, to guard against errors when synchronizing plots (fix by Lau
  114. Bech Lauritzen).
  115. - Fix bug in crosshair code with mouseout resetting the crosshair even
  116. if it is locked (fix by Lau Bech Lauritzen and Banko Adam).
  117. - Fix bug with points plotting using line width from lines rather than
  118. points.
  119. - Fix bug with passing non-array 0 data (for plugins that don't expect
  120. arrays, patch by vpapp1).
  121. - Fix errors in JSON in examples so they work with jQuery 1.4.2
  122. (fix reported by honestbleeps, issue 357).
  123. - Fix bug with tooltip in interacting.html, this makes the tooltip
  124. much smoother (fix by bdkahn). Fix related bug inside highlighting
  125. handler in Flot.
  126. - Use closure trick to make inline colorhelpers plugin respect
  127. jQuery.noConflict(true), renaming the global jQuery object (reported
  128. by Nick Stielau).
  129. - Listen for mouseleave events and fire a plothover event with empty
  130. item when it occurs to drop highlights when the mouse leaves the
  131. plot (reported by by outspirit).
  132. - Fix bug with using aboveData with a background (reported by
  133. amitayd).
  134. - Fix possible excanvas leak (report and suggested fix by tom9729).
  135. - Fix bug with backwards compatibility for shadowSize = 0 (report and
  136. suggested fix by aspinak).
  137. - Adapt examples to skip loading excanvas (fix by Ryley Breiddal).
  138. - Fix bug that prevent a simple f(x) = -x transform from working
  139. correctly (fix by Mike, issue 263).
  140. - Fix bug in restoring cursor in navigate plugin (reported by Matteo
  141. Gattanini, issue 395).
  142. - Fix bug in picking items when transform/inverseTransform is in use
  143. (reported by Ofri Raviv, and patches and analysis by Jan and Tom
  144. Paton, issue 334 and 467).
  145. - Fix problem with unaligned ticks and hover/click events caused by
  146. padding on the placeholder by hardcoding the placeholder padding to
  147. 0 (reported by adityadineshsaxena, Matt Sommer, Daniel Atos and some
  148. other people, issue 301).
  149. - Update colorhelpers plugin to avoid dying when trying to parse an
  150. invalid string (reported by cadavor, issue 483).
  151. Flot 0.6
  152. --------
  153. API changes:
  154. 1. Selection support has been moved to a plugin. Thus if you're
  155. passing selection: { mode: something }, you MUST include the file
  156. jquery.flot.selection.js after jquery.flot.js. This reduces the size
  157. of base Flot and makes it easier to customize the selection as well as
  158. improving code clarity. The change is based on a patch from andershol.
  159. 2. In the global options specified in the $.plot command,
  160. "lines", "points", "bars" and "shadowSize" have been moved to a
  161. sub-object called "series", i.e.
  162. $.plot(placeholder, data, { lines: { show: true }})
  163. should be changed to
  164. $.plot(placeholder, data, { series: { lines: { show: true }}})
  165. All future series-specific options will go into this sub-object to
  166. simplify plugin writing. Backward-compatibility code is in place, so
  167. old code should not break.
  168. 3. "plothover" no longer provides the original data point, but instead
  169. a normalized one, since there may be no corresponding original point.
  170. 4. Due to a bug in previous versions of jQuery, you now need at least
  171. jQuery 1.2.6. But if you can, try jQuery 1.3.2 as it got some
  172. improvements in event handling speed.
  173. Changes:
  174. - Added support for disabling interactivity for specific data series
  175. (request from Ronald Schouten and Steve Upton).
  176. - Flot now calls $() on the placeholder and optional legend container
  177. passed in so you can specify DOM elements or CSS expressions to make
  178. it easier to use Flot with libraries like Prototype or Mootools or
  179. through raw JSON from Ajax responses.
  180. - A new "plotselecting" event is now emitted while the user is making
  181. a selection.
  182. - The "plothover" event is now emitted immediately instead of at most
  183. 10 times per second, you'll have to put in a setTimeout yourself if
  184. you're doing something really expensive on this event.
  185. - The built-in date formatter can now be accessed as
  186. $.plot.formatDate(...) (suggestion by Matt Manela) and even
  187. replaced.
  188. - Added "borderColor" option to the grid (patch from Amaury Chamayou
  189. and patch from Mike R. Williamson).
  190. - Added support for gradient backgrounds for the grid, take a look at
  191. the "setting options" example (based on patch from Amaury Chamayou,
  192. issue 90).
  193. - Gradient bars (suggestion by stefpet).
  194. - Added a "plotunselected" event which is triggered when the selection
  195. is removed, see "selection" example (suggestion by Meda Ugo);
  196. - The option legend.margin can now specify horizontal and vertical
  197. margins independently (suggestion by someone who's annoyed).
  198. - Data passed into Flot is now copied to a new canonical format to
  199. enable further processing before it hits the drawing routines. As a
  200. side-effect, this should make Flot more robust in the face of bad
  201. data (and fixes issue 112).
  202. - Step-wise charting: line charts have a new option "steps" that when
  203. set to true connects the points with horizontal/vertical steps
  204. instead of diagonal lines.
  205. - The legend labelFormatter now passes the series in addition to just
  206. the label (suggestion by Vincent Lemeltier).
  207. - Horizontal bars (based on patch by Jason LeBrun).
  208. - Support for partial bars by specifying a third coordinate, i.e. they
  209. don't have to start from the axis. This can be used to make stacked
  210. bars.
  211. - New option to disable the (grid.show).
  212. - Added pointOffset method for converting a point in data space to an
  213. offset within the placeholder.
  214. - Plugin system: register an init method in the $.flot.plugins array
  215. to get started, see PLUGINS.txt for details on how to write plugins
  216. (it's easy). There are also some extra methods to enable access to
  217. internal state.
  218. - Hooks: you can register functions that are called while Flot is
  219. crunching the data and doing the plot. This can be used to modify
  220. Flot without changing the source, useful for writing plugins. Some
  221. hooks are defined, more are likely to come.
  222. - Threshold plugin: you can set a threshold and a color, and the data
  223. points below that threshold will then get the color. Useful for
  224. marking data below 0, for instance.
  225. - Stack plugin: you can specify a stack key for each series to have
  226. them summed. This is useful for drawing additive/cumulative graphs
  227. with bars and (currently unfilled) lines.
  228. - Crosshairs plugin: trace the mouse position on the axes, enable with
  229. crosshair: { mode: "x"} (see the new tracking example for a use).
  230. - Image plugin: plot prerendered images.
  231. - Navigation plugin for panning and zooming a plot.
  232. - More configurable grid.
  233. - Axis transformation support, useful for non-linear plots, e.g. log
  234. axes and compressed time axes (like omitting weekends).
  235. - Support for twelve-hour date formatting (patch by Forrest Aldridge).
  236. - The color parsing code in Flot has been cleaned up and split out so
  237. it's now available as a separate jQuery plugin. It's included inline
  238. in the Flot source to make dependency managing easier. This also
  239. makes it really easy to use the color helpers in Flot plugins.
  240. Bug fixes:
  241. - Fixed two corner-case bugs when drawing filled curves (report and
  242. analysis by Joshua Varner).
  243. - Fix auto-adjustment code when setting min to 0 for an axis where the
  244. dataset is completely flat on that axis (report by chovy).
  245. - Fixed a bug with passing in data from getData to setData when the
  246. secondary axes are used (issue 65, reported by nperelman).
  247. - Fixed so that it is possible to turn lines off when no other chart
  248. type is shown (based on problem reported by Glenn Vanderburg), and
  249. fixed so that setting lineWidth to 0 also hides the shadow (based on
  250. problem reported by Sergio Nunes).
  251. - Updated mousemove position expression to the latest from jQuery (bug
  252. reported by meyuchas).
  253. - Use CSS borders instead of background in legend (fix printing issue 25
  254. and 45).
  255. - Explicitly convert axis min/max to numbers.
  256. - Fixed a bug with drawing marking lines with different colors
  257. (reported by Khurram).
  258. - Fixed a bug with returning y2 values in the selection event (fix
  259. by exists, issue 75).
  260. - Only set position relative on placeholder if it hasn't already a
  261. position different from static (reported by kyberneticist, issue 95).
  262. - Don't round markings to prevent sub-pixel problems (reported by Dan
  263. Lipsitt).
  264. - Make the grid border act similarly to a regular CSS border, i.e.
  265. prevent it from overlapping the plot itself. This also fixes a
  266. problem with anti-aliasing when the width is 1 pixel (reported by
  267. Anthony Ettinger).
  268. - Imported version 3 of excanvas and fixed two issues with the newer
  269. version. Hopefully, this will make Flot work with IE8 (nudge by
  270. Fabien Menager, further analysis by Booink, issue 133).
  271. - Changed the shadow code for lines to hopefully look a bit better
  272. with vertical lines.
  273. - Round tick positions to avoid possible problems with fractions
  274. (suggestion by Fred, issue 130).
  275. - Made the heuristic for determining how many ticks to aim for a bit
  276. smarter.
  277. - Fix for uneven axis margins (report and patch by Paul Kienzle) and
  278. snapping to ticks (concurrent report and patch by lifthrasiir).
  279. - Fixed bug with slicing in findNearbyItems (patch by zollman).
  280. - Make heuristic for x axis label widths more dynamic (patch by
  281. rickinhethuis).
  282. - Make sure points on top take precedence when finding nearby points
  283. when hovering (reported by didroe, issue 224).
  284. Flot 0.5
  285. --------
  286. Backwards API change summary: Timestamps are now in UTC. Also
  287. "selected" event -> becomes "plotselected" with new data, the
  288. parameters for setSelection are now different (but backwards
  289. compatibility hooks are in place), coloredAreas becomes markings with
  290. a new interface (but backwards compatibility hooks are in place).
  291. Interactivity: added a new "plothover" event and this and the
  292. "plotclick" event now returns the closest data item (based on patch by
  293. /david, patch by Mark Byers for bar support). See the revamped
  294. "interacting with the data" example for some hints on what you can do.
  295. Highlighting: you can now highlight points and datapoints are
  296. autohighlighted when you hover over them (if hovering is turned on).
  297. Support for dual axis has been added (based on patch by someone who's
  298. annoyed and /david). For each data series you can specify which axes
  299. it belongs to, and there are two more axes, x2axis and y2axis, to
  300. customize. This affects the "selected" event which has been renamed to
  301. "plotselected" and spews out { xaxis: { from: -10, to: 20 } ... },
  302. setSelection in which the parameters are on a new form (backwards
  303. compatible hooks are in place so old code shouldn't break) and
  304. markings (formerly coloredAreas).
  305. Timestamps in time mode are now displayed according to
  306. UTC instead of the time zone of the visitor. This affects the way the
  307. timestamps should be input; you'll probably have to offset the
  308. timestamps according to your local time zone. It also affects any
  309. custom date handling code (which basically now should use the
  310. equivalent UTC date mehods, e.g. .setUTCMonth() instead of
  311. .setMonth().
  312. Added support for specifying the size of tick labels (axis.labelWidth,
  313. axis.labelHeight). Useful for specifying a max label size to keep
  314. multiple plots aligned.
  315. Markings, previously coloredAreas, are now specified as ranges on the
  316. axes, like { xaxis: { from: 0, to: 10 }}. Furthermore with markings
  317. you can now draw horizontal/vertical lines by setting from and to to
  318. the same coordinate (idea from line support patch by by Ryan Funduk).
  319. The "fill" option can now be a number that specifies the opacity of
  320. the fill.
  321. You can now specify a coordinate as null (like [2, null]) and Flot
  322. will take the other coordinate into account when scaling the axes
  323. (based on patch by joebno).
  324. New option for bars "align". Set it to "center" to center the bars on
  325. the value they represent.
  326. setSelection now takes a second parameter which you can use to prevent
  327. the method from firing the "plotselected" handler.
  328. Using the "container" option in legend now overwrites the container
  329. element instead of just appending to it (fixes infinite legend bug,
  330. reported by several people, fix by Brad Dewey).
  331. Fixed a bug in calculating spacing around the plot (reported by
  332. timothytoe). Fixed a bug in finding max values for all-negative data
  333. sets. Prevent the possibility of eternal looping in tick calculations.
  334. Fixed a bug when borderWidth is set to 0 (reported by
  335. Rob/sanchothefat). Fixed a bug with drawing bars extending below 0
  336. (reported by James Hewitt, patch by Ryan Funduk). Fixed a
  337. bug with line widths of bars (reported by MikeM). Fixed a bug with
  338. 'nw' and 'sw' legend positions. Improved the handling of axis
  339. auto-scaling with bars. Fixed a bug with multi-line x-axis tick
  340. labels (reported by Luca Ciano). IE-fix help by Savage Zhang.
  341. Flot 0.4
  342. --------
  343. API changes: deprecated axis.noTicks in favor of just specifying the
  344. number as axis.ticks. So "xaxis: { noTicks: 10 }" becomes
  345. "xaxis: { ticks: 10 }"
  346. Time series support. Specify axis.mode: "time", put in Javascript
  347. timestamps as data, and Flot will automatically spit out sensible
  348. ticks. Take a look at the two new examples. The format can be
  349. customized with axis.timeformat and axis.monthNames, or if that fails
  350. with axis.tickFormatter.
  351. Support for colored background areas via grid.coloredAreas. Specify an
  352. array of { x1, y1, x2, y2 } objects or a function that returns these
  353. given { xmin, xmax, ymin, ymax }.
  354. More members on the plot object (report by Chris Davies and others).
  355. "getData" for inspecting the assigned settings on data series (e.g.
  356. color) and "setData", "setupGrid" and "draw" for updating the contents
  357. without a total replot.
  358. The default number of ticks to aim for is now dependent on the size of
  359. the plot in pixels. Support for customizing tick interval sizes
  360. directly with axis.minTickSize and axis.tickSize.
  361. Cleaned up the automatic axis scaling algorithm and fixed how it
  362. interacts with ticks. Also fixed a couple of tick-related corner case
  363. bugs (one reported by mainstreetmark, another reported by timothytoe).
  364. The option axis.tickFormatter now takes a function with two
  365. parameters, the second parameter is an optional object with
  366. information about the axis. It has min, max, tickDecimals, tickSize.
  367. Added support for segmented lines (based on patch from Michael
  368. MacDonald) and for ignoring null and bad values (suggestion from Nick
  369. Konidaris and joshwaihi).
  370. Added support for changing the border width (joebno and safoo).
  371. Label colors can be changed via CSS by selecting the tickLabel class.
  372. Fixed a bug in handling single-item bar series (reported by Emil
  373. Filipov). Fixed erratic behaviour when interacting with the plot
  374. with IE 7 (reported by Lau Bech Lauritzen). Prevent IE/Safari text
  375. selection when selecting stuff on the canvas.
  376. Flot 0.3
  377. --------
  378. This is mostly a quick-fix release because jquery.js wasn't included
  379. in the previous zip/tarball.
  380. Support clicking on the plot. Turn it on with grid: { clickable: true },
  381. then you get a "plotclick" event on the graph placeholder with the
  382. position in units of the plot.
  383. Fixed a bug in dealing with data where min = max, thanks to Michael
  384. Messinides.
  385. Include jquery.js in the zip/tarball.
  386. Flot 0.2
  387. --------
  388. Added support for putting a background behind the default legend. The
  389. default is the partly transparent background color. Added
  390. backgroundColor and backgroundOpacity to the legend options to control
  391. this.
  392. The ticks options can now be a callback function that takes one
  393. parameter, an object with the attributes min and max. The function
  394. should return a ticks array.
  395. Added labelFormatter option in legend, useful for turning the legend
  396. labels into links.
  397. Fixed a couple of bugs.
  398. The API should now be fully documented.
  399. Patch from Guy Fraser to make parts of the code smaller.
  400. API changes: Moved labelMargin option to grid from x/yaxis.
  401. Flot 0.1
  402. --------
  403. First public release.