mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
Fixed: BarChart to have a stepSize multiplier of 1 instead of auto (#163)
* Fixes the BarChart to have a stepSize multiplier of 1 instead of auto * Moves the size to props as per Discord * Adds the same behavior to StackedBarChart's
This commit is contained in:
@@ -16,10 +16,16 @@ class StackedBarChart extends Component {
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
stacked: true
|
||||
stacked: true,
|
||||
ticks: {
|
||||
stepSize: this.props.stepSize
|
||||
}
|
||||
},
|
||||
y: {
|
||||
stacked: true
|
||||
stacked: true,
|
||||
ticks: {
|
||||
stepSize: this.props.stepSize
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
@@ -63,11 +69,13 @@ class StackedBarChart extends Component {
|
||||
|
||||
StackedBarChart.propTypes = {
|
||||
data: PropTypes.object.isRequired,
|
||||
title: PropTypes.string.isRequired
|
||||
title: PropTypes.string.isRequired,
|
||||
stepSize: PropTypes.number
|
||||
};
|
||||
|
||||
StackedBarChart.defaultProps = {
|
||||
title: ''
|
||||
title: '',
|
||||
stepSize: 1
|
||||
};
|
||||
|
||||
export default StackedBarChart;
|
||||
|
||||
Reference in New Issue
Block a user