probmods / webppl-viz

Visualization for WebPPL
http://probmods.github.io/webppl-viz/
Other
14 stars 9 forks source link

viz.bar word spacing wrong when groupBy used #24

Closed dfilan closed 8 years ago

dfilan commented 8 years ago

viz.bar seems to treat strings on the x-axis differently when the groupBy option is used. The following two function calls result in the words "absolutely" and "positively" rotated on the x-axis, allowing for easy legibility:

var myData = [{x: 'absolutely', y: 2}, {x: 'positively', y: 3}];
viz.bar(myData);
viz.bar(['absolutely', 'positively'], [2,3]);

However, the following code has the words "absolutely" and "positively" horizontally positioned and overlapping with each other:

var myData = [{x: 'absolutely', y: 2, c: 'a'}, {x: 'positively', y: 3, c: 'a'}];
viz.bar(myData, {groupBy: 'c'});
longouyang commented 8 years ago

Should be fixed now