diff --git a/client/src/pages/atlas/charts/genders-pie/index.tsx b/client/src/pages/atlas/charts/genders-pie/index.tsx
index 5f972a57..77e5e192 100644
--- a/client/src/pages/atlas/charts/genders-pie/index.tsx
+++ b/client/src/pages/atlas/charts/genders-pie/index.tsx
@@ -1,5 +1,6 @@
import Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
+import Template from "../../../../components/template";
type GenderData = {
name: string;
@@ -13,8 +14,8 @@ export default function GenderChart({
data: GenderData;
isLoading: boolean;
}) {
- if (isLoading || !data || !data.length) {
- return
Loader
;
+ if (isLoading || !data || (data[0].y === 0 && data[1].y === 0)) {
+ return ;
}
const rootStyles = getComputedStyle(document.documentElement);
const secteursOptions = {
diff --git a/client/src/pages/atlas/charts/sectors-pie/index.tsx b/client/src/pages/atlas/charts/sectors-pie/index.tsx
index 581e61af..d5bc73d1 100644
--- a/client/src/pages/atlas/charts/sectors-pie/index.tsx
+++ b/client/src/pages/atlas/charts/sectors-pie/index.tsx
@@ -1,5 +1,6 @@
import Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
+import Template from "../../../../components/template";
type SectorData = {
name: string;
@@ -13,8 +14,10 @@ export default function SectortsChart({
data: SectorData;
isLoading: boolean;
}) {
- if (isLoading || !data || !data.length) {
- return Loader
;
+ console.log(data);
+
+ if (isLoading || !data || (data[0].y === 0 && data[1].y === 0)) {
+ return ;
}
const rootStyles = getComputedStyle(document.documentElement);
const secteursOptions = {
diff --git a/client/src/pages/atlas/components/main/tabs/sectors.tsx b/client/src/pages/atlas/components/main/tabs/sectors.tsx
index d8fbbd22..47206ea6 100644
--- a/client/src/pages/atlas/components/main/tabs/sectors.tsx
+++ b/client/src/pages/atlas/components/main/tabs/sectors.tsx
@@ -2,13 +2,11 @@ import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { useSearchParams, useNavigate } from "react-router-dom";
import {
- Container,
- Row,
- Col,
- Title,
- Text,
Badge,
Button,
+ Container, Row, Col,
+ Text,
+ Title,
} from "@dataesr/dsfr-plus";
import MapPieSectors from "../../../charts/map-pie-sectors/index.jsx";