fix: Typisierung von timeUnit für Chart.js X-Achse korrigiert ('hour' | 'day')
This commit is contained in:
@@ -77,7 +77,7 @@ const LoopMeasurementChart = () => {
|
|||||||
const from = vonDatum ? parseISO(vonDatum) : null;
|
const from = vonDatum ? parseISO(vonDatum) : null;
|
||||||
const to = bisDatum ? parseISO(bisDatum) : null;
|
const to = bisDatum ? parseISO(bisDatum) : null;
|
||||||
const durationInHours = from && to ? differenceInHours(to, from) : 9999;
|
const durationInHours = from && to ? differenceInHours(to, from) : 9999;
|
||||||
const timeUnit = durationInHours <= 48 ? "hour" : "day";
|
const timeUnit: "hour" | "day" = durationInHours <= 48 ? "hour" : "day";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
import("chartjs-plugin-zoom").then((zoomPlugin) => {
|
import("chartjs-plugin-zoom").then((zoomPlugin) => {
|
||||||
@@ -173,7 +173,7 @@ const LoopMeasurementChart = () => {
|
|||||||
x: {
|
x: {
|
||||||
type: "time" as const,
|
type: "time" as const,
|
||||||
time: {
|
time: {
|
||||||
unit: timeUnit as const,
|
unit: timeUnit,
|
||||||
tooltipFormat: "dd.MM.yyyy HH:mm:ss",
|
tooltipFormat: "dd.MM.yyyy HH:mm:ss",
|
||||||
displayFormats: {
|
displayFormats: {
|
||||||
hour: "HH:mm",
|
hour: "HH:mm",
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.393";
|
const webVersion = "1.6.394";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user