Bubble Series: Label inside the bubble

7 posts, 1 answers
  1. Houssem
    Houssem avatar
    9 posts
    Member since:
    Jun 2017

    Posted 21 Jun Link to this post

    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

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    603 posts

    Posted 23 Jun Link to this post

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Houssem
    Houssem avatar
    9 posts
    Member since:
    Jun 2017

    Posted 23 Jun in reply to Dilyan Traykov Link to this post

    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. 
  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    603 posts

    Posted 26 Jun Link to this post

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  5. Houssem
    Houssem avatar
    9 posts
    Member since:
    Jun 2017

    Posted 27 Jun in reply to Dilyan Traykov Link to this post

    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 :) 

  6. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    603 posts

    Posted 29 Jun Link to this post

    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 allow you to write beautiful native mobile apps using a single shared C# codebase.
  7. Houssem
    Houssem avatar
    9 posts
    Member since:
    Jun 2017

    Posted 07 Jul in reply to Dilyan Traykov Link to this post

    Thanks :)
Back to Top