dygraphs.git
11 years agoTurn auto-tests script into an object for saner manipulation.
Robert Konigsberg [Sun, 2 Jun 2013 15:57:24 +0000 (11:57 -0400)]
Turn auto-tests script into an object for saner manipulation.

11 years agoThe local auto tester's javascript is messy and having it embedded in HTML doesn...
Robert Konigsberg [Sun, 2 Jun 2013 15:43:08 +0000 (11:43 -0400)]
The local auto tester's javascript is messy and having it embedded in HTML doesn't help, so this change moves it out into its own file.

11 years agoUpdate dygraph.js
Wim Bruynooghe [Fri, 31 May 2013 14:03:40 +0000 (17:03 +0300)]
Update dygraph.js

11 years agoUpdate dygraph.js
Wim Bruynooghe [Fri, 31 May 2013 13:50:37 +0000 (16:50 +0300)]
Update dygraph.js

11 years agoAdd comment
Wim Bruynooghe [Fri, 31 May 2013 13:48:46 +0000 (16:48 +0300)]
Add comment

11 years agoAdd test for custom bars with negative values in logScale
Wim Bruynooghe [Fri, 31 May 2013 11:27:11 +0000 (13:27 +0200)]
Add test for custom bars with negative values in logScale

11 years agoLogScale and customBars with negative values
Wim Bruynooghe [Fri, 31 May 2013 11:22:44 +0000 (13:22 +0200)]
LogScale and customBars with negative values

When LogScale and customBars are enabled, it was verifying if the value was negative by using a <= on an array and then inserting a null. This caused exceptions in rollingAverage(), the value can't be null when using customBars.

