Commit 6fa2e564 authored by M Parker's avatar M Parker

Explicitly convert ints, bools to the expected type in JavaScript.

parent dc329a53
......@@ -14,12 +14,12 @@
// Grab settings from the settings object passed to us by the D3 module. Use
// defaults if the settings we want do not exist in the settings object.
var sankeyType = (settings.sankeyType || 'Sankey');
var width = (settings.width || 700);
var height = (settings.height || 400);
var nodeWidth = (settings.nodeWidth || 24);
var nodePadding = (settings.nodePadding || 8);
var spread = (settings.spread || true);
var iterations = (settings.iterations || 1);
var width = parseInt(settings.width || 700);
var height = parseInt(settings.height || 400);
var nodeWidth = parseInt(settings.nodeWidth || 24);
var nodePadding = parseInt(settings.nodePadding || 8);
var spread = Boolean(settings.spread || true);
var iterations = parseInt(settings.iterations || 1);
var alignLabel = (settings.alignLabel || 'auto');
// Grab data for the chart if it exists in it's raw form; if not, use empty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment