From d3427d16a8bed9491fb03a4ea0dc6e8db26d3599 Mon Sep 17 00:00:00 2001 From: Luis Zenteno Date: Thu, 21 Nov 2024 14:34:55 -0600 Subject: [PATCH] feat(rankedPlantations): update data version and update CustomTick component to not render hyphen --- .../horizontal-bar-chart/custom-tick-component.jsx | 10 ++-------- .../widgets/land-cover/ranked-plantations/index.js | 13 +++++++++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/components/charts/horizontal-bar-chart/custom-tick-component.jsx b/components/charts/horizontal-bar-chart/custom-tick-component.jsx index 2a3610239c..0987a13865 100644 --- a/components/charts/horizontal-bar-chart/custom-tick-component.jsx +++ b/components/charts/horizontal-bar-chart/custom-tick-component.jsx @@ -22,19 +22,13 @@ const CustomTick = ({ x, y, index, yAxisDotFill, data, settings }) => { {extLink ? ( - {region} - {' '} - - - {formatNumber({ num: total, unit: '%' })} + {region}: {formatNumber({ num: total, unit: '%' })} {index === 0 ? ' are plantations' : ''} ) : ( - {region} - {' '} - - - {formatNumber({ num: total, unit: '%' })} + {region}: {formatNumber({ num: total, unit: '%' })} {index === 0 ? ' are plantations' : ''} diff --git a/components/widgets/land-cover/ranked-plantations/index.js b/components/widgets/land-cover/ranked-plantations/index.js index 22c6cc6b57..d59f954f8a 100644 --- a/components/widgets/land-cover/ranked-plantations/index.js +++ b/components/widgets/land-cover/ranked-plantations/index.js @@ -55,11 +55,15 @@ export default { }, getData: (params) => all([ - getExtentGrouped(params), + getExtentGrouped({ + ...params, + version: 'v20240815', + }), getAreaIntersectionGrouped({ ...params, forestType: 'plantations', summary: true, + version: 'v20240815', }), ]).then( spread((extentGrouped, plantationsExtentResponse) => { @@ -78,12 +82,17 @@ export default { }) ), getDataURL: (params) => [ - getExtentGrouped({ ...params, download: true }), + getExtentGrouped({ + ...params, + download: true, + version: 'v20240815', + }), getAreaIntersectionGrouped({ ...params, forestType: 'plantations', download: true, summary: true, + version: 'v20240815', }), ], getWidgetProps,