(This a new patch based on the current code, since pull request #236 was getting old).

11 years agoRemove the vestigial DygraphLayout.setDateWindow.
Robert Konigsberg [Thu, 30 May 2013 16:58:40 +0000 (12:58 -0400)]
Remove the vestigial DygraphLayout.setDateWindow.
(Also, add a clarifying comment.)

11 years agoMerge branch 'master' of github.com:danvk/dygraphs
Dan Vanderkam [Wed, 8 May 2013 23:13:05 +0000 (16:13 -0700)]
Merge branch 'master' of github.com:danvk/dygraphs

11 years agoFix failing test
Dan Vanderkam [Wed, 8 May 2013 23:12:48 +0000 (16:12 -0700)]
Fix failing test

11 years agoMerge pull request #241 from sauter-hq/per-axis-grid
Dan Vanderkam [Wed, 8 May 2013 23:09:31 +0000 (16:09 -0700)]
Merge pull request #241 from sauter-hq/per-axis-grid

per-axis grid options

11 years agoMerge remote-tracking branch 'official/master' into per-axis-grid
David Eberlein [Wed, 8 May 2013 06:42:37 +0000 (08:42 +0200)]
Merge remote-tracking branch 'official/master' into per-axis-grid

Conflicts:
tests/two-axes.html

11 years agoMerge pull request #243 from sauter-hq/fix-for-issue-451
Dan Vanderkam [Fri, 3 May 2013 16:32:41 +0000 (09:32 -0700)]
Merge pull request #243 from sauter-hq/fix-for-issue-451

Fix for issue 451

11 years agoREFACTORING: fixed code style and lint warnings. Readded jsdoc lost in merge.
David Eberlein [Fri, 3 May 2013 07:05:11 +0000 (09:05 +0200)]
REFACTORING: fixed code style and lint warnings. Readded jsdoc lost in merge.

11 years agoREFACTORING: Fixed code style nits and extracted the null values check to a method.
David Eberlein [Thu, 2 May 2013 09:51:55 +0000 (11:51 +0200)]
REFACTORING: Fixed code style nits and extracted the null values check to a method.

11 years agoMerge commit '9f890c23ad80924d0a30f3a14f8680b7c2d6318e' into fix-for-issue-451
David Eberlein [Thu, 2 May 2013 08:50:24 +0000 (10:50 +0200)]
Merge commit '9f890c23ad80924d0a30f3a14f8680b7c2d6318e' into fix-for-issue-451

Conflicts:
dygraph-layout.js

11 years agoonly reserve space for y2 axis when it will be drawn
Dan Vanderkam [Tue, 30 Apr 2013 16:09:11 +0000 (12:09 -0400)]
only reserve space for y2 axis when it will be drawn

11 years agoREFACTORING: cleaned up code and style for new grid per axis feature.
David Eberlein [Thu, 25 Apr 2013 07:11:49 +0000 (09:11 +0200)]
REFACTORING: cleaned up code and style for new grid per axis feature.

11 years agoMerge commit 'de2545148870a1bdb0957c4c42e80bdb8ce1656d' into per-axis-grid
David Eberlein [Thu, 25 Apr 2013 06:48:54 +0000 (08:48 +0200)]
Merge commit 'de2545148870a1bdb0957c4c42e80bdb8ce1656d' into per-axis-grid

11 years agoFix our lone lint error
Dan Vanderkam [Wed, 24 Apr 2013 17:53:21 +0000 (13:53 -0400)]
Fix our lone lint error

11 years agoFix syntax errors in docs and update test script to check for them.
Dan Vanderkam [Wed, 24 Apr 2013 17:40:12 +0000 (13:40 -0400)]
Fix syntax errors in docs and update test script to check for them.

11 years agoStack Overflow link on home page
Dan Vanderkam [Wed, 24 Apr 2013 16:24:16 +0000 (12:24 -0400)]
Stack Overflow link on home page

11 years agoMerge pull request #246 from davidmsibley/master
Dan Vanderkam [Wed, 24 Apr 2013 16:16:38 +0000 (09:16 -0700)]
Merge pull request #246 from davidmsibley/master

Quarterly granularity ticker fix

11 years agoMerge pull request #245 from sauter-hq/custom-bar-data-gaps-459
Dan Vanderkam [Thu, 18 Apr 2013 16:28:36 +0000 (09:28 -0700)]
Merge pull request #245 from sauter-hq/custom-bar-data-gaps-459

Custom bar data gaps 459

11 years agoMerge pull request #237 from kberg/closure
Robert Konigsberg [Thu, 18 Apr 2013 15:35:59 +0000 (08:35 -0700)]
Merge pull request #237 from kberg/closure

Fix closure bugs in Dygraphs

11 years agoFollow-on to pull request 237, closurifying some code.
Robert Konigsberg [Thu, 18 Apr 2013 15:34:18 +0000 (11:34 -0400)]
Follow-on to pull request 237, closurifying some code.

11 years agoBUGFIX: Fixed test not running die to OS differences. Now the edge pixels arn't check...
David Eberlein [Thu, 18 Apr 2013 08:23:31 +0000 (10:23 +0200)]
BUGFIX: Fixed test not running die to OS differences. Now the edge pixels arn't checked anymore which works fine on linux and windows.

11 years agoTEST: Added NaN cases to the missingPoints test.
David Eberlein [Thu, 18 Apr 2013 07:52:22 +0000 (09:52 +0200)]
TEST: Added NaN cases to the missingPoints test.

11 years agoREFACTORING: Changed if / else cases to optimize the performance for the
David Eberlein [Thu, 18 Apr 2013 07:51:33 +0000 (09:51 +0200)]
REFACTORING: Changed if / else cases to optimize the performance for the
default cases.

11 years agoadding comments for LONG_TICK_PLACEMENTS
David M Sibley [Wed, 17 Apr 2013 23:10:44 +0000 (18:10 -0500)]
adding comments for LONG_TICK_PLACEMENTS

11 years agoMerge branch 'master' of github.com:danvk/dygraphs
David M Sibley [Wed, 17 Apr 2013 22:36:21 +0000 (17:36 -0500)]
Merge branch 'master' of github.com:danvk/dygraphs

11 years agoMerge pull request #242 from sauter-hq/draw-xaxis-bugfix
Dan Vanderkam [Wed, 17 Apr 2013 21:52:58 +0000 (14:52 -0700)]
Merge pull request #242 from sauter-hq/draw-xaxis-bugfix

BUGFIX: RangeSelector: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is set to false.

11 years agotying all the large granularity tick decision making together
David M Sibley [Wed, 17 Apr 2013 21:44:20 +0000 (16:44 -0500)]
tying all the large granularity tick decision making together

11 years agocorrected number of months in a QUARTERLY granularity
David M Sibley [Wed, 17 Apr 2013 17:18:41 +0000 (12:18 -0500)]
corrected number of months in a QUARTERLY granularity

11 years agoTEST: Added automatet tests for customBar and errorBar options and missing data points.
David Eberlein [Tue, 16 Apr 2013 16:20:16 +0000 (18:20 +0200)]
TEST: Added automatet tests for customBar and errorBar options and missing data points.

11 years agoBUGFIX: added missing spaces.
David Eberlein [Tue, 16 Apr 2013 16:18:32 +0000 (18:18 +0200)]
BUGFIX: added missing spaces.

11 years agoReponses to code review for https://github.com/danvk/dygraphs/pull/237
Robert Konigsberg [Tue, 16 Apr 2013 14:26:50 +0000 (10:26 -0400)]
Reponses to code review for https://github.com/danvk/dygraphs/pull/237

11 years agoMerge branch 'master' of github.com:danvk/dygraphs into closure
Robert Konigsberg [Tue, 16 Apr 2013 14:15:18 +0000 (10:15 -0400)]
Merge branch 'master' of github.com:danvk/dygraphs into closure

Conflicts:
dygraph-options.js

11 years agoBUGFIX: Fixed typo
David Eberlein [Tue, 16 Apr 2013 07:07:04 +0000 (09:07 +0200)]
BUGFIX: Fixed typo

11 years agoTEST: testGridLinePattern: Fixed bug not correctly resetting the x-value
David Eberlein [Mon, 15 Apr 2013 14:15:04 +0000 (16:15 +0200)]
TEST: testGridLinePattern: Fixed bug not correctly resetting the x-value
in each loop

11 years agoMerge branch 'per-axis-grid' of https://github.com/sauter-hq/dygraphs into per-axis...
David Eberlein [Mon, 15 Apr 2013 14:01:42 +0000 (16:01 +0200)]
Merge branch 'per-axis-grid' of https://github.com/sauter-hq/dygraphs into per-axis-grid

11 years agoREFACTORING: Fixed wrong indents, missing spaces and too much spaces :-)
David Eberlein [Mon, 15 Apr 2013 14:00:42 +0000 (16:00 +0200)]
REFACTORING: Fixed wrong indents, missing spaces and too much spaces :-)

