Skip to content

Commit

Permalink
feat(rankedPlantations): update data version and update CustomTick co…
Browse files Browse the repository at this point in the history
…mponent to not render hyphen
  • Loading branch information
wri7tno committed Nov 25, 2024
1 parent d28af83 commit 666345a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
10 changes: 2 additions & 8 deletions components/charts/horizontal-bar-chart/custom-tick-component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,13 @@ const CustomTick = ({ x, y, index, yAxisDotFill, data, settings }) => {
<text x="8" y="-16" textAnchor="start" fontSize="12px" fill="#555555">
{extLink ? (
<a href={path.href} target="_blank" rel="noopener noreferrer">
{region}
{' '}
-
{formatNumber({ num: total, unit: '%' })}
{region}: {formatNumber({ num: total, unit: '%' })}
{index === 0 ? ' are plantations' : ''}
</a>
) : (
<Link {...path}>
<a>
{region}
{' '}
-
{formatNumber({ num: total, unit: '%' })}
{region}: {formatNumber({ num: total, unit: '%' })}
{index === 0 ? ' are plantations' : ''}
</a>
</Link>
Expand Down
13 changes: 11 additions & 2 deletions components/widgets/land-cover/ranked-plantations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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,
Expand Down

0 comments on commit 666345a

Please sign in to comment.