mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 12:49:37 +03:00
fix chart margins
This commit is contained in:
parent
f691678105
commit
3822e49591
4 changed files with 15 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
import { LineChart } from 'react-chartkick'
|
||||
import styles from '../../styles/styles.module.css';
|
||||
import 'chart.js'
|
||||
import 'chart.js';
|
||||
|
||||
const defaultProps = {
|
||||
active: false,
|
||||
|
@ -49,17 +49,18 @@ export default function Chart({ data, title, color, unit, dataCollections }: Cha
|
|||
});
|
||||
|
||||
return (
|
||||
<LineChart
|
||||
className={styles.lineChartContainer}
|
||||
xtitle="Time"
|
||||
ytitle={title}
|
||||
suffix={unit}
|
||||
legend="bottom"
|
||||
color={color}
|
||||
data={renderData}
|
||||
download={title}
|
||||
/>
|
||||
)
|
||||
<div className={styles.lineChartContainer}>
|
||||
<LineChart
|
||||
xtitle="Time"
|
||||
ytitle={title}
|
||||
suffix={unit}
|
||||
legend="bottom"
|
||||
color={color}
|
||||
data={renderData}
|
||||
download={title}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Chart.defaultProps = {
|
||||
|
|
|
@ -100,9 +100,7 @@ const series = [
|
|||
/>
|
||||
</Row>
|
||||
|
||||
<div className="chart-container">
|
||||
<Chart title="% used" dataCollections={series} color="#FF7700" unit="%" />
|
||||
</div>
|
||||
<Chart title="% used" dataCollections={series} color="#FF7700" unit="%" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -120,9 +120,7 @@ export default function ViewersOverTime() {
|
|||
prefix={<UserOutlined />}
|
||||
/>
|
||||
</Row>
|
||||
<div className="chart-container">
|
||||
<Chart title="Viewers" data={viewerInfo} color="#2087E2" unit="" />
|
||||
</div>
|
||||
<Chart title="Viewers" data={viewerInfo} color="#2087E2" unit="" />
|
||||
<Table dataSource={clients} columns={columns} rowKey={(row) => row.userAgent} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -35,10 +35,6 @@ pre {
|
|||
border-radius: .5em;
|
||||
}
|
||||
|
||||
.recharts-wrapper {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@import "~antd/dist/antd.dark";
|
||||
pre {
|
||||
|
|
Loading…
Reference in a new issue