11 years agoBUGFIX: Fixed jittering test results by ignoring the alpha value in the color checks.
David Eberlein [Mon, 15 Apr 2013 13:52:44 +0000 (15:52 +0200)]
BUGFIX: Fixed jittering test results by ignoring the alpha value in the color checks.

11 years agoREFACTORING: fixed jslint violation
eichsjul [Mon, 15 Apr 2013 12:57:07 +0000 (14:57 +0200)]
REFACTORING: fixed jslint violation

11 years agoREFACTORING: adapted EOL
eichsjul [Mon, 15 Apr 2013 12:39:33 +0000 (14:39 +0200)]
REFACTORING: adapted EOL

11 years agoEXAMPLE: added new example for fixed bug
eichsjul [Mon, 15 Apr 2013 12:36:09 +0000 (14:36 +0200)]
EXAMPLE: added new example for fixed bug

11 years agoFEATURE: extended test for the bugfix for issue #451
eichsjul [Mon, 15 Apr 2013 11:26:00 +0000 (13:26 +0200)]
FEATURE: extended test for the bugfix for issue #451

11 years agoBUGFIX: bugfix for issue #451 is now also working for bars
eichsjul [Mon, 15 Apr 2013 11:25:10 +0000 (13:25 +0200)]
BUGFIX: bugfix for issue #451 is now also working for bars

