diff --git a/src/components/Dashboard/ExpenseAnalysis.jsx b/src/components/Dashboard/ExpenseAnalysis.jsx
index 69797733..4fee4cde 100644
--- a/src/components/Dashboard/ExpenseAnalysis.jsx
+++ b/src/components/Dashboard/ExpenseAnalysis.jsx
@@ -53,17 +53,17 @@ const ExpenseAnalysis = () => {
dataLabels: { enabled: true, formatter: (val) => `${val.toFixed(0)}%` },
colors: flatColors,
tooltip: {
- y: {
- formatter: function (value) {
- return formatCurrency(value);
+ y: {
+ formatter: function (value) {
+ return formatCurrency(value);
+ },
+ },
+ x: {
+ formatter: function (label) {
+ return label;
+ },
},
},
- x: {
- formatter: function (label) {
- return label;
- },
- },
- },
plotOptions: {
pie: {
donut: {
@@ -100,7 +100,7 @@ const ExpenseAnalysis = () => {
-
+
@@ -152,7 +152,9 @@ const ExpenseAnalysis = () => {
className="col-6"
key={idx}
style={{
- borderLeft: `3px solid ${flatColors[idx % flatColors.length]}`,
+ borderLeft: `3px solid ${
+ flatColors[idx % flatColors.length]
+ }`,
}}
>
@@ -177,7 +179,6 @@ const ExpenseAnalysis = () => {
-
))}
diff --git a/src/components/common/DateRangePicker.jsx b/src/components/common/DateRangePicker.jsx
index ff293bde..d74b569f 100644
--- a/src/components/common/DateRangePicker.jsx
+++ b/src/components/common/DateRangePicker.jsx
@@ -93,6 +93,7 @@ export const DateRangePicker1 = ({
resetSignal,
defaultRange = true,
maxDate = null,
+ pastDays = 6,
...rest
}) => {
const inputRef = useRef(null);
@@ -105,7 +106,7 @@ export const DateRangePicker1 = ({
const applyDefaultDates = () => {
const today = new Date();
const past = new Date();
- past.setDate(today.getDate() - 6);
+ past.setDate(today.getDate() - pastDays);
const format = (d) => flatpickr.formatDate(d, "d-m-Y");
const formattedStart = format(past);