@patternfly/react-charts
Version:
This library provides a set of React chart components for use with the PatternFly reference implementation.
21 lines • 912 B
JavaScript
import defaultsDeep from 'lodash/defaultsDeep';
/**
* Returns series properties for Sankey chart
*
* @param serie
* @param theme
* @param isSkeleton
* @private Not intended as public API and subject to change
*/
export const getSankeySeries = (serie, theme, isSkeleton) => {
const defaults = Object.assign(Object.assign({ data: serie.data.map((datum, index) => ({
itemStyle: {
color: theme === null || theme === void 0 ? void 0 : theme.color[index % (theme === null || theme === void 0 ? void 0 : theme.color.length)]
}
})) }, (isSkeleton ? { draggable: false } : {})), { emphasis: Object.assign({}, (isSkeleton ? { disabled: true } : { focus: 'adjacency' })), layout: 'none', lineStyle: {
color: 'source',
opacity: 0.6
}, type: 'sankey' });
return defaultsDeep(serie, defaults);
};
//# sourceMappingURL=Sankey.js.map