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 24, 2024
1 parent ed569a8 commit 7f9ca84
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 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
10 changes: 5 additions & 5 deletions data/colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,19 @@
"plantations": {
"main": "#d67828",
"species": {
"Oil Palm": "#fdada9",
"Wood fiber / Timber": "#98a7c4",
"Oil palm": "#fdada9",
"Wood fiber or timber": "#98a7c4",
"Rubber": "#9993a3",
"Fruit": "#dada95",
"Other": "#d1e6ab",
"Wood fiber / Timber Mix": "#9ebbf2",
"Oil Palm Mix": "#fcc4c1",
"Wood fiber or timber Mix": "#9ebbf2",
"Oil palm Mix": "#fcc4c1",
"Rubber Mix": "#a4fdff",
"Fruit Mix": "#fefe97",
"Other Mix": "#e1efc8",
"Unknown": "#dcd9d9",
"Recently Cleared": "#d5a6ea",
"Unknown Mix": "#a0c746"
"Unknown mix": "#a0c746"
},
"types": {
"Large industrial plantation": "#fdada9",
Expand Down

0 comments on commit 7f9ca84

Please sign in to comment.