|
17 | 17 | ,coalesce(central.fqn, central.globalFqn, central.fileName, central.signature, central.name) AS targetName |
18 | 18 | ,[] AS graphVizOutput |
19 | 19 | WITH *, graphVizOutput + ["graph [label=\"" + graphLabel + targetName + "\\n\\n\"];"] AS graphVizOutput |
20 | | - WITH *, "🧩\\noutlier #" + central.anomalyOutlierRank + "\\n" + central.name AS centralNodeLabel |
| 20 | + WITH *, "🧩 outlier #" + central.anomalyOutlierRank + "\\n" + central.name AS centralNodeLabel |
21 | 21 | WITH *, graphVizOutput + ["central [label=\"" + centralNodeLabel + "\"];"] AS graphVizOutput |
22 | 22 | // Step 3: Query direct incoming dependencies to the central node |
23 | 23 | MATCH (source)-[dependency:DEPENDS_ON]->(central) |
|
29 | 29 | WITH *, round((toFloat(weight) / toFloat(maxWeight) * 2.5) + 0.4, 1.0) AS penWidth |
30 | 30 | WITH *, "label=" + weight + "; weight=" + weight + "; penwidth=" + penWidth AS edgeAttributes |
31 | 31 | WITH *, CASE WHEN source.clusteringHDBSCANNormalizedDistanceToMedoid > clusterMedoidDistanceThreshold THEN 5 ELSE 2 END AS scaledNodeBorder |
32 | | - WITH *, round((1.0 - source.clusteringHDBSCANProbability) * 1.8 - 0.2, 3) AS scaledNodeSize |
| 32 | + WITH *, round((1.0 - source.clusteringHDBSCANProbability) * 1.3 + 1.0, 3) AS scaledNodeSize |
33 | 33 | WITH *, round(source.clusteringHDBSCANProbability * 100.0, 2) + "%" AS labelValue |
34 | | - WITH *, coalesce(scaledNodeSize, 0.5) AS scaledNodeSize |
35 | 34 | WITH *, source.name + "_" + split(elementId(source), ':')[-1] AS sourceId |
36 | 35 | WITH *, "penwidth = " + scaledNodeBorder + "; " AS directInBorder |
37 | 36 | WITH *, "height = " + scaledNodeSize + "; " AS directInSize |
|
57 | 56 | // Use a lighter color for the target nodes of outgoing dependencies from the central node and their edges |
58 | 57 | WITH *, edgeAttributes + "; color = 5" AS edgeAttributes |
59 | 58 | WITH *, CASE WHEN source.clusteringHDBSCANNormalizedDistanceToMedoid > clusterMedoidDistanceThreshold THEN 5 ELSE 2 END AS scaledNodeBorder |
60 | | - WITH *, round((1.0 - source.clusteringHDBSCANProbability) * 1.8 - 0.2, 3) AS scaledNodeSize |
| 59 | + WITH *, round((1.0 - source.clusteringHDBSCANProbability) * 1.3 + 1.0, 3) AS scaledNodeSize |
61 | 60 | WITH *, round(source.clusteringHDBSCANProbability * 100.0, 2) + "%" AS labelValue |
62 | | - WITH *, coalesce(scaledNodeSize, 0.5) AS scaledNodeSize |
63 | 61 | WITH *, source.name + "_" + split(elementId(source), ':')[-1] AS sourceId |
64 | 62 | WITH *, "penwidth = " + scaledNodeBorder + "; " AS directOutBorder |
65 | 63 | WITH *, "height = " + scaledNodeSize + "; " AS directOutSize |
|
68 | 66 | WITH *, " [" + directOutLabel + directOutBorder + directOutSize + directOutColors + "]; " AS directOutNodeProperties |
69 | 67 | WITH *, "\"" + sourceId + "\" " + directOutNodeProperties AS directOutNode |
70 | 68 | WITH maxWeight |
71 | | - ,clusterMedoidDistanceThreshold |
72 | 69 | ,central |
73 | 70 | ,graphVizOutput |
74 | 71 | ,incomingDependencyNodes |
|
83 | 80 | AND anotherDirectDependentNode <> directDependentNode |
84 | 81 | ORDER BY dependency.weight DESC, directDependentNode.name ASC |
85 | 82 | WITH maxWeight |
86 | | - ,clusterMedoidDistanceThreshold |
87 | 83 | ,central |
88 | 84 | ,graphVizOutput |
89 | 85 | ,directDependentNode |
|
0 commit comments