Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Chart.js: Fix import for production
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb-sti1 committed Oct 12, 2023
1 parent d7ee43c commit 26d17ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/src/Components/RoadDetails/ConditionsGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Title,
Tooltip,
} from 'chart.js';
import 'chart.js/auto';
import { Scatter } from 'react-chartjs-2';

Chart.register(
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/RoadDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const RoadDetails = () => {
labels: wc.map((p) => p.way_dist * 100),
datasets: [
{
//@ts-ignore
type: 'line' as const,
type: 'scatter' as const,
showLine: true,
label: 'KPI',
borderColor: 'rgb(255, 99, 132)',
borderWidth: 2,
Expand All @@ -34,8 +34,8 @@ const RoadDetails = () => {
yAxisID: 'KPI',
},
{
//@ts-ignore
type: 'line' as const,
type: 'scatter' as const,
showLine: true,
label: 'DI',
borderColor: 'rgb(120, 245, 23)',
borderWidth: 2,
Expand Down

0 comments on commit 26d17ae

Please sign in to comment.