- 03 Mar, 2013 3 commits
-
-
David Schnur authored
-
David Schnur authored
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.
-
David Schnur authored
-
- 24 Feb, 2013 5 commits
-
-
David Schnur authored
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.
-
David Schnur authored
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.
-
David Schnur authored
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.
-
David Schnur authored
This sets the stage for allowing the use of multiple layers.
-
David Schnur authored
Also switch from dashes to pipes, and remove the angle for now, since we don't currently support rotated text.
-
- 23 Feb, 2013 1 commit
-
-
David Schnur authored
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.
-
- 21 Feb, 2013 1 commit
-
-
David Schnur authored
-
- 17 Feb, 2013 1 commit
-
-
David Schnur authored
-
- 16 Feb, 2013 1 commit
-
-
David Schnur authored
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.
-
- 31 Jan, 2013 3 commits
-
-
David Schnur authored
Since the Canvas .text object is jQuery-wrapped, it was not preserved as expected when clearing the canvas of junk. I've replaced the selection with one based on element classes.
-
David Schnur authored
-
David Schnur authored
Instead of giving the axis its own font property, we simply look at its options, where the font comes from in the first place. A separate property is unnecessary and inconsistent with the way other axis options are handled.
-
- 19 Jan, 2013 6 commits
-
-
David Schnur authored
The base implementation uses the new drawText and getTextInfo methods to draw text in HTML. Canvas rendering has been moved to overrides of these methods within the canvas-render plugin.
-
David Schnur authored
-
David Schnur authored
These methods provide a common way to draw HTML text above a canvas. The getTextInfo method generates div HTML for text with a given font style/class and angle, measures the element's dimensions, and saves everything in a cache. The drawText method takes the resulting entry, finishes generating the inline styles necessary to position the div, and adds the result to a buffer. The render method dumps the buffer into an overlay and expires unused cache entries.
-
David Schnur authored
-
David Schnur authored
Moved canvas creation and size management into a new Canvas class. This is the first step towards a more object-oriented architecture. Since we create multiple canvases, and have to maintain several module-global variables to track their properties, they are the ideal place to start. This commit also removes sizing code that was duplicated between makeCanvas and resizeCanvas.
-
David Schnur authored
Renaming the variable gives us room to create a new class called Canvas.
-
- 14 Jan, 2013 2 commits
-
-
David Schnur authored
Fix an error in plot offset calculation.
-
hizhengfu authored
Correction calculation error margin
-
- 13 Jan, 2013 1 commit
-
-
David Schnur authored
Ensure that tickSize updates on subsequent calls to setupGrid.
-
- 12 Jan, 2013 4 commits
-
-
David Schnur authored
Fixed jQuery version dependency (we require 1.2.6, not 1.3.2) and whitespace.
-
David Schnur authored
Flot's semver is 0.8.0-alpha, and it (for now) requires jQuery 1.2.6, not 1.3.2.
-
David Schnur authored
Adding component.json for bower.
-
David Schnur authored
-
- 11 Jan, 2013 5 commits
-
-
David Schnur authored
Added a series 'zero' option to control automatic scaling.
-
David Schnur authored
Adapted from pull request #17.
-
David Schnur authored
Always draw crosshair on half-pixels to prevent aliasing.
-
Daniel Shapiro authored
-
David Schnur authored
Add passing offsets over plotpan event
-
- 10 Jan, 2013 7 commits
-
-
David Schnur authored
-
David Schnur authored
-
David Schnur authored
-
David Schnur authored
Due to limitations in our plugin architecture, the categories plugin duplicates code from Flot's core for adding a dummy point to snap the y axis to zero. We can get rid of this duplication in 0.9; for now we'll just update the duplicate to match the change in core that introduced the new 'zero' option.
-
David Schnur authored
This also includes a tweak to zero's default. Previously zero only received a value if lines were visible; now it always receives a value, matching the behavior of other contextual options.
-
Ivan Novikov authored
Unified this behavior with plotzoom event as in pull #34 flot/flot@1b6c4e933ade3f03d634dfaa6357e82beda3bc55
-
David Schnur authored
Use bind, rather than .mouseleave, because we officially still support jQuery 1.2.6, which doesn't define a shortcut for mouseenter or mouseleave. This was a bug/oversight that was fixed somewhere around 1.3.x. We can return to using .mouseleave when we drop support for 1.2.6.
-