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. Image for the cookie policy date
close icon

Label Placement

Hello,

I have a SfChart with multiple charts.
As my Label is quite big and placed on mid-height, it covers some of my charts (see https://imgur.com/a/pJOW9Ow)
Is there an option for my label to transpose the label in some direction (like: place it on top or bottom instead of mid-height)?

Greetings
Aleaxnder

9 Replies

MK Muneesh Kumar G Syncfusion Team May 20, 2019 09:29 AM UTC

Hi Alexander,  
 
Greetings from Syncfusion.  
 
We have analyzed your requirement and you can achieve this by setting LabelVerticalAlignment as Near/Far as per the below code snippet.  
 
Code snippet 
   <syncfusion:SfChart.Behaviors> 
                <syncfusion:ChartTrackBallBehavior LabelVerticalAlignment="Near" 
                                                   
                                                   LabelDisplayMode="GroupAllPoints"/> 
            </syncfusion:SfChart.Behaviors> 
 
For more information, please refer below user documentation for more details.  
 
 
Hope it helps you.  
 
Regards, 
Muneesh Kumar G. 



AL Alexander May 21, 2019 08:51 AM UTC

Hello,

thank you for your answer.
Sadly, using LabelVerticalAlignment didn't work (probably because I have multiple Y-Axis).
However, using LabelHorizontalAlignment did work (it transposed the label to the left/right of the cursor, instead of up/down, but that was just fine), making the covered points readable.

Thank you very much
Alexander


MK Muneesh Kumar G Syncfusion Team May 21, 2019 08:55 AM UTC

Hi Alexander,   
 
Glad that the issue has been resolved and please get back to us if you need any other assistance.  
 
Thanks, 
Muneesh Kumar G. 



AL Alexander September 5, 2019 12:24 PM UTC

Hello,

sadly I have to dig this old thread out again, as it seems that the solution for this issue does no longer work for 17.2.
The latest working version is 17.1.0.53.

With 17.2, the label is placed right in the center of the trackball, covering the used points.
Can you please make LabelHorizontalAlignment work again?

Greetings
Alexander


MK Muneesh Kumar G Syncfusion Team September 6, 2019 09:59 AM UTC

Hi Alexander, 
 
We have prepared a sample to replicate the issue based on the provided scenario with mentioned version, but we are afraid, that we are not able to reproduce the issue at our end. The sample we tried can be downloaded from the below location. 
  
 
Code snippet 
 
  <chart:SfChart.Behaviors> 
                <chart:ChartTrackBallBehavior LabelHorizontalAlignment="Far" LabelVerticalAlignment="Near"/> 
            </chart:SfChart.Behaviors> 
 
 
 
 
  
Since we are not aware of your exact application scenario, we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to provide you better solution at the earliest.   
 
Thanks, 
Muneesh Kumar G 
 



AL Alexander September 11, 2019 09:15 AM UTC

Hello,

you can find the complete project here:
https://github.com/gensleralexander/JACB

The mentioned chart is at the menu 'Backtest' (you need to load data from an exchange via the importer first)
When you build the project with 17.1 and 17.2 you can directly see the difference

Thank you
Alexander


MK Muneesh Kumar G Syncfusion Team September 11, 2019 12:28 PM UTC

Hi Alexander,  
 
We have analyzed your query and we would like to inform you that Label placement Top is the correct behavior for GroupAllPoints value. So that we have changed the flow in our 17.2 version. If you want to use the label alignment for the trackball labels, please set the LabelDisplayMode as FloatAllPoints as per the below code snippet.  
 
Code snippet 
 
   <chart:ChartTrackBallBehavior LabelVerticalAlignment="Near" LabelHorizontalAlignment="Far" LabelDisplayMode="FloatAllPoints"/> 
 
 
Please let us know if you have any other queries.  
  
Thanks, 
Muneesh Kumar G. 
 



AL Alexander September 12, 2019 04:22 PM UTC

Thank you, this solved my problem.


MK Muneesh Kumar G Syncfusion Team September 13, 2019 05:19 AM UTC

Hi Alexander,  
 
Thanks for the update. 
  
We are glad to know that the given solution works. Please let us know if you need any further assistance. 
 
Thanks,  
Muneesh Kumar G 


Loader.
Live Chat Icon For mobile
Up arrow icon