Commit Graph

255 Commits (ab7eb27c43f80e1bbd68efd131dc7f7196578921)

Author SHA1 Message Date
hizhengfu 3c1d04cbd1 Correction calculation error margin
Correction calculation error margin
13 years ago
David Schnur f06fe931ea Merge pull request #861 from thecountofzero/master
Ensure that tickSize updates on subsequent calls to setupGrid.
13 years ago
David Schnur 29476b8911 Merge pull request #911 from dnschnur/series-zero-option
Added a series 'zero' option to control automatic scaling.
13 years ago
David Schnur 6412dafc6e Restrict zero to bars and filled lines only.
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.
13 years ago
David Schnur 3c0bcefc5a Fixed jQuery 1.2.6 mouseleave issue from #920.
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.
13 years ago
David Schnur b6924a96d9 Update auto-scaling to support the zero option.
Added a format option 'autoscale' that controls whether the given point
is considered when determining an automatic scale.

The lines & bars 'zero' option controls whether autoscale is set on the
dummy point that is inserted to create the series lower-bound.
13 years ago
David Schnur 126cb072fc Added a 'zero' option for lines and bars.
Area and bar plots normally use a minimum of zero, since their purpose
is to show size, and using an auto-scaled minimum distorts the plot's
meaning.  But this behavior is undesirable in cases where the plot type
is used in more of a decorative sense.

The zero option provides a way to control this behavior.  It defauls to
true for bars and filled lines.
13 years ago
David Schnur d7c58b59f3 Enforce left-to-right canvas layout orientation.
When the placeholder has (or inherits) the HTML 'dir' attribute or CSS
'direction' we get unexpected results from text metrics, resulting in
visual glitches on the axes.

The suggested solution in #716 was to set ltr on the placeholder, but
this introduces its own problems, since the user probably *does* expect
rtl on items like the legend.  So we'll instead set ltr only on the
canvases.

We should review this behavior at some point; rtl is something we need
to handle, not work around.  It also needs to be kept in mind as we move
canvas-text into a plugin.  But for now this solution at least ensures
consistent behavior.
13 years ago
David Schnur a6414cac60 Prevent color generation with all fixed indexes.
As pointed out in a comment to #832, initializing maxIndex to zero
results in the creation of a single color even when all indexes are
fixed.
13 years ago
David Schnur 88e0567b46 Tweak comparison order for clarity. 13 years ago
David Schnur 61c1cad92f Clarify comments describing color generation. 13 years ago
Anthony Ryan a4ac13085c Document the affected versions of opera, and replace $.browser.opera with a line to detect only affected versions 13 years ago
Anthony Ryan 97d862a4b2 Specify the precise version of IE referenced in this problem 13 years ago
David Schnur f6b279ce34 Fixed a logic error in series color generation.
This addresses #906, the case where a fixed color index on a series
results in the color generator producing one color less than is actually
needed.
13 years ago
David Schnur 3640b939e2 Updated the public plot.version property. 14 years ago
David Schnur 4880f45da0 Merge pull request #899 from arpancj/master
Issue: #890: Fix broken behavior for interacting demo
14 years ago
David Schnur e85a190ea9 Removed unnecessary canvas skipPositioning flag.
The primary canvas uses position: absolute while the overlay canvas does
not.  This can cause the two to get out of alignment in rare cases when
floating elements are placed near the plot placeholder.  There doesn't
appear to be any reason why the overlay can't also be
absolutely-positioned, so I've just removed the flag entirely.
14 years ago
Arpan Chinta 91f6b6ae40 Fix broken behavior for interacting demo 14 years ago
David Schnur 9e21074d82 Updated license headers for #805.
Added licensing information to each file's headers, along with some
minor cleanup.
14 years ago
David Schnur 8b99640553 Declare variables that should have been local. 14 years ago
Karl Swedberg 198a601513 Fix setting border width/color when object.
* If either color or width is object, normalize the other to object
* Only draw each border if its width is greater than 0
* Set strokeStyle and lineWidth _before_ calling ctx.beginPath()
14 years ago
Karl Swedberg 40189e6c0f General linting. 14 years ago
Karl Swedberg 01b1c8a923 Remove trailing white space. 14 years ago
David Schnur 559a39ee62 Throw a nice exception when Excanvas is missing. 14 years ago
David Schnur 0e9936051d Fixed axis.tickDecimals that were broken by #50.
Pull request #50 inadvertently broke the behavior of axis.tickDecimals,
which previously added precision up to the given value.  The broken code
effectively ignored the setting for values with less precision.  This
fix brings back the old behavior.
14 years ago
David Schnur e29145e509 Merge pull request #862 from maimairel/patch-1
Cleaner and portable function to get pixelratio.
14 years ago
David Schnur 1baabf5fdf Added missing semicolons found via jsLint. 14 years ago
maimairel 5de35ae639 Cleaner and portable function to get pixelratio
This patch is intended the make getPixelRatio function portable and cleaner :)

