ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Question about how to position the legend box
Posted by Hong on Nov-05-2025 16:14
I’m always grateful for your kind and helpful answers.

Is it possible to arrange the 10 items like the example below?

1,2,3,4
5,6,7
8,9,10

Thank you!

  Re: Question about how to position the legend box
Posted by Peter Kwan on Nov-06-2025 00:22
Hi Hong,

If you want to use a specific legend layout, I assume that means you know the layout is reasonable. For example, you know the size of the legend label that 4 of them can fit on the first line.

One way to achieve that layout is to use the grid layout for the legend box. See:

https://www.advsofteng.com/doc/cdcpp.htm#BaseChart.addLegend2.htm

You can set the legend box to have 4 columns. The first row will have 1, 2, 3, 4. The second row will have 5, 6, 7, 8. If you do not want the 8 in the second row, you may add an invisible entry for 8. For example, you can add a dummy dataset with no data, and the color is transparent and the name is a space character, so the cell for 8 will look empty.  The final row will have three entries for 8, 9, 10.

Best Regards
Peter Kwan

  Re: Question about how to position the legend box
Posted by Hong on Nov-06-2025 16:13
Thank you!!

So powerful hint and it works well :-)