Skip to content

Commit 575a765

Browse files
committed
Fix missing range bug
1 parent 31a6a0d commit 575a765

File tree

1 file changed

+4
-8
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util

1 file changed

+4
-8
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util/ChartUtil.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ public static List<EMDataSet> sortDataSets(Collection<EMDataSet> dataSets) {
100100
*/
101101
@SuppressWarnings("unchecked")
102102
public static List<Double> calculateGlobalRange(CyNetwork network, List<CyColumnIdentifier> dataColumns) {
103-
List<Double> range = new ArrayList<>(2);
104103
List<CyNode> nodes = network.getNodeList();
105104

106105
if (!nodes.isEmpty()) {
@@ -138,17 +137,14 @@ else if (row.isSet(column.getName()))
138137
}
139138

140139
if (min != Double.POSITIVE_INFINITY && max != Double.NEGATIVE_INFINITY) {
141-
range.add(min);
142-
range.add(max);
140+
return List.of(min, max);
143141
}
144-
} else {
145-
range.add(0.0);
146-
range.add(0.0);
147-
}
142+
}
148143

149-
return range;
144+
return List.of(0.0, 0.0);
150145
}
151146

147+
152148
public static List<Color> getChartColors(ChartOptions options, boolean forStyle) {
153149
ColorScheme colorScheme = options != null ? options.getColorScheme() : null;
154150
List<Color> colors = colorScheme != null ? colorScheme.getColors() : null;

0 commit comments

Comments
 (0)