mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-22 22:34:53 -04:00
Fixed: Indexer query stats don't include Rss
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Chart from 'chart.js';
|
||||
import Chart from 'chart.js/auto';
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import colors from 'Styles/Variables/colors';
|
||||
@@ -11,9 +11,19 @@ class BarChart extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
this.myChart = new Chart(this.canvasRef.current, {
|
||||
type: this.props.horizontal ? 'horizontalBar' : 'bar',
|
||||
type: 'bar',
|
||||
options: {
|
||||
maintainAspectRatio: false
|
||||
indexAxis: this.props.horizontal ? 'y' : 'x',
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: this.props.title
|
||||
},
|
||||
legend: {
|
||||
display: this.props.legend
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
labels: this.props.data.map((d) => d.label),
|
||||
@@ -42,12 +52,14 @@ class BarChart extends Component {
|
||||
BarChart.propTypes = {
|
||||
data: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
horizontal: PropTypes.bool,
|
||||
legend: PropTypes.bool,
|
||||
title: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
BarChart.defaultProps = {
|
||||
data: [],
|
||||
horizontal: false,
|
||||
legend: false,
|
||||
title: ''
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user