Jump to content
JasperReports Library 7.0 is now available ×

Adding plotLines to an HTML5 bar chart


Recommended Posts

Has anyone had any luck with adding a plotLine to an HTML5 chart?  I'm trying to replicate functionality as shown in this example:


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

  • 1 year later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 6 months later...

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}"
Then simply added an advanced property into the chart:
<hc:chartProperty name="yAxis.plotLines">
That did the trick for me.  Thanks to emistry above, btw.


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...