Statistics
| Revision:

root / hci / trunk / eneraptor-web-app / web-app / js / flot / NEWS.txt @ 11

History | View | Annotate | Download (13.4 KB)

1
Flot 0.6
2
--------
3

    
4
API changes:
5

    
6
1. Selection support has been moved to a plugin. Thus if you're
7
passing selection: { mode: something }, you MUST include the file
8
jquery.flot.selection.js after jquery.flot.js. This reduces the size
9
of base Flot and makes it easier to customize the selection as well as
10
improving code clarity. The change is based on patch from andershol.
11

    
12
2. In the global options specified in the $.plot command,
13
"lines", "points", "bars" and "shadowSize" have been moved to a
14
sub-object called "series", i.e.
15

    
16
  $.plot(placeholder, data, { lines: { show: true }})
17

    
18
should be changed to
19

    
20
  $.plot(placeholder, data, { series: { lines: { show: true }}})
21

    
22
All future series-specific options will go into this sub-object to
23
simplify plugin writing. Backward-compatibility code is in place, so
24
old code should not break.
25

    
26
3. "plothover" no longer provides the original data point, but instead
27
a normalized one, since there may be no corresponding original point.
28

    
29
4. Due to a bug in previous versions of jQuery, you now need at least
30
jQuery 1.2.6. But if you can, try jQuery 1.3.2 as it got some
31
improvements in event handling speed.
32

    
33

    
34
Changes:
35

    
36
- Added support for disabling interactivity for specific data series
37
  (request from Ronald Schouten and Steve Upton).
38

    
39
- Flot now calls $() on the placeholder and optional legend container
40
  passed in so you can specify DOM elements or CSS expressions to make
41
  it easier to use Flot with libraries like Prototype or Mootools or
42
  through raw JSON from Ajax responses.
43

    
44
- A new "plotselecting" event is now emitted while the user is making
45
  a selection.
46

    
47
- The "plothover" event is now emitted immediately instead of at most
48
  10 times per second, you'll have to put in a setTimeout yourself if
49
  you're doing something really expensive on this event.
50

    
51
- The built-in date formatter can now be accessed as
52
  $.plot.formatDate(...) (suggestion by Matt Manela) and even
53
  replaced.
54

    
55
- Added "borderColor" option to the grid (patch from Amaury Chamayou
56
  and patch from Mike R. Williamson).
57

    
58
- Added support for gradient backgrounds for the grid, take a look at
59
  the "setting options" example (based on patch from Amaury Chamayou,
60
  issue 90).
61

    
62
- Gradient bars (suggestion by stefpet).
63
  
64
- Added a "plotunselected" event which is triggered when the selection
65
  is removed, see "selection" example (suggestion by Meda Ugo);
