mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-12-11 10:13:55 -06:00
Set fixed height for time-based line chart
This commit is contained in:
parent
68b0577526
commit
a42f5ab13e
9
src/visits/helpers/LineCHartCard.scss
Normal file
9
src/visits/helpers/LineCHartCard.scss
Normal file
@ -0,0 +1,9 @@
|
||||
@import '../../utils/base';
|
||||
|
||||
.line-chart-card__body canvas {
|
||||
height: 300px !important;
|
||||
|
||||
@media (min-width: $mdMin) {
|
||||
height: 350px !important;
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,7 @@ import { reverse } from 'ramda';
|
||||
import moment from 'moment';
|
||||
import { VisitType } from '../types';
|
||||
import { fillTheGaps } from '../../utils/helpers/visits';
|
||||
import './LineCHartCard.scss';
|
||||
|
||||
const propTypes = {
|
||||
title: PropTypes.string,
|
||||
@ -86,6 +87,7 @@ const LineChartCard = ({ title, visits, highlightedVisits }) => {
|
||||
].filter(Boolean),
|
||||
};
|
||||
const options = {
|
||||
maintainAspectRatio: false,
|
||||
legend: { display: false },
|
||||
scales: {
|
||||
yAxes: [
|
||||
@ -115,8 +117,8 @@ const LineChartCard = ({ title, visits, highlightedVisits }) => {
|
||||
</UncontrolledDropdown>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<Line data={data} options={options} height={80} />
|
||||
<CardBody className="line-chart-card__body">
|
||||
<Line data={data} options={options} />
|
||||
</CardBody>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user