Jaspersoft Studio - Bulb Widget Color Range

0

I'm assuming there is a quick fix for this one, and that I'm just looking at it the wrong way.  I've created a bulb widget, which I'd like to have different shades based upon the value of data returned from my data source.  I'm setup a color range, and assigned an integer value of 1 and say 99999 (Using variables I created) for the min and max value expression.  However, upon execution of the report, I'll see the value printed below where the bulb should be, but their is no bulb.  If I remove the color range, the bulb prints, but with a default gray color.

Did I miss something obvious here?  

darren.greer's picture
Joined: Feb 16 2015 - 12:51pm
Last seen: 2 years 5 months ago

For those that may run into a similar issue, I found the solution to be as simple as editing the JRXML manually, and place teh integer values desired directly, versus using the designer.   The following settings worked for me:

<fw:colorRange color="#00CC00">
    <fw:minValueExpression><![CDATA[-99999]]></fw:minValueExpression>
    <fw:maxValueExpression><![CDATA[1]]></fw:maxValueExpression>
    <fw:labelExpression><![CDATA[$F{DAYS_LATE}.toString()]]></fw:labelExpression>
</fw:colorRange>

darren.greer - 4 years 7 months ago

1 Answer:

0
<fw:colorRange color="#00CC00">
    <fw:minValueExpression><![CDATA[-99999]]></fw:minValueExpression>
    <fw:maxValueExpression><![CDATA[1]]></fw:maxValueExpression>
    <fw:labelExpression><![CDATA[$F{DAYS_LATE}.toString()]]></fw:labelExpression>
</fw:colorRange>

Per my comment above, the above code, directly entering the integer values in the source, versus the design, is working for my implementation.

darren.greer's picture
Joined: Feb 16 2015 - 12:51pm
Last seen: 2 years 5 months ago
Feedback
randomness