@spaced-out/ui-design-system
Version:
Sense UI components library
49 lines (48 loc) • 1.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getSankeyChartOptions = void 0;
var _charts = require("./charts");
var _helpers = require("./helpers");
const getSankeyChartOptions = _ref => {
let {
nodeWidth = 20,
showLegend = false,
nodePadding = 10
} = _ref;
return {
..._charts.commonChartOptions,
chart: {
..._charts.commonChartOptions.chart,
type: 'sankey'
},
legend: {
..._charts.commonChartOptions.legend,
..._helpers.bottomLegendRow,
symbolWidth: 18
},
plotOptions: {
sankey: {
cursor: 'pointer',
nodeWidth,
nodePadding,
borderWidth: 0,
showInLegend: showLegend,
allowPointSelect: true,
dataLabels: {
enabled: true,
style: {
fontWeight: 'bold',
textOutline: 'none'
}
}
}
},
tooltip: {
..._charts.commonChartOptions.tooltip,
shared: true
}
};
};
exports.getSankeyChartOptions = getSankeyChartOptions;