]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/DNElementColorStyle.java
Add support for gradients in dynamic visualisations
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / DNElementColorStyle.java
index 7ebff91e5874ba520889f0cbb1106ea6779d8ce7..9bcae2e5f42e907231694ca559d7b68e64184416 100644 (file)
@@ -70,7 +70,7 @@ public class DNElementColorStyle extends ThrottledStyleBase<Color> {
                                         // here we do the adjusting according to spec in #15038
                                         double adjustedValue = possibleValue.doubleValue() * dcc.getVariableGain() + dcc.getVariableBias();
                                         DynamicColorMap defaultColorMap = dcc.getDefaultColorMap();
-                                        Color color = defaultColorMap.getColor(adjustedValue, dcc.getDefaultMin(), dcc.getDefaultMax());
+                                        Color color = defaultColorMap.getColor(adjustedValue, dv.getColorBarOptions().isUseGradients(), dcc.getDefaultMin(), dcc.getDefaultMax());
                                         return color;
                                     } else {
                                         LOGGER.warn("No value for {}", attribute.getURI(graph));