Jump to content
We've recently updated our Privacy Statement, available here ×

How to arrange a legend in 2 rows and 2 columns in Jasper studio


Recommended Posts

I have plotted a graph (HTML5 chart) between 4 measures.

  1. Sales A
  2. Profit A
  3. Sales B
  4. Profit B

But when I plot the HTML5 chart in Jasper studio, the legend of the graph is being displayed as

"Sales A Sales B Profit A ""Profit B"

which means it is being displayed in 2 rows and 3 columns.

But I would like to see the legend as below

"Sales A   Sales B""Profit A  Profit B" 

That means I need legend should be arranged in 2 rows & 2 columns.

I have tried all possible ways by editing graph properties but did not get the solution.

How can I achieve this in Jasper graph?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

There are a lot of possible options to adjust the legend settings. Generally, I recommend checking the Highcharts API (the underlying functionality of our HTML5 Charts) for details and fiddle samples; specifically for legends: https://api.highcharts.com/highcharts/legend

I would look at itemWidth (https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/itemwidth-80/) and see if adjusting that number helps out. If you get the behavior you want in the fiddle, simply transfer the exact property over to our Advanced Properties settings in the HTML5 Charts Properties. There are other settings that may affect the look and feel per your requirements.

I hope this helps!

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...