2

Is it possible to change the default positions of the legend labels around the jasper reports charts? Currently I have a following kind of chart being created:

enter image description here

I would like to move this [hoursNormal, hoursTravel, hoursOvertime]-box from under the chart to the right side of the chart. Another thing I would like to do is to replace this [hoursNormal, hoursTravel, hoursOvertime]-box by label "month". I just don't see any tools for moving these positions in Jasper studio chart creation wizard, and to me also the xml looks like so static that I don't believe tinkering it would help me.

Hopefully I'm wrong and there is a easy solution?

Alex K
  • 22,315
  • 19
  • 108
  • 236
Vka
  • 321
  • 1
  • 7
  • 19
  • Nice screen shot, you have attribution for that, just kidding : ) – Petter Friberg Mar 08 '16 at 12:34
  • The "replace this [hoursNormal, hoursTravel, hoursOvertime]-box by label "month" is not clear what you mean (invert series and categories?), but I have answered so you can see how to set all properties on chart. – Petter Friberg Mar 08 '16 at 12:44
  • By this "replace this [hoursNormal, hoursTravel, hoursOvertime]-box by label "month" I was meaning that I would just like to print localized text "Month" under the chart. Basically your answer pointed me to the right direction with this one as well, as I noticed that it's possible to define the title for the report from the basic chart properties and position it to bottom. Yeah, that's one hell of a screenshot and I have a feeling I'm about to use it in one more question:) – Vka Mar 08 '16 at 13:03
  • here's one more follow-up: http://stackoverflow.com/questions/35868214/jasper-reports-multitype-chart-is-it-possible-to-add-xy-line-to-bar-chart – Vka Mar 08 '16 at 13:06

1 Answers1

1

Move the legend to the right and other option of the chart can be find in the Properties View.

Click the chart, to view Properties for the chart. Navigate the different properties tabs to set what you need.

Example

Screen shot

If you need more advanced feature on the chart you need to use a customizer class see this as example: How to put benchmark line on barchart?

Community
  • 1
  • 1
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109