diff --git a/platform/src/common/components/Charts/Charts.js b/platform/src/common/components/Charts/Charts.js index 7873860379..ef5e4ba859 100644 --- a/platform/src/common/components/Charts/Charts.js +++ b/platform/src/common/components/Charts/Charts.js @@ -182,7 +182,7 @@ const Charts = ({ chartType = 'line', width = '100%', height = '100%' }) => { } - tickLine={false} + tickLine={true} axisLine={false} padding={{ left: 30, right: 30 }} /> @@ -238,7 +238,7 @@ const Charts = ({ chartType = 'line', width = '100%', height = '100%' }) => { ))} - } axisLine={false} /> + } axisLine={false} /> { }; export const truncate = (str) => { - return str.length > 10 ? str.substr(0, 10 - 1) + '...' : str; + return str.length > 20 ? str.substr(0, 20 - 1) + '...' : str; }; /** @@ -212,36 +213,6 @@ export const CustomDot = (props) => { return ; }; -/** - * Custom legend tooltip component - * @param {Object} props - */ -const CustomLegendTooltip = ({ tooltipText, children, direction, themeClass }) => { - const [visible, setVisible] = useState(false); - - const tooltipClass = { - top: 'bottom-full mb-3', - bottom: 'top-full mt-3', - }[direction]; - - return ( -
setVisible(true)} - onMouseLeave={() => setVisible(false)}> - {children} - {visible && ( -
-

{tooltipText}

-
- )} -
- ); -}; - /** * Customized legend component * @param {Object} props @@ -265,18 +236,18 @@ export const renderCustomizedLegend = (props) => { }); return ( -
+
{sortedPayload.map((entry, index) => ( - -
- - {truncate(entry.value)} -
-
+
+ + {truncate(entry.value)} +
))}
); diff --git a/platform/src/common/components/Customise/index.jsx b/platform/src/common/components/Customise/index.jsx index 8275e66fd5..e11e576048 100644 --- a/platform/src/common/components/Customise/index.jsx +++ b/platform/src/common/components/Customise/index.jsx @@ -11,7 +11,7 @@ import Toast from '@/components/Toast'; import { RxInfoCircled } from 'react-icons/rx'; import { completeTask } from '@/lib/store/services/checklists/CheckList'; -const tabs = ['Locations']; +const tabs = ['Locations', 'Pollutants']; const CustomiseLocationsComponent = ({ toggleCustomise }) => { const dispatch = useDispatch(); @@ -111,20 +111,23 @@ const CustomiseLocationsComponent = ({ toggleCustomise }) => { Select any 4 locations you would like to feature on your overview page.

-
-
- {tabs.map((tab) => ( -
setSelectedTab(tab)} - className={`px-3 py-2 flex justify-center items-center w-full hover:cursor-pointer text-sm font-medium text-secondary-neutral-light-600${ - selectedTab === tab ? 'border rounded-md bg-white shadow-sm' : '' - }`}> - {tab} -
- ))} + {false && ( +
+ {/* Tab section */} +
+ {tabs.map((tab) => ( +
setSelectedTab(tab)} + className={`px-3 py-2 flex justify-center items-center w-full hover:cursor-pointer text-sm font-medium text-secondary-neutral-light-600${ + selectedTab === tab ? 'border rounded-md bg-white shadow-sm' : '' + }`}> + {tab} +
+ ))} +
-
+ )} {selectedTab === tabs[0] && ( )}