Skip to content

Commit

Permalink
Fix performance on chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed Dec 31, 2023
1 parent 8348675 commit f1888cc
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions components/CarInfographic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,7 @@ export const CarInfographic = ({
show: false,
},
},
plotOptions: {
bar: {
dataLabels: {
position: "top",
},
},
},
dataLabels: {
enabled: true,
offsetY: -20,
style: {
colors: ["#111827"], // text-gray-900
},
},
dataLabels: { enabled: false },
colors: CHART_COLOURS,
title: {
text: "Trend of registered electric cars in the last 12 months",
Expand Down Expand Up @@ -84,7 +71,7 @@ export const CarInfographic = ({
selection: {
enabled: true,
xaxis: {
min: subMonths(new Date(), 7).getTime(),
min: subMonths(latestMonth, 6).getTime(),
max: latestMonth.getTime(),
},
},
Expand Down

0 comments on commit f1888cc

Please sign in to comment.