UNPKG

@dfnivo/sankey

Version:

<a href="https://nivo.rocks"><img alt="nivo" src="https://raw.githubusercontent.com/plouc/nivo/master/nivo.png" width="216" height="68"/></a>

73 lines (72 loc) 1.77 kB
import { sankeyCenter, sankeyJustify, sankeyLeft, sankeyRight } from "d3-sankey"; import { SankeyNodeTooltip } from "./SankeyNodeTooltip"; import { SankeyLinkTooltip } from "./SankeyLinkTooltip"; export var sankeyAlignmentPropMapping = { center: sankeyCenter, justify: sankeyJustify, start: sankeyLeft, end: sankeyRight }; export var sankeyAlignmentPropKeys = Object.keys(sankeyAlignmentPropMapping); export var sankeyAlignmentFromProp = function(prop) { return sankeyAlignmentPropMapping[prop]; }; export var svgDefaultProps = { layout: "horizontal", align: "center", sort: "auto", colors: { scheme: "nivo" }, nodeOpacity: 0.75, nodeHoverOpacity: 1, nodeHoverOthersOpacity: 0.15, nodeThickness: 12, nodeSpacing: 12, nodeInnerPadding: 0, nodeBorderWidth: 1, nodeBorderColor: { from: "color", modifiers: [ [ "darker", 0.5 ] ] }, nodeBorderRadius: 0, linkOpacity: 0.25, linkHoverOpacity: 0.6, linkHoverOthersOpacity: 0.15, linkContract: 0, linkBlendMode: "multiply", enableLinkGradient: false, enableLabels: true, label: "id", labelPosition: "inside", labelPadding: 9, labelOrientation: "horizontal", labelTextColor: { from: "color", modifiers: [ [ "darker", 0.8 ] ] }, isInteractive: true, nodeTooltip: SankeyNodeTooltip, linkTooltip: SankeyLinkTooltip, legends: [], layers: [ "links", "nodes", "labels", "legends" ], role: "img", animate: true, motionConfig: "gentle" }; //# sourceMappingURL=props.js.map