Skip to content

Commit

Permalink
indicator study
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjeangirard committed Jan 10, 2024
1 parent 0aace61 commit eed1b27
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function useGetData(studyType, sponsor = '*') {
const yearMax = currentYear - 1;
const yearMin = yearMax - 10;
const yearMax2 = currentYear - 3;
const yearMin2 = yearMax2 - 10;
const yearMin2 = yearMax2 - 6;
const query1 = getFetchOptions({
key: 'studiesDynamiqueOuverture',
parameters: [studyType, yearMin, yearMax],
Expand Down Expand Up @@ -238,19 +238,24 @@ function useGetData(studyType, sponsor = '*') {

const series3 = [
{
color: getCSSValue('--blue-soft-100'),
data: allTypesData3,
name: capitalize(intl.formatMessage({ id: 'app.all-sponsor-types' })),
id: 'public',
color: getCSSValue('--lead-sponsor-public'),
data: academicData3,
name: capitalize(intl.formatMessage({ id: 'app.sponsor.academique' })),
pointPlacement: -0.2,
},
{
id: 'prive',
color: getCSSValue('--lead-sponsor-privee'),
data: industrialData3,
name: capitalize(intl.formatMessage({ id: 'app.sponsor.industriel' })),
pointPlacement: 0.2,
},
{
color: getCSSValue('--lead-sponsor-public'),
data: academicData3,
name: capitalize(intl.formatMessage({ id: 'app.sponsor.academique' })),
id: 'main',
color: getCSSValue('--blue-soft-100'),
data: allTypesData3,
name: capitalize(intl.formatMessage({ id: 'app.all-sponsor-types' })),
},
];
const dataGraph3 = { categories: categories3, series: series3 };
Expand Down
9 changes: 7 additions & 2 deletions src/utils/chartOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2315,14 +2315,18 @@ export const chartOptions = {
'general.dynamique.chart-evolution-within-2-years-by-year': {
getOptions: (id, intl, data, studyType, dataTitle) => {
const options = getGraphOptions({ id, intl, studyType, dataTitle });
options.chart.type = 'column';
options.chart = {
type: 'bar',
height: '650px',
};
options.plotOptions = {
series: {
grouping: false,
dataLabels: {
enabled: false,
},
},
column: {
bar: {
dataLabels: {
enabled: true,
format: '{point.y:.0f} %',
Expand All @@ -2338,6 +2342,7 @@ export const chartOptions = {
},
lineWidth: 0,
tickWidth: 0,
reversed: false,
labels: {
style: {
color: getCSSValue('--g800'),
Expand Down

0 comments on commit eed1b27

Please sign in to comment.