Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (props) => {
const Component = chartMap[props.type];
const xAxis = React.createElement(Axis, {style: getAxisStyles(props)});
const yAxis = React.createElement(Axis, {style: getAxisStyles(props), dependentAxis: true});
const Viz = React.createElement(Component, {data: props.data, style: {data: getStyles(props)}});
if (props.expanded) {
return React.createElement(Chart, {style: {
axis: {
axis: {stroke: "black"},
grid: {strokeWidth: 2},
ticks: {stroke: "red", size: 4},
tickLabels: {fontSize: 12},
axisLabel: {fontsize: 16}
}
}}, [xAxis, yAxis, Viz]);
}
return Viz;
};
};
return (props) => {
const Component = chartMap[props.type];
const xAxis = React.createElement(Axis, {style: getAxisStyles(props)});
const yAxis = React.createElement(Axis, {style: getAxisStyles(props), dependentAxis: true});
const Viz = React.createElement(Component, {data: props.data, style: {data: getStyles(props)}});
if (props.expanded) {
return React.createElement(Chart, {style: {
axis: {
axis: {stroke: "black"},
grid: {strokeWidth: 2},
ticks: {stroke: "red", size: 4},
tickLabels: {fontSize: 12},
axisLabel: {fontsize: 16}
}
}}, [xAxis, yAxis, Viz]);
}
return Viz;
};
};