mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-05 02:23:08 +00:00
Fix chart tooltip date format.
This commit is contained in:
parent
331f4bce40
commit
a43ef72fb2
@ -17,10 +17,13 @@ interface IProps {
|
|||||||
class MetricChart extends Component<IProps> {
|
class MetricChart extends Component<IProps> {
|
||||||
render() {
|
render() {
|
||||||
let unit: TimeUnit = "hour";
|
let unit: TimeUnit = "hour";
|
||||||
|
let tooltipFormat = "LT";
|
||||||
if (this.props.aggregation === Aggregation.DAY) {
|
if (this.props.aggregation === Aggregation.DAY) {
|
||||||
unit = "day";
|
unit = "day";
|
||||||
|
tooltipFormat = "MMM Do";
|
||||||
} else if (this.props.aggregation === Aggregation.MONTH) {
|
} else if (this.props.aggregation === Aggregation.MONTH) {
|
||||||
unit = "month";
|
unit = "month";
|
||||||
|
tooltipFormat = "MMM YYYY";
|
||||||
}
|
}
|
||||||
|
|
||||||
const animation: false = false;
|
const animation: false = false;
|
||||||
@ -41,6 +44,7 @@ class MetricChart extends Component<IProps> {
|
|||||||
type: "time" as const,
|
type: "time" as const,
|
||||||
time: {
|
time: {
|
||||||
unit: unit,
|
unit: unit,
|
||||||
|
tooltipFormat: tooltipFormat,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1881,7 +1881,7 @@
|
|||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
"@chirpstack/chirpstack-api-grpc-web@file:../api/grpc-web":
|
"@chirpstack/chirpstack-api-grpc-web@file:../api/grpc-web":
|
||||||
version "4.0.0-rc.3"
|
version "4.0.0-rc.4"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/google-protobuf" "^3.15.2"
|
"@types/google-protobuf" "^3.15.2"
|
||||||
google-protobuf "^3.17.3"
|
google-protobuf "^3.17.3"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user