66

    
67
- The option legend.margin can now specify horizontal and vertical
68
  margins independently (suggestion by someone who's annoyed).
69

    
70
- Data passed into Flot is now copied to a new canonical format to
71
  enable further processing before it hits the drawing routines. As a
72
  side-effect, this should make Flot more robust in the face of bad
73
  data (and fixes issue 112).
74

    
75
- Step-wise charting: line charts have a new option "steps" that when
76
  set to true connects the points with horizontal/vertical steps
77
  instead of diagonal lines.
78

    
79
- The legend labelFormatter now passes the series in addition to just
80
  the label (suggestion by Vincent Lemeltier).
81

    
82
- Horizontal bars (based on patch by Jason LeBrun).
83

    
84
- Support for partial bars by specifying a third coordinate, i.e. they
85
  don't have to start from the axis. This can be used to make stacked
86
  bars.
87

    
88
- New option to disable the (grid.show).
89

    
90
- Added pointOffset method for converting a point in data space to an
91
  offset within the placeholder.
92
  
93
- Plugin system: register an init method in the $.flot.plugins array
94
  to get started, see PLUGINS.txt for details on how to write plugins
95
  (it's easy). There are also some extra methods to enable access to
96
  internal state.
97

    
98
- Hooks: you can register functions that are called while Flot is
99
  crunching the data and doing the plot. This can be used to modify
100
  Flot without changing the source, useful for writing plugins. Some
101
  hooks are defined, more are likely to come.
102
  
103
- Threshold plugin: you can set a threshold and a color, and the data
104
  points below that threshold will then get the color. Useful for
105
  marking data below 0, for instance.
106

    
107
- Stack plugin: you can specify a stack key for each series to have
108
  them summed. This is useful for drawing additive/cumulative graphs
109
  with bars and (currently unfilled) lines.
110

    
111
- Crosshairs plugin: trace the mouse position on the axes, enable with
112
  crosshair: { mode: "x"} (see the new tracking example for a use).
113

    
114
- Image plugin: plot prerendered images.
115

    
116
- Navigation plugin for panning and zooming a plot.
117

    
118
- More configurable grid.
119

    
120
- Axis transformation support, useful for non-linear plots, e.g. log
121
  axes and compressed time axes (like omitting weekends).
122

    
123
- Support for twelve-hour date formatting (patch by Forrest Aldridge).
124

    
125
- The color parsing code in Flot has been cleaned up and split out so
126
  it's now available as a separate jQuery plugin. It's included inline
127
  in the Flot source to make dependency managing easier. This also
128
  makes it really easy to use the color helpers in Flot plugins.
129

    
130
Bug fixes:
131

    
132
- Fixed two corner-case bugs when drawing filled curves (report and
133
  analysis by Joshua Varner).
134
- Fix auto-adjustment code when setting min to 0 for an axis where the
135
  dataset is completely flat on that axis (report by chovy).
136
- Fixed a bug with passing in data from getData to setData when the
137
  secondary axes are used (issue 65, reported by nperelman).
138
- Fixed so that it is possible to turn lines off when no other chart
139
  type is shown (based on problem reported by Glenn Vanderburg), and
140
  fixed so that setting lineWidth to 0 also hides the shadow (based on
141
  problem reported by Sergio Nunes).
142
- Updated mousemove position expression to the latest from jQuery (bug
143
  reported by meyuchas).
144
- Use CSS borders instead of background in legend (fix printing issue 25
145
  and 45).
146
- Explicitly convert axis min/max to numbers.
147
- Fixed a bug with drawing marking lines with different colors
148
  (reported by Khurram).
149
- Fixed a bug with returning y2 values in the selection event (fix
150
  by exists, issue 75).
151
- Only set position relative on placeholder if it hasn't already a
152
  position different from static (reported by kyberneticist, issue 95).
153
- Don't round markings to prevent sub-pixel problems (reported by Dan
154
  Lipsitt).
155
- Make the grid border act similarly to a regular CSS border, i.e.
156
  prevent it from overlapping the plot itself. This also fixes a
157
  problem with anti-aliasing when the width is 1 pixel (reported by
158
  Anthony Ettinger).
159
- Imported version 3 of excanvas and fixed two issues with the newer
160
  version. Hopefully, this will make Flot work with IE8 (nudge by
161
  Fabien Menager, further analysis by Booink, issue 133).
162
- Changed the shadow code for lines to hopefully look a bit better
163
  with vertical lines.
164
- Round tick positions to avoid possible problems with fractions
165
  (suggestion by Fred, issue 130).
166
- Made the heuristic for determining how many ticks to aim for a bit
167
  smarter.
168
- Fix for uneven axis margins (report and patch by Paul Kienzle) and
169
  snapping to ticks (concurrent report and patch by lifthrasiir).
170
- Fixed bug with slicing in findNearbyItems (patch by zollman).
171
- Make heuristic for x axis label widths more dynamic (patch by
172
  rickinhethuis).
173
- Make sure points on top take precedence when finding nearby points
174
  when hovering (reported by didroe, issue 224).
175

    
176
Flot 0.5
177
--------
178

    
179
Backwards API change summary: Timestamps are now in UTC. Also
180
"selected" event -> becomes "plotselected" with new data, the
181
parameters for setSelection are now different (but backwards
182
compatibility hooks are in place), coloredAreas becomes markings with
183
a new interface (but backwards compatibility hooks are in place).
184

    
185

    
186
Interactivity: added a new "plothover" event and this and the
187
"plotclick" event now returns the closest data item (based on patch by
188
/david, patch by Mark Byers for bar support). See the revamped
189
"interacting with the data" example for some hints on what you can do.
190

    
191
Highlighting: you can now highlight points and datapoints are
192
autohighlighted when you hover over them (if hovering is turned on).
193

    
194
Support for dual axis has been added (based on patch by someone who's
195
annoyed and /david). For each data series you can specify which axes
196
it belongs to, and there are two more axes, x2axis and y2axis, to
197
customize. This affects the "selected" event which has been renamed to
198
"plotselected" and spews out { xaxis: { from: -10, to: 20 } ... },
199
setSelection in which the parameters are on a new form (backwards
200
compatible hooks are in place so old code shouldn't break) and
201
markings (formerly coloredAreas).
202

    
203
Timestamps in time mode are now displayed according to
204
UTC instead of the time zone of the visitor. This affects the way the
205
timestamps should be input; you'll probably have to offset the
206
timestamps according to your local time zone. It also affects any
207
custom date handling code (which basically now should use the
208
equivalent UTC date mehods, e.g. .setUTCMonth() instead of
209
.setMonth().
210

    
211
Added support for specifying the size of tick labels (axis.labelWidth,
212
axis.labelHeight). Useful for specifying a max label size to keep
213
multiple plots aligned.
214

    
215
Markings, previously coloredAreas, are now specified as ranges on the
216
axes, like { xaxis: { from: 0, to: 10 }}. Furthermore with markings
217
you can now draw horizontal/vertical lines by setting from and to to
218
the same coordinate (idea from line support patch by by Ryan Funduk).
219

    
220
The "fill" option can now be a number that specifies the opacity of
221
the fill.
222

    
223
You can now specify a coordinate as null (like [2, null]) and Flot
224
will take the other coordinate into account when scaling the axes
225
(based on patch by joebno).
226

    
227
New option for bars "align". Set it to "center" to center the bars on
228
the value they represent.
229

    
230
setSelection now takes a second parameter which you can use to prevent
231
the method from firing the "plotselected" handler. 
232

    
233
Using the "container" option in legend now overwrites the container
234
element instead of just appending to it (fixes infinite legend bug,
235
reported by several people, fix by Brad Dewey).
236

    
237
Fixed a bug in calculating spacing around the plot (reported by
238
timothytoe). Fixed a bug in finding max values for all-negative data
239
sets. Prevent the possibility of eternal looping in tick calculations.
240
Fixed a bug when borderWidth is set to 0 (reported by
241
Rob/sanchothefat). Fixed a bug with drawing bars extending below 0
242
(reported by James Hewitt, patch by Ryan Funduk). Fixed a
243
bug with line widths of bars (reported by MikeM). Fixed a bug with
244
'nw' and 'sw' legend positions. Improved the handling of axis
245
auto-scaling with bars. Fixed a bug with multi-line x-axis tick
246
labels (reported by Luca Ciano). IE-fix help by Savage Zhang.
247

    
248

    
249
Flot 0.4
250
--------
251

    
252
API changes: deprecated axis.noTicks in favor of just specifying the
253
number as axis.ticks. So "xaxis: { noTicks: 10 }" becomes
254
"xaxis: { ticks: 10 }"
255

    
256
Time series support. Specify axis.mode: "time", put in Javascript
257
timestamps as data, and Flot will automatically spit out sensible
258
ticks. Take a look at the two new examples. The format can be
259
customized with axis.timeformat and axis.monthNames, or if that fails
260
with axis.tickFormatter.
261

    
262
Support for colored background areas via grid.coloredAreas. Specify an
263
array of { x1, y1, x2, y2 } objects or a function that returns these
264
given { xmin, xmax, ymin, ymax }.
265

    
266
More members on the plot object (report by Chris Davies and others).
267
"getData" for inspecting the assigned settings on data series (e.g.
268
color) and "setData", "setupGrid" and "draw" for updating the contents
269
without a total replot.
270

    
271
The default number of ticks to aim for is now dependent on the size of
272
the plot in pixels. Support for customizing tick interval sizes
273
directly with axis.minTickSize and axis.tickSize.
274

    
275
Cleaned up the automatic axis scaling algorithm and fixed how it
276
interacts with ticks. Also fixed a couple of tick-related corner case
277
bugs (one reported by mainstreetmark, another reported by timothytoe).
278

    
279
The option axis.tickFormatter now takes a function with two
280
parameters, the second parameter is an optional object with
281
information about the axis. It has min, max, tickDecimals, tickSize.
282

    
283
Added support for segmented lines (based on patch from Michael
284
MacDonald) and for ignoring null and bad values (suggestion from Nick
285
Konidaris and joshwaihi). 
286

    
287
Added support for changing the border width (joebno and safoo).
288
Label colors can be changed via CSS by selecting the tickLabel class.
289

    
290
Fixed a bug in handling single-item bar series (reported by Emil
291
Filipov). Fixed erratic behaviour when interacting with the plot
292
with IE 7 (reported by Lau Bech Lauritzen). Prevent IE/Safari text
293
selection when selecting stuff on the canvas.
294

    
295

    
296

    
297
Flot 0.3
298
--------
299

    
300
This is mostly a quick-fix release because jquery.js wasn't included
301
in the previous zip/tarball.
302

    
303
Support clicking on the plot. Turn it on with grid: { clickable: true },
304
then you get a "plotclick" event on the graph placeholder with the
305
position in units of the plot.
306

    
307
Fixed a bug in dealing with data where min = max, thanks to Michael
308
Messinides.
309

    
310
Include jquery.js in the zip/tarball.
311

    
312

    
313
Flot 0.2
314
--------
315

    
316
Added support for putting a background behind the default legend. The
317
default is the partly transparent background color. Added
318
backgroundColor and backgroundOpacity to the legend options to control
319
this.
320

    
321
The ticks options can now be a callback function that takes one
322
parameter, an object with the attributes min and max. The function
323
should return a ticks array.
324

    
325
Added labelFormatter option in legend, useful for turning the legend
326
labels into links.
327

    
328
Fixed a couple of bugs.
329

    
330
The API should now be fully documented.
331

    
332
Patch from Guy Fraser to make parts of the code smaller.
333

    
334
API changes: Moved labelMargin option to grid from x/yaxis.
335

    
336

    
337
Flot 0.1
338
--------
339

    
340
First public release.