Skip to content
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

#3983 [RiskGraph] add: add position to order charts #3985

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

evarisk-francois
Copy link
Contributor

No description provided.

@evarisk-francois evarisk-francois self-assigned this Jun 19, 2024
@evarisk-francois evarisk-francois added the Amélioration Minor feature label Jun 19, 2024
@evarisk-francois evarisk-francois linked an issue Jun 19, 2024 that may be closed by this pull request
Copy link
Member

@evarisk-micka evarisk-micka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les positions 10 -> 20 -> 30 -> 40 etc...

class/accident.class.php Show resolved Hide resolved
@@ -639,7 +642,7 @@ public function getDigiriskElementListsByDepth(): array
];
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Un tab en trop au lieu d'un espace vide, pareil au dessus

@@ -604,7 +608,7 @@ public function getRisksByCotation(): array
$array['dataset'] = 1;
$array['labels'] = $this->cotations;

$riskAssessmentList = $riskAssessment->fetchAll('', '', 0, 0, ['customsql' => 'status = 1']);
$riskAssessmentList = $riskAssessment->fetchAll('', '', 0, 0, ['customsql' => 'status > 0']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas besoin


$array['graphs'] = [$getRisksByCotation, $getRisksByDangerCategoriesAndCriticality, $getRisksByDangerCategories];
$array['graphs'] = [$getRisksByDangerCategoriesAndCriticality, $getRisksByCotation , $getRisksByDangerCategories];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si l'ordre est géré par la position, plus besoin de changer l'ordre dans l'array ?

}
}

$array['data'] = array_count_values($children['all']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si jamais le "contient GP 6 UT 9" est fait dans une autre issue, penser à le retirer

Copy link
Contributor

@nicolas-eoxia nicolas-eoxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'idée est très intéressante mais il faut revoir la conception car la position comme la visibilité est une donné configurable par l'utilisateur
De plus, on souhaite ici positionner les graphs par rapport au autre donc il s'agit d'une donnée du graph par de son chargement

Copy link
Member

@evarisk-micka evarisk-micka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue à revoir, la position des graphiques devraient être géré par les utilisateurs et non défini impartialement

@evarisk-francois
Copy link
Contributor Author

Je vais poser ça ici parce que peut-être que je ne comprends pas bien le code et que je me complique la vie.
Actuellement la structure des graphiques est en dossier à peu près comme ça :

  • type de donnée 1
    • graph 1
    • graph 2
  • type de donnée 2
    • graph 1
  • etc...

Le problème, c'est que quelle que soit la position des graphs, ils seront quand même bloqués par le type de donnée, e.g. même si un graph du type 2 est en position 1 et un graph du type 1 est en position 10, le graph de type 1 sera malgré tout affiché en premier.

Du coup, c'est compliqué de laisser le choix à l'utilisateur de l'ordre. Cependant, peut que de juste "flatten" la liste des graphs après les avoir récupérés serait la solution, sinon il faut revoir comment on récupère les graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 Amélioration Minor feature
Development

Successfully merging this pull request may close these issues.

Echanger ordre des graph tableau de bord
3 participants