Previous indentation issue has also been fixed.

Thanks :)
14 years ago
Mike Malamud a0b1552d4b Fix for issue #860, Recalculate tickSize on updates 14 years ago
ara818 5fcb64ff20 Support different border color, widths for each side of the chart 14 years ago
Nick Campbell 0d2c9ec714 insertSteps was being hoisted to global.
Locally declared insertSteps by adding var s.t. it would no longer be a
global variable.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
14 years ago
David Schnur df8c7ea520 Clarified version of master branch code. 14 years ago
Julien Thomas 2e89207432 Fix makeCanvas() for IE after Retina feature introduced in 179d2e1 14 years ago
Julien Thomas 3b26866e06 Cleanup indentation in getPixelRatio() 14 years ago
Julien Thomas 7b867f8c1f Whitespace cleanup in resizeCanvas() 14 years ago
David Schnur c202303a29 Use a slightly better-performing string cast. 14 years ago
Shad Downey b52df3ca52 Cast tick label to string prior to `replace` call
In the edge case that an actual integer, or other non-string, is passed as a label, it must be cast to String before `replace` can safely be called.
14 years ago
David Schnur 5c978cddca Fixed an error when native canvas isn't available.
The recent changes to add retina support included a call to getContext
made before excanvas/flashcanvas had a chance to register their hooks;
fixed by moving that code up a few lines.
14 years ago
David Schnur 7001dc559a Cleaned up the commit from pull request #52.
- Minor code cleanup and comments describing how we use pixel ratios.
14 years ago
David Schnur ec99d31c8e Merge pull request #52 from olivierguerriat/master
Basic retina display support
14 years ago
David Schnur 3e7a177ae8 Merge pull request #63 from dnschnur/better-legend-colors
Auto-generation of legend colors no longer results in only white and black above a certain number of series.
14 years ago
David Schnur 6eaeabcd1d Improve generation of color variations.
As the size of the variation increases, the resulting colors approach
white and black. To avoid this we now reset the variation when it gets
too large. This results in repeated colors, but that's much better than
a list full of whites and blacks.
14 years ago
David Schnur c62cb30720 Optimize and tidy up calculation of neededColors. 14 years ago
David Schnur 974bd0510e Skip entries whose labelFormatter returns null. 14 years ago
David Schnur 906321723c Merge pull request #38 from eriwen/master
Allow custom highlight color
14 years ago
David Schnur 6fa524205b Ensure that axes always have a tickGenerator.
Check whether an axis has a generator, rather than a mode. In most cases
this is functionally the same, but it also handles the case where an
axis mode plug-in specifies only the formatter, and expects to use the
default base-10 generator.
14 years ago
David Schnur 375c06aa78 Added an option to control legend sort order.
Added a legend 'sorted' option that allows sorting of legend entries
independent of series order.  It accepts either null/false, true,
'ascending', 'descending' or a comparator function.
14 years ago
David Schnur 65b05c6e2f Merge pull request #55 from yaelelmatad/issue-709-deprecation-msg
Throw error when flot.time plugin is missing.
14 years ago
David Schnur ca372620e0 Fixed mistake in code from pull request #50
- The faster toFixed alternative now returns a string, as tickFormatter
is expected to do
14 years ago
yaelelmatad 8beb199e8d Edited request for Ticket 709, Deprecation Mesg
We changed the === to == and removed the typeof operator.  We also changed the tabs to spaces.
14 years ago