We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I format the legend text?

Platform: Windows Phone |
Control: SfChart |
Published Date: April 24, 2015 |
Last Revised Date: April 24, 2015

Description:

Legends do not need to be restricted to be positioned on top of the chart. It is required to place in or around the plot area, based on the series or data. This article describes how you can customize the legend position.

Solution:

SfChart has properties that help you align or position the legends anywhere in the chart. For example, DockPosition is used to position the legends either at the Bottom, Left, Right or at the Top. Another option is Floating, that can be used to position the legends anywhere over the plot area.

The OffsetX and OffsetY properties are used to give horizontal and vertical offset for the legends. These properties work only with DockPosition as Floating.

LegendPosition is used to place the legends Inside or Outside of the plot area.

Example 1:

XAML

Output:

F:\Issue Files Chart\Issue File -10 Knowledge Base\WP_ScreenShot\New Second TIme\wp_ss_20150210_0028.png

Figure 1: Legends positioned with DockPosition at the Top and LegendPosition Outside

Example 2

XAML

Output:

F:\Issue Files Chart\Issue File -10 Knowledge Base\WP_ScreenShot\New Second TIme\wp_ss_20150210_0029.png

Figure 2: Legends positioned with DockPosition as Floating and LegendPosition as Inside

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon