Skip to content

Commit

Permalink
fix(cpc-patents): delete marge from graphs and send nothing if no pat…
Browse files Browse the repository at this point in the history
…ents for a structure
  • Loading branch information
Mihoub2 committed Oct 3, 2024
1 parent 7fafc21 commit f65a9fd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions client/src/api/patents/[id]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,5 @@ export async function getCpcAggregation(value: string): Promise<Patent> {
label: labelsByCode[bucket.key] || "Label non trouvé",
}));

if (!patent.length) throw new Error("404");

return patent;
}
3 changes: 0 additions & 3 deletions client/src/components/patent-chart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ const CpcChart: React.FC<CpcChartProps> = ({ data }) => {
height: "100%",
backgroundColor: "#f4f4f4",
},
title: {
text: "Répartition des CPC par code",
},
tooltip: {
pointFormat: "<b>{point.name}</b> (Code: {point.code}): {point.value}",
formatter: function () {
Expand Down
3 changes: 0 additions & 3 deletions client/src/components/patent-chart/indexA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ const CpcWordCloud: React.FC<CpcWordChartProps> = ({ data }) => {
chart: {
type: "wordcloud",
},
title: {
text: "Nuage de mots des CPC par code",
},
series: [
{
type: "wordcloud",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,9 @@ export default function OrganizationPatents({
years={patents.byYear.map((year) => year.label)}
/>
)}
</Col>
<Col xs="12" className="fr-pb-6w">
{projectGraph === "cpc" && patentsData && (
<PatentChart data={graphData} />
)}
</Col>
<Col xs="12" className="fr-pb-6w">
{projectGraph === "cpc2" && patentsData && (
<CpcWordCloud data={graphData} />
)}
Expand Down

0 comments on commit f65a9fd

Please sign in to comment.