11 years agoTEST: Added examples for the bugfix.
David Eberlein [Mon, 15 Apr 2013 08:39:34 +0000 (10:39 +0200)]
TEST: Added examples for the bugfix.

11 years agoREFACTORING: moved option retrieving out of the for loop for better
David Eberlein [Mon, 15 Apr 2013 08:37:10 +0000 (10:37 +0200)]
REFACTORING: moved option retrieving out of the for loop for better
performance.

11 years agoTEST: test to verify the bugfix
David Eberlein [Fri, 12 Apr 2013 14:15:06 +0000 (16:15 +0200)]
TEST: test to verify the bugfix

11 years agoBUGFIX: First try of fixing missing data bug for customBars and errorBars
David Eberlein [Fri, 12 Apr 2013 14:12:16 +0000 (16:12 +0200)]
BUGFIX: First try of fixing missing data bug for customBars and errorBars

11 years agoTEST: Added example of range selector without the chart.
David Eberlein [Fri, 12 Apr 2013 12:51:37 +0000 (14:51 +0200)]
TEST: Added example of range selector without the chart.

11 years agoTEST: Added automated test proving the bugfix made.
David Eberlein [Fri, 12 Apr 2013 12:51:16 +0000 (14:51 +0200)]
TEST: Added automated test proving the bugfix made.

11 years agoREFACTORING: use the method "getLeftBoundary" instead of a private
eichsjul [Fri, 12 Apr 2013 09:35:32 +0000 (11:35 +0200)]
REFACTORING: use the method "getLeftBoundary" instead of a private
variable

11 years agoBUG FIX: Changed check to undefined with === as proposed by jslint.
Damien Buhl (alias daminetreg) [Fri, 12 Apr 2013 08:10:16 +0000 (10:10 +0200)]
BUG FIX: Changed check to undefined with === as proposed by jslint.

11 years agoREFACTORING: Added exception if no y axis has the independentTicks
David Eberlein [Thu, 11 Apr 2013 15:53:05 +0000 (17:53 +0200)]
REFACTORING: Added exception if no y axis has the independentTicks
option activated.

11 years agoREFACTORING: Spelling corrections and better documentation.
David Eberlein [Thu, 11 Apr 2013 15:38:28 +0000 (17:38 +0200)]
REFACTORING: Spelling corrections and better documentation.

11 years agoBUGFIX: Fixed invalid option reference
David Eberlein [Fri, 12 Apr 2013 07:42:55 +0000 (09:42 +0200)]
BUGFIX: Fixed invalid option reference

11 years agoTEST: Added automated tests for new grid features.
David Eberlein [Fri, 12 Apr 2013 07:38:31 +0000 (09:38 +0200)]
TEST: Added automated tests for new grid features.

11 years agoTEST: Added examples of new grid options and features.
David Eberlein [Fri, 12 Apr 2013 07:36:25 +0000 (09:36 +0200)]
TEST: Added examples of new grid options and features.

11 years agoFEATURE: Added documentation of new gridLinePattern and adapted other
David Eberlein [Wed, 10 Apr 2013 16:12:30 +0000 (18:12 +0200)]
FEATURE: Added documentation of new gridLinePattern and adapted other
grid options

11 years agoFEATURE: Added support for per-axis grid options and added new option:
David Eberlein [Fri, 12 Apr 2013 07:34:48 +0000 (09:34 +0200)]
FEATURE: Added support for per-axis grid options and added new option:
"gridLinePattern"

