dygraphs 2.0.0 release candidate

555 views
Skip to first unread message

Dan Vanderkam

unread,
Dec 28, 2016, 5:18:49 PM12/28/16
to dygraph...@googlegroups.com
Merry Christmas everyone! I have a gift: the long-awaited 2.0.0 release candidate for you to try out.


Install: npm install dygraphs@next

or get the latest files: http://dygraphs.com/2.0.0-rc3/dist/

It's been just over two years since the dygraphs 1.1.0 release. There have been nearly 300 commits since then and a lot has changed. In particular, dygraphs has gone from its own home-grown module and testing system towards something that looks much more like a modern JS library. You can get install it via NPM, use it with webpack and even get TypeScript type definitions for it.

Since so much has changed, I'd appreciate help testing, particularly on Windows. Please check the list of breaking changes before filing bugs. At the least, every user will need to include a different file (dygraph.js or dygraph.min.js) and the new dygraph.css file. If you do find regressions, please mention that you tried the 2.0.0 release candidate in your issue report. 

Here's the full change log:

Breaking changes:
- JS files were renamed to dygraph.js and dygraph.min.js.
- There's now a dygraph.css file that you must include.
- Dropped support for OldIE and other non-standard browsers. dygraphs works in IE11. I'm not sure about IE9 and IE10.
- Double-click to unzoom zooms all the way out (and ignores valueRange).
- Dropped old-style per-axis/per-series options.

