Commit Graph

678 Commits (1e6c45bd95546ee84e9f80395ad97e3909b912b5)
 

Author SHA1 Message Date
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
rlinehan 0a3db84559 Add option for lineJoin shape
This commit adds an option for the shape of the corners of the
selection rectangle. By default the shape is set to "round" (the
previous setting for lineJoin). The other options are "bevel" and
"miter".
13 years ago
David Schnur a2dd0645aa Break text styles into their own cache tier.
Previously the cache was divided only by layer, with entries keyed on a
string built from the text and style.  Now the style has its own tier in
the cache, i.e. layers > styles > text > info.

This introduces some complexity, since the nested for loops are ugly,
but at the same time we avoid having to create the cache-key strings.
More importantly it solves the problem of uniqueness that exists when we
try to join strings that may contain arbitrary text.  It also allows a
further optimization in the canvas plugin, which can now set text style
and color just once per distinct style, instead of with every string.
13 years ago
David Schnur 77e50b175d Allow text to be divided between multiple layers.
This lets users 'namespace' text more naturally, i.e. placing x-axis
labels in a different container from y-axis labels, providing more
flexibility when it comes to styling and interactivity.

Internally the text cache now has a second tier: layers > text > info.
13 years ago
David Schnur 4203a66eba Add text to its actual layer before measuring it.
The getTextInfo method previously added new text to the top-level
container when measuring it.  Now it adds the text to the text layer,
just as it will be when rendered, so that parent-child CSS rules can
resolve correctly.

This also avoids having to safe a reference to the top-level container,
since it wasn't used anywhere else.
13 years ago
David Schnur e7de873524 Factor out text layer creation to its own method.
This sets the stage for allowing the use of multiple layers.
13 years ago
David Schnur a036aa962a Reverse cache key order to ensure uniqueness.
Also switch from dashes to pipes, and remove the angle for now, since we
don't currently support rotated text.
13 years ago
David Schnur a9a31644c7 Replace drawText with add and remove methods.
Every cache element now contains the actual text element instead of just
its HTML, plus a flag indicating whether it is visible.  The addText and
removeText methods control the state of this flag, and the render method
uses it to manage elements within the text container.  So where we
previously used drawText to actually render text, now we add each string
once, then let the render method take care of drawing them as necessary.

This dramatically improves performance by eliminating the need to clear
and re-populate HTML text on every drawing cycle.  Since the elements
are now static between add/remove calls, this also allows users to add
interactivity, as they could in 0.7.  Finally, it eliminates the need
for a separate 'hot' cache.

I also removed the unnecessary 'dimensions' object; it's easier and
faster to store the width and height at the top level of the info
object.
13 years ago
David Schnur 42286155be Updated credits for #964 navigate event.drag fix. 13 years ago
David Schnur 1774536af6 Fixed inline event.drag's use of $.event.handle.
This resolves issue #964.
13 years ago
David Schnur 5d7086968f Simplify creation of the cached element. 13 years ago
David Schnur 4b1ff972b1 Merge pull request #966 from bor/fix/PLUGINS_example
Fix example (syntax error and indenting).
13 years ago
Sergiy Borodych 68df2de308 fix example (syntax error and indenting) 13 years ago
David Schnur ff0e5c1b1a Move cached hasOwnProperty to the top level. 13 years ago
David Schnur 73baa2b9e3 Cache actual elements instead of buffering HTML.
This significantly improves performance, since we already create the
elements when measuring them, and that effort is now no longer wasted.
We must take care to detach, rather than remove, when clearing the text
layer, so we can add the elements back later if necessary.
13 years ago
David Schnur 2cd4f8b900 Merge pull request #961 from brianpeiris/master
Add basic Travis CI setup with test script that runs JSHint.
13 years ago
Brian Peiris c39053d845 Fix README. 13 years ago
Brian Peiris 71d32b6735 Fix build status. 13 years ago
Brian Peiris 88485f7a39 Add build status to README. 13 years ago
Brian Peiris 232ad7fbff Fix travis config. YAML forbids tabs. 13 years ago
Brian Peiris 5a4fc55d8d Add basic Travis CI setup with jshint test. 13 years ago
David Schnur d4f93a28b8 Allow 'false' to be provided as a stack option.
This resolves #18, but without catching zero, which is a valid key.
13 years ago
David Schnur be9f60d210 Merge pull request #957 from dnschnur/legend-reverse
Added a legend 'reverse' sorting option.
13 years ago
David Schnur 6bbce44644 Updated the API with the legend 'reverse' option. 13 years ago
David Schnur 51e14f6a27 Added a 'reverse' sorted option.
This orders the legend entries in reverse order of their series.
13 years ago
David Schnur 9696579386 Minor tweak to example title alignment. 13 years ago
David Schnur ccb37e4965 Added missing credit line. 13 years ago
David Schnur 410dd7dbef Merge pull request #953 from dnschnur/jquery-chainable
Added the plot function as a chainable property.
13 years ago
David Schnur a787fa4e9c Updated credits for #953 chainable property. 13 years ago
David Schnur 1cb170df6e Updated credits for #895 threshold rounding fix. 13 years ago
David Schnur 06b201934c Updated credits for #534 pie string data fix. 13 years ago
David Schnur a6ce78d156 Remove unnecessary debugging code.
Modern browser consoles obviate the need for an object logging function.
13 years ago
David Schnur e491dc7a06 Cache the data value, since it is used repeatedly. 13 years ago
David Schnur d3a6bc965f Remove unnecessary numeric value checks.
The previous processing step already guarantees that the values are
numeric.
13 years ago
David Schnur 2a189b2cfb Improve the data value fix-up step.
This resolves #534 by handling the case where data is a string, whether
it is provided alone or as a pair.  We can also eliminate the old and
unnecessary check for undefined values.
13 years ago