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

Smart Axis Labels

Hi Syncfusion Support!

We note that we have too few labels on the x-axis when we zoom into a chart. We have also seen the behavior in your StockAnalysis demo. Is there a way to configure the "Smart Axis Labels" feature or an event to solve the issue programmatically?

regards,
Sascha

5 Replies

MK Muneesh Kumar G Syncfusion Team February 14, 2019 07:28 AM UTC

Hi Sascha, 
 
Greetings from Syncfusion, we have analyzed your requirement and you can achieve this by setting LabelsIntersectAction as MultipleRows in x-axis as per the below code snippet. 
 
Code snippet 
       <chart:SfChart.PrimaryAxis> 
              <chart:DateTimeCategoryAxis                          
                              LabelsIntersectAction="MultipleRows" />                                                
      </chart:SfChart.PrimaryAxis> 
 
Output:  
 
 
 
If your requirement different from this, please give more information about your requirement that would be helpful for us to give better solution in this.  
 
Thanks, 
Muneesh Kumar G. 



SA Sascha February 14, 2019 09:03 AM UTC

Hello Syncfusion Support!

Thank you very much for your quick response!

The LabelsIntersectAction="MultipleRows"  approach don't work for us.  

Here an example of our use case. First, before zooming in... everything looks fine. 



Now we take a closer look at the data.



No more labels are visible. Not very useful for the user anymore. 

Do you have any other approach to solve this issue? 

Thanks,
Sascha




MK Muneesh Kumar G Syncfusion Team February 14, 2019 09:50 AM UTC

Hi Sascha, 
 
Thanks for your update, we have analyzed your requirement and you can achieve this by using DateTimeAxis in y-axis with EnableAutoIntervalOnZooming as true as per the below code snippet.  
 
Code snippet 
 
       <chart:SfChart.PrimaryAxis> 
              <chart:DateTimeAxis  EdgeLabelsDrawingMode="Hide"  
                                   Foreground="#4F4F59"                                                               
                                   EnableAutoIntervalOnZooming="True" 
                                   LabelFormat="MMM-yyyy"    />                                                                                                       
       </chart:SfChart.PrimaryAxis> 
 
 
 
Before Zooming 
 
 
After Zooming

 
 
Please let us know if you have any queries.  
 
Thanks, 
Muneesh Kumar G. 



SA Sascha February 14, 2019 10:58 AM UTC

Hi Syncfusion Support!

That looks like an excellent solution for us!

Now we are running into another issue but we will open a new thread. 

Thank you very much!

regards,
Sascha


MK Muneesh Kumar G Syncfusion Team February 14, 2019 11:04 AM UTC

Hi Sascha, 
 
Thanks for your 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.
Up arrow icon