-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from dataesr/fundingRankingCharts
add charts coordination + involved
- Loading branch information
Showing
10 changed files
with
379 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...s/analysis/positioning/charts/funding-ranking/options-coordination_number-succes-rate.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
export default function optionCoordinationNumberSuccessRate(data) { | ||
if (!data) return null; | ||
|
||
// average ratio | ||
const total = data.reduce((acc, el) => acc + el.ratio_coordination_number, 0); | ||
const average = total / data.length; | ||
|
||
return { | ||
chart: { | ||
type: "bar", | ||
height: 400, | ||
}, | ||
title: { text: "" }, | ||
legend: { enabled: false }, | ||
credits: { enabled: false }, | ||
|
||
xAxis: { | ||
visible: false, | ||
}, | ||
yAxis: { | ||
plotLines: [{ | ||
color: '#D75521', | ||
width: 4, | ||
value: average, | ||
zIndex: 4, | ||
dashStyle: 'dot', | ||
}], | ||
min: 0, | ||
title: { | ||
text: 'Taux de succès %' | ||
}, | ||
}, | ||
tooltip: { | ||
pointFormat: 'Taux de succès : <b>{point.y:.1f} % </b>' | ||
}, | ||
plotOptions: { | ||
series: { dataLabels: { enabled: true } } | ||
}, | ||
series: [ | ||
{ | ||
name: 'Succès sur les montants', | ||
colors: ['#27A658'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.ratio_coordination_number, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.name}' | ||
}], | ||
} | ||
] | ||
}; | ||
} |
68 changes: 68 additions & 0 deletions
68
...ponents/pages/analysis/positioning/charts/funding-ranking/options-coordination_number.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export default function OptionsCoordinationNumber(data) { | ||
if (!data) return null; | ||
|
||
return { | ||
chart: { | ||
type: "bar", | ||
height: 400, | ||
}, | ||
title: { text: "" }, | ||
legend: { enabled: false }, | ||
credits: { enabled: false }, | ||
|
||
xAxis: { | ||
type: 'category', | ||
labels: { | ||
autoRotation: [-45, -90], | ||
style: { | ||
fontSize: '13px', | ||
fontFamily: 'Verdana, sans-serif' | ||
} | ||
} | ||
}, | ||
yAxis: { | ||
min: 0, | ||
title: { | ||
text: 'Euros € (millions)' | ||
} | ||
}, | ||
tooltip: { | ||
pointFormat: 'Nombre de coordinations : <b>{point.y}</b>' | ||
}, | ||
plotOptions: { | ||
series: { dataLabels: { enabled: true } } | ||
}, | ||
series: [ | ||
{ | ||
name: 'Coordination de projets déposés', | ||
colors: ['#009099'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.total_coordination_number_evaluated, | ||
rank_coordination_number_evaluated: item.rank_coordination_number_evaluated, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.rank_coordination_number_evaluated}e' | ||
}], | ||
}, | ||
{ | ||
name: 'Coordination de projets lauéats', | ||
colors: ['#233E41'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.total_coordination_number_successful, | ||
rank_coordination_number_successful: item.rank_coordination_number_successful, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.rank_coordination_number_successful}e' | ||
}], | ||
} | ||
] | ||
}; | ||
} |
56 changes: 56 additions & 0 deletions
56
...pages/analysis/positioning/charts/funding-ranking/options-number_involved-succes-rate.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
export default function optionNumberInvolvedSuccessRate(data) { | ||
if (!data) return null; | ||
|
||
// average ratio | ||
const total = data.reduce((acc, el) => acc + el.ratio_involved, 0); | ||
const average = total / data.length; | ||
|
||
return { | ||
chart: { | ||
type: "bar", | ||
height: 400, | ||
}, | ||
title: { text: "" }, | ||
legend: { enabled: false }, | ||
credits: { enabled: false }, | ||
|
||
xAxis: { | ||
visible: false, | ||
}, | ||
yAxis: { | ||
plotLines: [{ | ||
color: '#D75521', | ||
width: 4, | ||
value: average, | ||
zIndex: 4, | ||
dashStyle: 'dot', | ||
}], | ||
min: 0, | ||
title: { | ||
text: 'Taux de succès %' | ||
}, | ||
}, | ||
tooltip: { | ||
pointFormat: 'Taux de succès : <b>{point.y:.1f} % </b>' | ||
}, | ||
plotOptions: { | ||
series: { dataLabels: { enabled: true } } | ||
}, | ||
series: [ | ||
{ | ||
name: 'Succès sur les participants', | ||
colors: ['#27A658'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.ratio_involved, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.name}' | ||
}], | ||
} | ||
] | ||
}; | ||
} |
68 changes: 68 additions & 0 deletions
68
.../components/pages/analysis/positioning/charts/funding-ranking/options-number_involved.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export default function OptionsNumberInvolved(data) { | ||
if (!data) return null; | ||
|
||
return { | ||
chart: { | ||
type: "bar", | ||
height: 400, | ||
}, | ||
title: { text: "" }, | ||
legend: { enabled: false }, | ||
credits: { enabled: false }, | ||
|
||
xAxis: { | ||
type: 'category', | ||
labels: { | ||
autoRotation: [-45, -90], | ||
style: { | ||
fontSize: '13px', | ||
fontFamily: 'Verdana, sans-serif' | ||
} | ||
} | ||
}, | ||
yAxis: { | ||
min: 0, | ||
title: { | ||
text: 'Euros € (millions)' | ||
} | ||
}, | ||
tooltip: { | ||
pointFormat: 'Nombre de candidats : <b>{point.y}</b>' | ||
}, | ||
plotOptions: { | ||
series: { dataLabels: { enabled: true } } | ||
}, | ||
series: [ | ||
{ | ||
name: 'Candidats', | ||
colors: ['#009099'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.total_number_involved_evaluated, | ||
rank_number_involved_evaluated: item.rank_involved_evaluated, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.rank_number_involved_evaluated}e' | ||
}], | ||
}, | ||
{ | ||
name: 'Participants', | ||
colors: ['#233E41'], | ||
colorByPoint: true, | ||
groupPadding: 0, | ||
data: data.map((item) => ({ | ||
name: item.name, | ||
y: item.total_number_involved_successful, | ||
rank_number_involved_successful: item.rank_involved_successful, | ||
})), | ||
dataLabels: [{ | ||
align: 'right', | ||
format: '{point.rank_number_involved_successful}e' | ||
}], | ||
} | ||
] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.