11 years agoTEST: adapted test for bugfix
eichsjul [Fri, 12 Apr 2013 06:51:37 +0000 (08:51 +0200)]
TEST: adapted test for bugfix

11 years agoBUGFIX #451: fixed "connect-separated-points" bug
eichsjul [Fri, 12 Apr 2013 06:50:58 +0000 (08:50 +0200)]
BUGFIX #451: fixed "connect-separated-points" bug

11 years agoREFACTORING: corrected the name for test "step_plot_per_series"
eichsjul [Fri, 12 Apr 2013 06:49:21 +0000 (08:49 +0200)]
REFACTORING: corrected the name for test "step_plot_per_series"

11 years agoMerge pull request #233 from lucasbergman/master
Dan Vanderkam [Thu, 11 Apr 2013 15:54:50 +0000 (08:54 -0700)]
Merge pull request #233 from lucasbergman/master

some small Closure-cleanliness fixes

11 years agoFEATURE: added test for issue #451
eichsjul [Thu, 11 Apr 2013 09:49:29 +0000 (11:49 +0200)]
FEATURE: added test for issue #451

11 years agoBUGFIX: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is
eichsjul [Wed, 20 Mar 2013 14:50:58 +0000 (15:50 +0100)]
BUGFIX: xAxisLabelHeight is set to 0 in case the option 'drawXAxis' is
set to false.

11 years agoMerge pull request #240 from timeu/bugfix_upstream
Dan Vanderkam [Tue, 9 Apr 2013 15:49:46 +0000 (08:49 -0700)]
Merge pull request #240 from timeu/bugfix_upstream

Bugfix: Avoid exception when returning the index of the point and one or more series are hidden

11 years agoBugfix: avoid exception when one series is hidden
Uemit Seren [Tue, 9 Apr 2013 07:11:34 +0000 (09:11 +0200)]
Bugfix: avoid exception when one series is hidden

11 years agoMerge pull request #239 from timeu/bugfix_upstream
Dan Vanderkam [Sat, 6 Apr 2013 15:13:36 +0000 (08:13 -0700)]
Merge pull request #239 from timeu/bugfix_upstream

#Issue 333: Pass point index to drawHighlightPointCallback and drawPointCallback

11 years agoFixed minor issues
Uemit Seren [Fri, 5 Apr 2013 12:24:25 +0000 (14:24 +0200)]
Fixed minor issues

11 years agoAdded test for passing the correct idx to pointDrawCallback and hightlightPointDrawCa...
Uemit Seren [Thu, 4 Apr 2013 14:37:38 +0000 (16:37 +0200)]
Added test for passing the correct idx to pointDrawCallback and hightlightPointDrawCallback

11 years agoCode formatting
Uemit Seren [Thu, 4 Apr 2013 14:37:01 +0000 (16:37 +0200)]
Code formatting

11 years agoAdded idx parameter to option-reference
Uemit Seren [Thu, 4 Apr 2013 14:32:28 +0000 (16:32 +0200)]
Added idx parameter to option-reference

11 years ago#Bug 333: Support for passing point index to drawPointCallback and drawHighlightPoint...
Uemit Seren [Wed, 3 Apr 2013 12:45:36 +0000 (14:45 +0200)]
#Bug 333: Support for passing point index to drawPointCallback and drawHighlightPointCallback added

11 years agoMake dygraph-options.js warning-free under Closure Compiler
Lucas Bergman [Thu, 7 Mar 2013 21:30:18 +0000 (15:30 -0600)]
Make dygraph-options.js warning-free under Closure Compiler

11 years agodygraph-utils.js: Make Dygraph.error and Dygraph.update public
Lucas Bergman [Thu, 7 Mar 2013 21:28:47 +0000 (15:28 -0600)]
dygraph-utils.js: Make Dygraph.error and Dygraph.update public

These seem like reasonable utility functions, and they were used outside
of Dygraph (specifically in DygraphOptions). Making these non-private
resolves Closure Compiler warnings inside dygraph-options.js.

