mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-22 06:27:49 +00:00
Render empty bar and heatmap charts.
This commit is contained in:
parent
462ff3665d
commit
a04d47833f
@ -1,6 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { Card, Empty } from "antd";
|
||||
import { Card } from "antd";
|
||||
|
||||
import { TimeUnit } from "chart.js";
|
||||
import { Bar } from "react-chartjs-2";
|
||||
@ -15,10 +15,6 @@ interface IProps {
|
||||
|
||||
class MetricBar extends Component<IProps> {
|
||||
render() {
|
||||
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
|
||||
return <Empty />;
|
||||
}
|
||||
|
||||
let unit: TimeUnit = "hour";
|
||||
if (this.props.aggregation === Aggregation.DAY) {
|
||||
unit = "day";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { Card, Empty } from "antd";
|
||||
import { Card } from "antd";
|
||||
|
||||
import { TimeUnit } from "chart.js";
|
||||
import { Line } from "react-chartjs-2";
|
||||
@ -16,10 +16,6 @@ interface IProps {
|
||||
|
||||
class MetricChart extends Component<IProps> {
|
||||
render() {
|
||||
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
|
||||
return <Empty />;
|
||||
}
|
||||
|
||||
let unit: TimeUnit = "hour";
|
||||
if (this.props.aggregation === Aggregation.DAY) {
|
||||
unit = "day";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
import { Card, Empty } from "antd";
|
||||
import { Card } from "antd";
|
||||
|
||||
import { color } from "chart.js/helpers";
|
||||
import { TimeUnit } from "chart.js";
|
||||
@ -18,10 +18,6 @@ interface IProps {
|
||||
|
||||
class MetricHeatmap extends Component<IProps> {
|
||||
render() {
|
||||
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
|
||||
return <Empty />;
|
||||
}
|
||||
|
||||
let unit: TimeUnit = "hour";
|
||||
if (this.props.aggregation === Aggregation.DAY) {
|
||||
unit = "day";
|
||||
|
Loading…
Reference in New Issue
Block a user