Ryan.Wright Posted November 7, 2014 Share Posted November 7, 2014 Has anyone had any luck with adding a plotLine to an HTML5 chart? I'm trying to replicate functionality as shown in this example:http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/stock/xaxis/plotlines/Whenever I add this and run it in JasperStudio, I just get an error:org.mozilla.javascript.EcmaError: TypeError: Cannot find function concat in object [object Object]. (com/jaspersoft/jasperreports/highcharts/charts/render/scripts/highcharts-3.0.7.bbox.js#8481)Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
emistry Posted December 16, 2015 Share Posted December 16, 2015 Add values like yAxis.plotLines [{value: 500000,color: 'green',dashStyle: 'shortdash',width: 2}] This should do it .. Link to comment Share on other sites More sharing options...
somnath.muluk Posted June 30, 2016 Share Posted June 30, 2016 How did you add this properties in JRXML? Link to comment Share on other sites More sharing options...
Ryan.Wright Posted June 30, 2016 Author Share Posted June 30, 2016 I created a variable to hold my plotLines function like this:<variable name="vPlotLines" class="java.lang.String" resetType="Group" resetGroup="grpIteration"><variableExpression><![CDATA["(function(){return [{value: 10,width: 1,color: 'red',dashStyle: 'solid',label: {style: {color: 'red'},text: 'label',align: 'left',y: -15,x: 0,verticalAlign: 'bottom',rotation: 0},zIndex: 9}"]]></variableExpression> Then simply added an advanced property into the chart: <hc:chartProperty name="yAxis.plotLines"><hc:propertyExpression><![CDATA[$V{vPlotLines}]]></hc:propertyExpression></hc:chartProperty> That did the trick for me. Thanks to emistry above, btw. 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