diff --git a/src/components/ChartsTabs.jsx b/src/components/ChartsTabs.jsx
index df60020..663cb47 100644
--- a/src/components/ChartsTabs.jsx
+++ b/src/components/ChartsTabs.jsx
@@ -10,7 +10,7 @@ import {
} from "@chakra-ui/react";
import { TbArrowBadgeRightFilled } from "react-icons/tb";
-function ChartsTabs({ selectedValue, setSelectedValue }) {
+function ChartsTabs({ selectedValue, setSelectedValue, days }) {
const { colorMode } = useColorMode();
// This function represents the RadioCard part
@@ -49,7 +49,7 @@ function ChartsTabs({ selectedValue, setSelectedValue }) {
}
// Setting defaultValue to '24 DayusHrs'
- const options = ["24 Hrs", "30 Days", "12 Months"];
+ const options = ["24 Hrs", `${days} Days`, "12 Months"];
const { getRootProps, getRadioProps } = useRadioGroup({
name: "framework",
diff --git a/src/components/Doughnut/LineChart.jsx b/src/components/Doughnut/LineChart.jsx
index 2accbd7..c57a9fe 100644
--- a/src/components/Doughnut/LineChart.jsx
+++ b/src/components/Doughnut/LineChart.jsx
@@ -27,7 +27,7 @@ ChartJS.register(
const LineChart = () => {
const { colorMode } = useColorMode();
- const [selectedValue, setSelectedValue] = useState("Daily");
+ const [selectedValue, setSelectedValue] = useState("24 Hrs");
const [labels, setLabels] = useState([]);
const [dataset, setDataset] = useState([]);
@@ -41,7 +41,7 @@ const LineChart = () => {
Math.floor(Math.random() * 5000 + 1000)
);
setDataset(dailyData);
- } else if (selectedValue === "30 Days") {
+ } else if (selectedValue === `${dayjs().daysInMonth()} Days`) {
// Create labels for the current month (days)
const daysInMonth = dayjs().daysInMonth();
const days = Array.from(
@@ -167,6 +167,7 @@ const LineChart = () => {