How to change the date format after zooming on yAxis

I have a chart with IoT temperature data.

I have some questions.

At the beginning the chart displays data of one or two months. On y-Axis the date is displayed with the default format that is determined by the line:

intervalType: DateTimeIntervalType.auto;

While the chart is zooming  the date format is changed. 

  1. How to determine these date formats?

     2. How to change the format  base on the time period that is displayed on chart after zooming?

For example I never want to display the format mm:ss, but I want to display hh:mm instead of it.

    3.Is there any way to  get the displayed time period after the zooming? 

Regards


Attachment: chart_7012dd8e.rar

3 Replies

RK Rokesh Karthikeyan Syncfusion Team October 26, 2021 03:24 PM UTC

Hi Ilias, 
  
Thanks for contacting Syncfusion Support. 
  
We have investigated the reported query and the axis labels can be customized using the axisLabelFormatter event. The event will be triggered for each axis label. But while doing so, if the actual interval type of the zoomed range is in seconds, when changing the label format from mm:ss to hh:mm, all the labels will be the same. Check the screenshot of this below, 
 
Screenshot:  
 
 
Sample: https://www.syncfusion.com/downloads/support/forum/169927/ze/zooming_sample501503476.zip 
 
We suspect that this might not be the use case. So kindly investigate the above sample and If we misunderstood your query, kindly revert us by providing more information or modifying the above sample with your scenario. 
  
Regards, 
Rokesh. 



IL Ilias replied to Rokesh Karthikeyan October 26, 2021 10:00 PM UTC

Thank you Rokesh,

This is exactly what i wanted.

I have changed the line :

 if (details.axisName == 'X-Axis') {

with:

if (args.axisName == 'primaryXAxis') {

I have modify my code. It works fine now.

You help me alot

Regards




YG Yuvaraj Gajaraj Syncfusion Team October 27, 2021 12:36 PM UTC

Hi Ilias, 
 
Thanks for the update. We are glad that the issue is resolved at your end. Please get back to us if you require further assistance. We are always happy in assisting you. 
  
Regards, 
Yuvaraj. 


Loader.
Up arrow icon