-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix parcoords dimensions values & line coloring error with integer TypedArray #3598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
831ca6c
12baea7
e8cc760
30e2c25
e577e49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ var maxDimensionCount = require('./constants').maxDimensionCount; | |
var mergeLength = require('./merge_length'); | ||
|
||
function handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) { | ||
var lineColor = coerce('line.color', defaultColor); | ||
|
||
var lineColor = coerce('line.color', defaultColor); | ||
if(!Array.isArray(lineColor) && Lib.isArrayOrTypedArray(lineColor)) { | ||
// should convert typed arrays e.g. integers to real numbers | ||
lineColor = traceOut.line.color = Array.prototype.slice.call(lineColor); | ||
|
@@ -49,6 +49,11 @@ function dimensionDefaults(dimensionIn, dimensionOut) { | |
} | ||
|
||
var values = coerce('values'); | ||
if(!Array.isArray(values) && Lib.isArrayOrTypedArray(values)) { | ||
// should convert typed arrays e.g. integers to real numbers | ||
values = dimensionOut.values = Array.prototype.slice.call(values); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nop. Let's not do this during defaults to remain consistent with other typed-array-to-array blocks. Move this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That makes perfect sense! |
||
} | ||
|
||
var visible = coerce('visible'); | ||
if(!(values && values.length)) { | ||
visible = dimensionOut.visible = false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here.