-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add learning by sector,regions bar chart and Map for learning #1577
base: project/operational-learning-2.0
Are you sure you want to change the base?
Add learning by sector,regions bar chart and Map for learning #1577
Conversation
|
89e0a01
to
e80e0a5
Compare
}, | ||
[], | ||
); | ||
const timeseriesChartClassNameSelector = () => styles.sourceChart; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this out of component.
const xAxisFormatter = (date: Date) => date.toLocaleString( | ||
navigator.language, | ||
{ month: 'short' }, | ||
); | ||
const timeSeriesValueSelector = useCallback( | ||
(_: string, date: Date) => timeSeriesDataKeys?.find( | ||
(source) => ( | ||
getFormattedDateKey(source.date) === getFormattedDateKey(date) | ||
), | ||
)?.count ?? 0, | ||
[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can move this to out of component.
heading="Map" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use translation strings.
keySelector={(item) => item.id} | ||
valueSelector={(item) => item.value} | ||
labelSelector={(item) => item.name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use arrow functions as props.
keySelector={(item) => item.id} | ||
valueSelector={(item) => item.value} | ||
labelSelector={(item) => item.name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not pass arrow functions as props to the component.
/> | ||
</Container> | ||
<Container | ||
heading="learnings by regions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use translation strings.
/> | ||
<div className={styles.charts}> | ||
<Container | ||
heading="learnings by sectors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use translation strings.
/> | ||
</Container> | ||
<Container | ||
heading="Source overtime" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use translation strings.
e80e0a5
to
3bde6b9
Compare
3bde6b9
to
3ef7309
Compare
3ef7309
to
a9f5ebb
Compare
a9f5ebb
to
3071d1b
Compare
8ee38d7
to
6af5950
Compare
6af5950
to
087c25b
Compare
9ad1428
to
c289b84
Compare
c289b84
to
0c9ac3f
Compare
0c9ac3f
to
bb76ad2
Compare
@@ -0,0 +1,6 @@ | |||
{ | |||
"namespace": "learningMap", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"namespace": "learningMap", | |
"namespace": "operationalLearningMap", |
{ | ||
"namespace": "learningMap", | ||
"strings": { | ||
"learningDownloadMapTitle": "Operational learning" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"learningDownloadMapTitle": "Operational learning" | |
"downloadMapTitle": "Operational learning map" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename file to OperationalLearningMap
<MapLayer | ||
layerKey="outer-circle" | ||
layerOptions={outerCircleLayerOptionsForPersonnel} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this?
const outerCirclePaintForPersonnel: CirclePaint = { | ||
...baseOuterCirclePaint, | ||
'circle-radius': [ | ||
'interpolate', | ||
['linear', 1], | ||
['get', 'learning'], | ||
|
||
2, | ||
5, | ||
4, | ||
7, | ||
6, | ||
9, | ||
8, | ||
11, | ||
10, | ||
13, | ||
12, | ||
15, | ||
], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are thinking of making the circles bigger based on learning count then we need to appropriately use the logic for defining stops.
bb76ad2
to
b3c6ee6
Compare
b3c6ee6
to
f27904a
Compare
f27904a
to
e13a0c3
Compare
Addresses:
Changes
This PR doesn't introduce:
console.log
meant for debugging