att / rcloud.dcplot

Dimensional charting (dc.js) for RCloud
6 stars 7 forks source link

wdcplot plots of factors with a single level are broken #7

Open gordonwoodhull opened 9 years ago

gordonwoodhull commented 9 years ago

From @cscheid on May 6, 2014 17:53

Factors with a single level get interpreted by wdcplot as many levels of a single character each. This likely has to do with rserve-js's json function doing the wrong thing.

Copied from original issue: att/rcloud#627

gordonwoodhull commented 9 years ago

would prefer to fix this at the rserve.js level... i know, another big refactoring, but we are special casing everything that can be an array of size one to work around the way rserve.js thinks it's a scalar.

gordonwoodhull commented 9 years ago

From @cscheid on May 6, 2014 18:8

I'd like to not change json if possible. maybe the solution is to allow a function to return the unconverted raw javascript object from rserve-js. Right now everything in ocap mode calls json.

gordonwoodhull commented 9 years ago

Yeah, I'm thinking that ideally clients of rserve.js could register that they want particular parameters really to be arrays and not scalarized. I don't know how this would happen though.

gordonwoodhull commented 9 years ago

I wouldn't want to change it everywhere, agreed. Usually what looks like a scalar, is.

gordonwoodhull commented 9 years ago

To contradict myself: we are working around arrays of size one being interpreted as scalars, all over the place. Do that again here.