Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
Commits on Aug 07, 2012
@borgar borgar Creating a merge baseline. 90da6af
@borgar borgar New makefile that uses nodejs rather than java. 02bde3a
@borgar borgar Resolving everything that the linter complained about.
I ran JSHint with some reasonable settings. Most of these were really minor
but I did catch a few odd things. In a few places I had to resolve code constructs
that I found perfectly valid, but we can't have everything.
0553c45
@borgar borgar Substituting instanceof with class tests.
This allows Protovis to handle objects from differenct contexts from itself.
This is useful for running it in a Nodejs environment.
6c45b36
@borgar borgar pv.extend uses Object.create where available. b8261c5
@borgar borgar Use correct title tags for title attribute.
Protovis has been using a hack to get titles to work with non-compilant
browsers. The browsers have since cought up and all respect and
display title elements correctly.
29b544e
@borgar borgar Don't swallow event errors. f371510
@borgar borgar Adding a "mini" build option
This allows building/deploying a stripped down version of the library
that only includes the core (discarding layouts and geo). For a lot
of visualizations (most basic line and bar charts) the mini version
is more than sufficient.
31d92c7
@borgar borgar Use `Array(3)` rather than `new Array(3)`.
Linters complain about this because `new Array(3) !== [3]`. It is good practice
to reduces ambiguity when we can so we'll go by the gospel of Crockford here.
089a62a
@borgar borgar Faster (x2) number formatting.
This adds a "memoized" regular expression compilation function
which speeds up number parsing a tiny bit (although this
isn't a big concern). Number parsing requires much more work to
make it fast (and work correctly with negative numbers).

This also adds a test and fixes a case where pre/suffix
wasn't wrapped around fraction part of negative numbers.
ac160dd
@borgar borgar Nearly complete date formatting and parsing.
The formatting and parsing implementaion is now more complete than
most non-os implementations around.

What is still missing:

Week of year + day of week (other than ISO 8601). These are the only
parts of the spec that require effort without any expectation of usage.

Timezones are ignored. Formatter wasn't time-zone complete to begin with,
though strangely not using UTC functions. I've locked it to consistent
UTC output. The parser should eventually support reading basic offsets
and shifting date accordingly.
4f20fd2
@borgar borgar Number formatter supports and uses round half away from zero.
This adds a setting to the number formatter, and indeed a different
default, to choose how numbers are rounded. I am breaking compatibility
because I strongly feel that this is a better default (least surprise
for users reading the visuzlization's numbers).

I have some reservations with the name of the method setting function,
and generally about how this is done. I think it would be better and
generally more useful to add an unbiased rounding implementation (round
half to even) to the pv space: `pv.round`.
10d4c30
@borgar borgar Fixing lint complaints. be00e90
@borgar borgar Fixing required-apps error messages in Makefile. e7a7c59
@borgar borgar Docs can be built with npm's jsdoc package.
This is the final step to a complete node.js build. Everything works with node/npm and a few package installs.

Install jsdoc with npm:  `npm install jsdoc -g`
7940769
@borgar borgar Use polyfill of Array.isArray rather than a pv method.
The initial approach was an oversight that's been eating at me ever since it was originally made.
f869505
@borgar borgar Switching unit tests to QUnit. 95b99f7
@borgar borgar Replacing load sequence test with script processing test.
The load sequence test was trying to test too many things and it doesn't work reliably in mordern browsers and so either the test is broken or the things it is testing are. Either case - it needs redoing and preferably in more simple and transparent steps.
a8a8a7f
@borgar borgar Adding support for dashed lines.
All stroked paths now support dash patterns. This is mostly useful for rules and lines but for completeness I have added dashes support to all shapes.

Given that Protovis is a little inconsistent with it's property names I have picked `lineDash` to harmonize with other stroke attributes: `lineJoin` and `lineWidth`. This makes `strokeStyle` the odd one out. It would probably be better to rename that to `lineColor` and `fillStyle` to `fillColor`.
8a8b87d
Commits on Aug 10, 2012
@borgar borgar Number formatter fixes.
Don't try to format illegal dates this will crash one way or the other. Also, be robust about trailing zeros when parsing dates.
185953c
@borgar borgar Fixed wrong year parser in Crimea data. 1cd9bb7
@borgar borgar Clean mini-build files too when we `make clean` ded8c5d
@borgar borgar Updated builds. 1beb64f