skatariya Posted June 4, 2015 Share Posted June 4, 2015 Currently I am doing like this<hc:chartProperty name="colorAxis.dataClasses"><hc:propertyExpression><![CDATA[java.util.Arrays.asList (java.util.Arrays.asList(0), java.util.Arrays.asList(0,20), java.util.Arrays.asList(20,40), java.util.Arrays.asList(40,60), java.util.Arrays.asList(60,80), java.util.Arrays.asList(80,100))]]></hc:propertyExpression></hc:chartProperty>And then I am setting this property<hc:chartProperty name="colors"><hc:propertyExpression><![CDATA[java.util.Arrays.asList( "#FFFFFF", "#4A90E2","#6FA7E8","#93BDEE", "#B7D3F4","#DBE9FA")]]></hc:propertyExpression></hc:chartProperty>and then <hc:chartProperty name="colorAxis.dataClassColor"><hc:propertyExpression><![CDATA["category"]]></hc:propertyExpression></hc:chartProperty>So that it takes the color which I have defined. The error I am getting is that,The legend does not displays like >0, 0-20 and so on as shown in the following fiddle http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/maps/demo/data-class-ranges/I am justting getting colors followed by <The heat map picks up only the last color no matter what data is there in the cell.I have already used color stops but we have specific requirement of dataclasses.Please let me know how to use them in JRXMLI am using Jaspersoft Studio version 6 Link to comment Share on other sites More sharing options...
craig.linderoth Posted June 16, 2015 Share Posted June 16, 2015 Use the Function Return to send multiple parameters into an expected JSON for highcharts. The list array is fine with only a single parameter with multiple values, but here you need multiple parameters answered: <hc:chartProperty name="colorAxis.dataClasses"><hc:propertyExpression><![CDATA["function(){return [{to: 0, color: '#FFFFFF', name: 'Missing Data'},{from: 0, to: 20, color: '#4A90E2', name: 'From 0 to 20%'},{from: 20, to: 40, color: '#6FA7E8', name: 'From 20% to 40%'},{from: 40, to: 60, color: '#93BDEE', name: 'From 40% to 60%'},{from: 60, to: 90, color: '#B7D3F4', name: 'From 60% to 90%'},{from: 90, color: '#DBE9FA', name: 'From 90% to 100%'}]}()"]]></hc:propertyExpression></hc:chartProperty> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now