Commit Graph

794 Commits (65c38d0b595d311a2bfef643f289f3c7efbf9aa0)
 

Author SHA1 Message Date
David Schnur 33565aa5d5 Merge pull request #1035 from brianpeiris/patch-2
Add links between API.md and README.md
13 years ago
David Schnur 0fdb499654 Merge pull request #1027 from leewillis77/master
Remove $.isNumeric() for compat with jQuery < 1.7. Fixes #1026
13 years ago
Brian Peiris 321f3a49ce Add link to API.md 13 years ago
Brian Peiris 3f0d693151 Add link to README.md 13 years ago
goorpy fccc8a6e21 Override colors array after extend in parseOptions
(Realted to flot issue #1031: https://github.com/flot/flot/issues/1031)

Currently, if the user declares a custom color palette with less than 5 colors (say, n), $.extend(true, options, opts) only modifies the first n colors of the default palette and leaves the last 5-n in place. When the number of series is >n, colors are used that are not part of user-defined palette, contrary to description of colors array in API.

This line overrides the extended colors array and replaces it with exactly the user-defined colors array, when present. Afterwards, the user color palette is respected by the auto tinting/shading system for when there are more series than colors.
13 years ago
Lee Willis 5fe3646ab0 Remove $.isNumeric() for compat with jQuery < 1.7. Fixes #1026 13 years ago
David Schnur 24f70fc6bd Re-introduced the %h specifier for back-compat. 13 years ago
David Schnur 87f9c78286 Merge pull request #1023 from danxshap/time_fix
Remove some incorrect else-if logic in time plugin.
13 years ago
David Schnur bb525187a7 Merge pull request #1020 from vird/patch-1
Avoid propagating mouse wheel events when they're first caught by the navigate plugin.
13 years ago
Daniel Shapiro a35c7ab696 Remove some incorrect else-if logic in time plugin
Looks like this was mistakenly introduced in a whitespace/bracket cleanup.
13 years ago
vird 5594e33842 Update jquery.flot.navigate.js
BUGFIX navigation wheel scrolls page.
13 years ago
David Schnur 1720941fa7 Updated credits for #1003 strokeColor option. 13 years ago
David Schnur 0d26732e93 Updated docs with the point strokeColor option. 13 years ago
David Schnur 89ad298088 Replace ternary with a simpler or statement. 13 years ago
David Schnur b4258846b8 Merge pull request #1003 from djamshed/pointsStrokeColor 13 years ago
David Schnur a2503c2e84 Updated credits for #1016 exception fix. 13 years ago
David Schnur ec7322e4ab Initialize time-mode support in processOptions.
Resolves #1016.  Initialization consists of adding the tickGenerator and
tickFormatter functions to each axis.  This should happen exactly once
per plot, but since the code was previously using the processDatapoints
hook, it was called once per series.  When no series were present, it
ran zero times, triggering an exception when we later checked for the
existence of the functions.

Binding to the processOptions hook ensures that the axes are always
modified once, regardless of how many series there are.  The axes are
already initialized by the point the hook runs, so this change shouldn't
cause any problems.
13 years ago
David Schnur 0a284374e8 Removed unnecessary semicolons. 13 years ago
David Schnur b3fe4bdef3 Added missing semicolons. 13 years ago
David Schnur 4be713f8d8 Removed trailing whitespace. 13 years ago
David Schnur d3b2f0c114 Added missing radix parameters. 13 years ago
David Schnur e58c20f375 Merge branch 'master' of https://github.com/k-nut/flot into code-cleanup 13 years ago
David Schnur 8e12ecd7a3 Update JSHint pattern to include colorhelpers. 13 years ago
David Schnur 25e93fe4dc Added a .jshintrc for the Travis JSHint step. 13 years ago
David Schnur 8722a99d9c Update version number to 0.9.0-alpha. 13 years ago
David Schnur bf3fffd1e1 Added credits for the missing semicolon fix. 13 years ago
David Schnur e037f5ca56 Updated version number to 0.8.1-alpha. 13 years ago
David Schnur 0f83ac3d5c Fixed missing semicolons. 13 years ago
David Schnur 866a9fb9e1 Added new feature work branch guidelines. 13 years ago
David Schnur eac1bc3351 Removed example file committed accidentally. 13 years ago
David Schnur bad589c0a7 Update version number to 0.8.0 final. 13 years ago
David Schnur e3c45a5a98 Fixed missing comma in demo code. 13 years ago
David Schnur f397697712 Updated credits for #987, #861, and #1000. 13 years ago
David Schnur 209fe5336a Always recalculate tickDecimals and tickSize.
Resolves #1000.  In Flot 0.7 we only calculated tickDecimals and
tickSize once, when creating the tickGenerator for the first time.  This
meant that calls to setupGrid failed to recalculate the values, as
reported in #860.  #861 fixed the problem by moving calculation into
tickGenerator, but this turned out to cause a new problem, since the
function doesn't run when an explicit ticks array is provided.

This commit solves both by always recalculating the values outside of
the tickGenerator function.  As far as I can tell the only reason it
wasn't done this way from the beginning was to avoid unnecessary work in
the case where tickGenerator is already provided in the options.  But
the extra work is negligible, and it's actually more consistent for the
properties to always be set.
13 years ago
David Schnur 35a16ae7fd Switch back to 'middle' baseline rendering.
Ole's original implementation used 'middle', which I switched away from.
After a great deal of testing it turns out that 'middle' does in fact
provide the most consistent results, so we're switching back to it.
13 years ago
David Schnur 9ca3e83447 Use actual line height for canvas text rendering. 13 years ago
David Schnur 825cd36e96 Pre-compute coordinates for each line of text.
The values don't change, so there's no reason to repeat those
calculations on every redraw.  The resulting code is not just faster,
but also smaller and simpler, and we no longer need to store halign in
the text info object.
13 years ago
David Schnur f99a225ffc Set the text baseline only once.
The setting is the same for everything, so there's no reason to re-set
it every time.
13 years ago
David Schnur aefe4e729b Round text coordinates consistently.
The core implementation used parseInt, which was originally to catch
text values, but really only stayed due to its side-effect of flooring
the values.  The canvas implementation has never rounded coordinates.
This led to various one-pixel rendering glitches between the two
implementations.  I've fixed the problem by consistently rounding
coordinates to the nearest whole number.
13 years ago
David Schnur 606c02b842 Tiny optimization; don't set info.y twice. 13 years ago
David Schnur bceb4bfca2 Added lineHeight to the font-spec object.
Line height is a core font property - it can be specified as part of the
unified 'font' definition - and we therefore need to give users access
to it when they're manually defining the font.
13 years ago
David Schnur dbad717c90 Give the example placeholder its own line-height.
This way it doesn't inherit from something further up, whose line-height
may be more or less than we expect.
13 years ago
David Schnur 55e671b795 Fix incorrect default for xaxes/yaxes tickColor.
The way in which xaxes/yaxes inherit options from xaxis/yaxis resulted
in a minor bug, where tickColor defaulted to the xaxis/yaxis color
instead of the color for its axis.  Fixed by applying the default before
extending the per-axis options, resolving #984.

There's still some questionable behavior here; this section should be
revisited for 0.9, especially with an eye towards removing some of the
code that only exists for backwards-compatibility.
13 years ago
David Schnur 4e8d8535e0 Move time-specific options into the time plugin. 13 years ago
David Schnur a1b4afc57d A better fix for the font-size 'smaller' problem.
This resolves #991, replacing the earlier temporary patch.  It takes
advantage of the fact that line-height can take the form of a unit-less
integer, in which case it mirrors the font-size, even when it is
something abstract, like 'smaller'.  We can then read the dummy
element's height to learn the effective font-size.
13 years ago
David Schnur df0875e549 Replace the stylesheet hack with inline styles.
The purpose of the stylesheet hack was to provide a default without
having to use inline styles on containers.  We can do this much more
neatly by instead just giving the inline styles to a parent container,
leaving users free to customize the children.
13 years ago
Knut 672b9b8853 reverted null check 13 years ago
Djam Saidmuradov 3ae7177d0c Allow custom stroke color for points. 13 years ago
Knut 814528c31c No more jshint errors for jquery.colorhelpers.js 13 years ago
David Schnur 13c71fa03c Temporary patch for font-size parsing issue.
This partially addresses #991, but a more complete solution, or better
documentation, is still necessary.
13 years ago