New features:
- Add a legendFormatter option #683
- `this` is the Dygraph object in all callbacks
- pass through (row, col) to valueFormatter
- Option to not sync range in extras/synchronizer.js
- Additional options for styling the range selector
- getRowForX method
- setVisibility can set the visibility of multiple series at once.
- crosshair plugin extra
- rebase/straw broom plugin (#590)
- highlightSeriesBackgroundColor option
- yAxisExtremes() method.
- Passing strings in native format now throws. (Previously it kinda sorta worked.)

Bug fixes:
- Selections are always cleared with animations
- synchronizer calls previously-set callbacks
- synchronizer only syncs when graphs are ready
- Reset on synchronized graphs failed #524
- fix to improve synchronizer performance #658
- binary search bug fix in synchronizer
- Fix range selection when chart is located inside fullscreen element #576
- fillAlpha can be set per-series when fillGraph is set.
- xRangePad was ignored on unzoom #657
- Allow selected points where canvas-y coordinate is 0 (#692)
- Using valueRange with Logscale and yRangePad has unexpected results #661
- With "drawGapEdgePoints", unwanted point often drawn at beginning of chart #745

Other user-visible changes:
- “legend: follow” positioning changes

Internal refactors:
- Code moved into a “src/“ directory
- Tests use Mocha instead of jstd
- dygraphs is split into ES6 modules and uses some ES6 features (e.g. arrows and destructuring).
- dygraphs is built using babel & browserify
- Code coverage is tracked continuously
- Bundle size is now tracked continuously

Robert Konigsberg

unread,
Dec 29, 2016, 9:38:00 AM12/29/16
to dygraphs-users
Congratulations, and thank you!

bernd

unread,
Jan 2, 2017, 3:29:22 PM1/2/17
to dygraphs-users
 thank you for sharing your work.

Nick Hayday

unread,
Jan 3, 2017, 6:36:50 AM1/3/17
to dygraphs-users
Great stuff Dan, back at work so will be testing on Windows. Has anyone built Dygraphs on Windows 7 with NPM. I'm new to NPM but it looks like the build scripts are bash only.

Dan Vanderkam

unread,
Jan 3, 2017, 8:14:45 AM1/3/17
to dygraphs-users
You shouldn't need to build it yourself -- either npm install the release candidate or use the pre-built bundles on the dygraphs site.
On Tue, Jan 3, 2017 at 6:36 AM Nick Hayday <nich...@gmail.com> wrote:
Great stuff Dan, back at work so will be testing on Windows. Has anyone built Dygraphs on Windows 7 with NPM. I'm new to NPM but it looks like the build scripts are bash only.

--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick Hayday

unread,
Jan 3, 2017, 8:43:06 AM1/3/17
to dygraphs-users
Sure, have it running, but wanted to build to develop my own dataHandler

Dan Vanderkam

unread,
Jan 3, 2017, 10:28:27 AM1/3/17
to dygraph...@googlegroups.com
That should be possible without being part of the dygraphs build process. I don't think there are any private APIs you'll need.

On Tue, Jan 3, 2017 at 8:43 AM, Nick Hayday <nich...@gmail.com> wrote:
Sure, have it running, but wanted to build to develop my own dataHandler

--
You received this message because you are subscribed to the Google Groups "dygraphs-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-users+unsubscribe@googlegroups.com.

Dan Vanderkam

unread,
Jan 8, 2017, 12:15:43 PM1/8/17
to dygraph...@googlegroups.com
There haven't been any show-stopper bugs reported, so I'll cut this release in the next few days.

Best,
  - Dan

Dan Vanderkam

unread,
Jan 11, 2017, 12:26:22 PM1/11/17
to dygraph...@googlegroups.com

Tyler Tan

unread,
Jan 14, 2017, 9:44:45 AM1/14/17
to dygraphs-users
I got following issues when replacing it with v1.1.1:
   *  Error "Dygraph.numberValueFormatter is not a function“
   *  Error ”Dygraph.pickDateTickGranularity  is not a function“
   *  Function "DygraphOptions.prototype.warnInvalidOption_", for an option that isn't dygraph's, it will throw an error, I think warning can be enough
   *  In the build output "dist/dygraph.js", I can see some statements like "require('../dygraph-utils')", which means the js still depends on others, which is same to "dygraph.min.js" 

Dan Vanderkam

unread,
Jan 19, 2017, 9:57:19 AM1/19/17
to dygraph...@googlegroups.com
Thanks for the report, Tyler. Responses inline...

On Sat, Jan 14, 2017 at 9:44 AM, Tyler Tan <hye...@gmail.com> wrote:
I got following issues when replacing it with v1.1.1:
   *  Error "Dygraph.numberValueFormatter is not a function“
   *  Error ”Dygraph.pickDateTickGranularity  is not a function“

numberValueFormatter was always marked @private. pickDateTickGranularity was not.

If you're using the NPM version of dygraphs, you can still get at these via:

    import { numberValueFormatter } from 'dygraphs/src-es5/dygraph-utils';

Removing these symbols is an undocumented breaking change. I'm on the fence about whether to add these back in a 2.0.1 bugfix release. What's your use case for them?
 
   *  Function "DygraphOptions.prototype.warnInvalidOption_", for an option that isn't dygraph's, it will throw an error, I think warning can be enough

What's your use case for specifying unsupported options? In my experience these are typically typos. At best they're a no-op, at worst they're mistakes. These only throw when you're using the dev version of dygraphs (dygraph.js, not dygraph.min.js).
 
   *  In the build output "dist/dygraph.js", I can see some statements like "require('../dygraph-utils')", which means the js still depends on others, which is same to "dygraph.min.js"

dygraphs is bundled using browserify, which uses (and defines) require internally. So this is just an implementation detail. dygraph.js and dygraph.min.js are entirely self-contained.

Noam Parness

unread,
Mar 26, 2017, 3:34:16 PM3/26/17
to dygraphs-users
Maybe it's just me, but I'm having a problem handling null values since upgrading from 1.1.1 to 2.0.0.
I have a number of graphs that all use dynamic data generated in CSV format. I have some null values in the data (represented by two commas with nothing between them), and I've never had an issue displaying them.
With 2.0.0, however, they show up in the legend as "undefined."
When I switch back to using the 1.1.1 engine, it all works fine. Is there something I can do to the dygraphs setings to correct this, or am I stuck using the 1.1.1 version from now on?

thanks.
--Noam
To unsubscribe from this group and stop receiving emails from it, send an email to dygraphs-user...@googlegroups.com.

Dan Vanderkam

unread,
Mar 26, 2017, 5:38:49 PM3/26/17
to dygraphs-users
Hi Noam,

Please file an issue with a complete repro of the regression so we can track this down.

Thanks!
- Dan

Noam Parness

unread,
Mar 27, 2017, 9:57:56 AM3/27/17
to dygraphs-users
Dan -
Thanks for the e-mails yesterday. I was able to reproduce the issue on the jsFiddle example you sent me, and I even found one of the "official" examples that has the same issue.
I filed an issue with it, so hopefully it will be something that can be fixed.
The issue is that setting "connectSeparatedPoints" to "true" causes "undefined" to show up in the legend for missing data points.
Here's the link to the issue: https://github.com/danvk/dygraphs/issues/853

Thanks.
--Noam
Reply all
Reply to author
Forward
0 new messages