11 years agodygraph-utils.js: Remove trailing white space
Lucas Bergman [Thu, 7 Mar 2013 18:32:53 +0000 (12:32 -0600)]
dygraph-utils.js: Remove trailing white space

11 years agodygraph-tickers.js: Fix variable redeclaration
Lucas Bergman [Wed, 6 Mar 2013 21:24:05 +0000 (15:24 -0600)]
dygraph-tickers.js: Fix variable redeclaration

11 years agodygraph-utils.js: isElementContainedBy -> isNodeContainedBy
Lucas Bergman [Wed, 6 Mar 2013 21:02:33 +0000 (15:02 -0600)]
dygraph-utils.js: isElementContainedBy -> isNodeContainedBy

This fixes a type nit when using the Closure Compiler, since walking
parentNode can give an Element or Document node, not just an Element.

11 years agoSome closurifying dygraph-canvas and dygraph-layout.
Robert Konigsberg [Sat, 30 Mar 2013 11:39:03 +0000 (07:39 -0400)]
Some closurifying dygraph-canvas and dygraph-layout.

11 years agoMerge pull request #238 from kberg/master
Robert Konigsberg [Sat, 30 Mar 2013 11:10:29 +0000 (04:10 -0700)]
Merge pull request #238 from kberg/master

Add test suite for DygraphOptions object. Fix broken method in it.

11 years agoAdd test suite for DygraphOptions object. Fix broken method in it.
Robert Konigsberg [Sat, 30 Mar 2013 11:07:34 +0000 (07:07 -0400)]
Add test suite for DygraphOptions object. Fix broken method in it.

11 years agoClosurize rgbcolor.js
Robert Konigsberg [Sat, 30 Mar 2013 02:18:55 +0000 (22:18 -0400)]
Closurize rgbcolor.js

11 years agoClosure fix type Dyraph->Dygraph.
Robert Konigsberg [Sat, 30 Mar 2013 02:07:11 +0000 (22:07 -0400)]
Closure fix type Dyraph->Dygraph.

11 years agoClosurize dygraph-options.js. Not done.
Robert Konigsberg [Sat, 30 Mar 2013 02:02:09 +0000 (22:02 -0400)]
Closurize dygraph-options.js. Not done.

Also fix bug: this.labels_ was never used! Booo...

11 years agoClosure tweak: variable 'd' declared twice within the same method.
Robert Konigsberg [Fri, 29 Mar 2013 22:44:07 +0000 (18:44 -0400)]
Closure tweak: variable 'd' declared twice within the same method.

11 years agoClosure fix; force cast from Element to Node.
Robert Konigsberg [Fri, 29 Mar 2013 22:41:43 +0000 (18:41 -0400)]
Closure fix; force cast from Element to Node.

11 years agoMerge branch 'master' of https://github.com/danvk/dygraphs into i382
Robert Konigsberg [Wed, 27 Mar 2013 14:15:44 +0000 (10:15 -0400)]
Merge branch 'master' of https://github.com/danvk/dygraphs into i382

11 years agoMerge pull request #234 from wimme/patch-2
Dan Vanderkam [Thu, 7 Mar 2013 17:58:17 +0000 (09:58 -0800)]
Merge pull request #234 from wimme/patch-2

Fix in Dygraph.log for IE8

11 years agoFix in Dygraph.log for IE8
Wim Bruynooghe [Thu, 7 Mar 2013 08:52:54 +0000 (09:52 +0100)]
Fix in Dygraph.log for IE8

In IE8, the console.log functions aren't true Javascript functions. They don't support the "apply" or "call" methods.

All Javascript code stopped working when a log message was being generated, therefor this small fix.

11 years agoMerge branch 'i382' of https://github.com/kberg/dygraphs into i382
Robert Konigsberg [Sat, 2 Mar 2013 21:38:07 +0000 (16:38 -0500)]
Merge branch 'i382' of https://github.com/kberg/dygraphs into i382

