Commit Graph

712 Commits (v0.8.0)
 

Author SHA1 Message Date
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
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
David Schnur 5741f26756 Short-circuit when removing all highlights.
There's no need to continue in the function when all highlights are
being cleared.
13 years ago
David Schnur eee071c47d Fix highlight and unhighlight inconsistency.
The unhighlight method retrieved the point differently from highlight,
and incorrectly.  It now matches the behavior of highlight.
13 years ago
David Schnur aeddf4e385 Avoid an unnecessary intermediate variable. 13 years ago
David Schnur 4e9c0c0b53 Ensure that axis lines align with their ticks.
Add an extra pixel to ensure that the lines cleanly join both top and
bottom ticks.  Also apply the sub-pixel offset only in the necessary
direction, so the lines don't start a pixel off from where they should.
13 years ago
David Schnur 0594a49158 Update version number to 0.8.0-beta. 13 years ago
David Schnur 3cd7a51026 Axis and tick color options now make more sense.
The axis color now controls the color of the axis line, instead of its
ticks and labels, while the tickColor controls the tick color. This
makes a little more sense and provides the minor feature of being able
to change the axis line color separately from that of its ticks.  Pull
request #917 ought to be easier to merge now, too.
13 years ago
David Schnur 6e3cc91fd7 Fix up URLs in the plugins.jquery.com manifest. 13 years ago
David Schnur a0b05a4bab Switch to semantic versioning. 13 years ago
David Schnur c41b09b844 Only save references to old Canvas methods once.
Plugins are re-initialized with each re-plot (which may not be the right
thing to do, but that's how it works for now).  The previous approach of
saving references to the original Canvas functions therefore broke,
since the second time around we'd get a reference to our new function.
Instead we hold those references as globals within the plugin, and only
set them once.

This whole idea of replacing prototype functions is, now that I step
back and look at it, really awful.  This needs to be changed ASAP to
something less ridiculous.
13 years ago
David Schnur 53ce9ad123 Move canvas reuse up into the Canvas constructor.
This allows us to reuse the canvas elements without having to retain the
rest of the Canvas object, which should really be reset when the plot is
reconstructed.  It's also a little simpler, and the Canvas constructor
just feels like the right place for this code.
13 years ago
David Schnur 96c451a0c6 Added an example to demonstrate canvas text. 13 years ago
David Schnur a2a55f8280 Merge pull request #980 from martinqt/examples
Update examples link to flotcharts.org.
13 years ago
David Schnur ce8c3a06a4 Merge pull request #981 from brianpeiris/patch-1
Add information about assigned issues.
13 years ago
David Schnur e4a0aa72e9 Merge pull request #979 from martinqt/copyright
Update copyright year; resolves #927.
13 years ago
Brian Peiris 27538a8528 Add information about assigned issues 13 years ago
martinqt 0fc4c69662 Update examples link to flowcharts.org 13 years ago
martinqt 1e6c45bd95 Update js files 13 years ago
martinqt 269a192331 Update license 13 years ago
David Schnur 60ed6b2963 Merge pull request #935 from dnschnur/canvas-text
Moved canvas text support into a plugin.
13 years ago
David Schnur 39698d3846 Updated credits for canvas text support. 13 years ago
David Schnur 7a799baeb8 Updated NEWS for axis text changes. 13 years ago
David Schnur 0df6bc4a66 Add back legacy styles for tick label containers.
These styles are deprecated, but we'll continue to use them until the
release of version 1.0.0, for backwards-compatibility.
13 years ago
David Schnur 27c701112d Updated the API docs for axis text changes. 13 years ago
David Schnur bb0acac9c7 Give tick labels the 'tickLabel' class.
The tickLabel class is deprecated in favor of flot-tick-label, but we'll
continue to use it until the release of version 1.0.0, for
backwards-compatibility.
13 years ago
David Schnur e354071741 Minor cleanup of text-style color defaults. 13 years ago
David Schnur 82ab0c46b0 Updated credits for #638 and #963. 13 years ago
David Schnur fe27116b8a Merge pull request #963 from rlinehan/selection_plugin_options
Added selection plugin options.
13 years ago
David Schnur b8b3b9cb7f Updated the pie 'combined' example.
Tweaked the description to indicate that we no longer combine single
slices into 'other', and reduced the threshold from 10% to 5% to
encourage more slices to combine in the demo.
13 years ago
David Schnur 64b28faf0d Avoid combining a single pie slice into 'other'.
Resolves #638.
13 years ago
David Schnur ab6e4a95bd Skip NaN values in axis min/max calculations.
Resolves #489.
13 years ago
rlinehan 458656f3b9 Make minSize customizable
Previously, the minimum size a selection could be was set at five
pixels. This commit adds the ability to customize this value.
13 years ago
rlinehan 51485c0381 Add option to always show selection rectangle
Previously, if the selected area was very small, the selection
rectangle would not be displayed. This commit adds an "alwaysShow"
option so that, when true, the selection rectangle will always be
displayed. When the selected area is very small, the selection
rectangle will become a line.
13 years ago