This is a migrated thread and some comments may be shown as answers.

Bubble Series: Label inside the bubble

6 Answers 96 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Houssem
Top achievements
Rank 1
Houssem asked on 21 Jun 2017, 08:33 AM

Hi,

I would like to display the label inside the bubble series, I have changed in the label definition VerticalAlignment to center but  it is shown now in the bottom of the bubble. 

 

Can any one help me to fix this issue?

Thanks

6 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 23 Jun 2017, 02:11 PM
Hello Sam,

You're probably observing this behavior because you're using the SmartLabelsStrategy.

I'm attaching a sample project where the label is correctly positioned when setting the HorizontalAlignment and VerticalAlignment properties to Center.

Please have a look at it and let me know if it works for you as well.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Houssem
Top achievements
Rank 1
answered on 23 Jun 2017, 03:38 PM
thank you for your reply, your solution works for me. But in my case I'm doing the binding in c# code and when I set the Vertical Alignment to VerticalAlignment.Center. The label is on the bottom of the bubble. 
0
Dilyan Traykov
Telerik team
answered on 26 Jun 2017, 01:00 PM
Hello,

I'm attaching another project where defining the label definition in code-behind provides the same result.

Can you please check how this project differs from the setup at your end and clarify whether or not you're using SmartLabelsStrategy?

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Houssem
Top achievements
Rank 1
answered on 27 Jun 2017, 12:55 PM

Thank you, you are right. Actually we are using SmartLabelsStrategy and we can't removed. is there another way that we can force the centring of this label ?

Thanks :) 

0
Accepted
Dilyan Traykov
Telerik team
answered on 29 Jun 2017, 03:36 PM
Hello,

As the SmartLabelsStrategy overrides the default placement of the labels, you cannot position the elements using the HorizontalAlignment and VerticalAlignment properties.

If you're using multiple series, you can create a custom strategy and keep the positions for the labels only for the bubble series. You can have a look at the Smart Labels demo from the WPF Controls Samples which demonstrates a sample implementation of a custom smart labels strategy.

I hope you find this helpful.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Houssem
Top achievements
Rank 1
answered on 07 Jul 2017, 12:26 PM
Thanks :)
Tags
Chart
Asked by
Houssem
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Houssem
Top achievements
Rank 1
Share this question
or