11 years agoMerge branch 'i382' of https://github.com/kberg/dygraphs into i382
Robert Konigsberg [Sat, 2 Mar 2013 21:38:07 +0000 (16:38 -0500)]
Merge branch 'i382' of https://github.com/kberg/dygraphs into i382

11 years agoFix bug 382. Simplify resizing by not recreating everything from scratch. This makes...
Robert Konigsberg [Sat, 2 Mar 2013 21:15:41 +0000 (16:15 -0500)]
Fix bug 382. Simplify resizing by not recreating everything from scratch. This makes it simpler to deal with i328, since we don't have to worry about unremoved event handlers.

Since we're not building everything from scratch, we have to make sure the clipping area is set correctly. Although there's a resetClip method in the HTML5 spec, it's too new. But, man, if we had it things would be great. So instead there's a conditional restore (no restore on the first operation) and a save, for the subsequent restore.

Almost all tests pass, but the ones that test save/restore balances are unsurprisingly broken, as there's one additional save. This can be addressed with calls to g.destroy prior to the assertion, or make a special assertion that verifies there's one more context save than restore.

This has an additional benefit of being slightly faster. Using /Users/konigsberg/git/kberg-dygraphs/tests/resize.html and the following snippet

var start = new Date().getTime();
for (var idx = 0; idx < 500; idx++) {
    g.resize(100 + idx, 100 + idx);
}
console.log(new Date().getTime() - start);

I frequently saw a difference of about 200ms (2200-range to 2400-range.) How much of that was drawing a mildly complex image? Who knows?

I also did some minor refactoring with regards to events, and event method names to make things easier to track.

There may be a need for a plug-in event for resizing.

11 years agoFix bug 328. Simplify resizing by not recreating everything from scratch. This makes...
Robert Konigsberg [Sat, 2 Mar 2013 21:15:41 +0000 (16:15 -0500)]
Fix bug 328. Simplify resizing by not recreating everything from scratch. This makes it simpler to deal with i328, since we don't have to worry about unremoved event handlers.

Since we're not building everything from scratch, we have to make sure the clipping area is set correctly. Although there's a resetClip method in the HTML5 spec, it's too new. But, man, if we had it things would be great. So instead there's a conditional restore (no restore on the first operation) and a save, for the subsequent restore.

Almost all tests pass, but the ones that test save/restore balances are unsurprisingly broken, as there's one additional save. This can be addressed with calls to g.destroy prior to the assertion, or make a special assertion that verifies there's one more context save than restore.

This has an additional benefit of being slightly faster. Using /Users/konigsberg/git/kberg-dygraphs/tests/resize.html and the following snippet

var start = new Date().getTime();
for (var idx = 0; idx < 500; idx++) {
    g.resize(100 + idx, 100 + idx);
}
console.log(new Date().getTime() - start);

I frequently saw a difference of about 200ms (2200-range to 2400-range.) How much of that was drawing a mildly complex image? Who knows?

I also did some minor refactoring with regards to events, and event method names to make things easier to track.

There may be a need for a plug-in event for resizing.

11 years agoMerge pull request #226 from vlsi/wrong_stacked_computation
Dan Vanderkam [Sat, 2 Mar 2013 17:49:47 +0000 (09:49 -0800)]
Merge pull request #226 from vlsi/wrong_stacked_computation

Fixed computation of stacked series in case some series start in the mid...

11 years agoMerge pull request #231 from paulfelix/master
Robert Konigsberg [Wed, 27 Feb 2013 01:52:30 +0000 (17:52 -0800)]
Merge pull request #231 from paulfelix/master

Fix for Issue 439: Dragging a range Selector grab handle is not working properly when graph's position on page is offset

11 years agoFix for issue #439
Paul Felix [Tue, 26 Feb 2013 22:01:03 +0000 (17:01 -0500)]
Fix for issue #439