Horizontal Legend Layout

Charts for WPF Forum

Posted 7 years ago by Nathan Hanson
Version: 17.2.0662

Hi! I'm evaluating Actipro's charting component for use in an upcoming software release. It's looking great so far but I have a question about the legend. The Legend can be placed in a variety of locations and that's really helpful. But I'd like to have the legend items lay out horizontally instead of vertically when I put the legend above or below the chart itself. Can a horizontal orientation be set through a template or anything?


Nate Hanson


Comments (2)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Nate,

Thanks for evaluating our products.  The Legend is an ItemsControl, so you can change its layout to horizontal by adding this to XYChart:

	<Style TargetType="ItemsControl">
		<Setter Property="ItemsPanel">
					<StackPanel Orientation="Horizontal" />

Actipro Software Support

Posted 7 years ago by Nathan Hanson

Excellent! That worked like a charm. I love WPF components. The chart I'm hoping to replace is an old Winforms component and I have no control over things like the legend style.

Thanks for the help! I'll be demoing my WPF chart sample app for the higher ups soon. Hoping to sell them on the whole suite of your controls.

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.