Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const xAxis = (parent, {
xScale, tickCount, moveDown, fontFamily, unxkcdify, stroke,
}) => {
parent
.append('g')
.attr('transform', `translate(0,${moveDown})`)
.call(
axisBottom(xScale)
.tickSize(0)
.tickPadding(6)
.ticks(tickCount),
);
parent.selectAll('.domain')
.attr('filter', !unxkcdify ? 'url(#xkcdify)' : null)
.style('stroke', stroke);
parent.selectAll('.tick > text')
.style('font-family', fontFamily)
.style('font-size', '16')
.style('fill', stroke);
};
handleX() {
const { xScale, tickCount, height } = this
select(this.$refs.xScale)
.attr('transform', `translate(0, ${height})`)
.call(
axisBottom(xScale)
.tickSize(0)
.tickPadding(6)
.ticks(tickCount)
)
}
},