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

Skip empty data or delete space in chart

Hi, support team

I'm trying to plot stock price in chart using CandleSeries. 
Primary axis is DateTime axis, and Secondary axis is NumericalAxis.

But market data has empty date like the followings.
2020/04/23,1398,1404,1391,1404,5843600,1404
2020/04/24,1396.5,1420,1394.5,1420,8009800,1420
2020/04/27,1414.5,1429.5,1412.5,1429,6591700,1429
2020/04/28,1426,1458,1425,1458,9681200,1458
2020/04/30,1470,1476,1463.5,1464,14848600,1464
2020/05/01,1454,1464,1441,1441.5,8142800,1441.5

In this case empty date is 2020/04/25 -> 2020/04/26 and 2020/04/29.
Because these days are Saturday ,Sunday and Holiday, market is closed on these days.
So, chart has space area, see attached file.

I want to plot data skipping these empty date, or delete these spaces.

Please help me to resolve this problem.

Best Regards,





Attachment: sample_b28d434c.zip

3 Replies 1 reply marked as answer

YP Yuvaraj Palanisamy Syncfusion Team September 17, 2020 07:54 AM UTC

  
Greetings from Syncfusion.  
    
We would like to inform you that you can achieve your requirement by using DateTimeCateforyAxis. Please find the code snippet below.  
[XAML]  
   
<chart:SfChart.PrimaryAxis>  
    <chart:DateTimeCategoryAxis LabelFormat="dd/MMM" />  
</chart:SfChart.PrimaryAxis>  
   
   
Also, we have prepared the sample for your reference, please find the sample from the below link.  
 
  
Output: 
 
 
For more information please refer the below link 
 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Yuvaraj 


Marked as answer

JS Junji Sumi September 17, 2020 08:48 AM UTC

Hi Yuvaraj Palanisamy,

Thank you for quick response and good solution!
I changed Xaxis as chart:DateTimeAxis to DateTimeCategoryAxis, and resolved my problem.

Good support and thank you again.


SM Saravanan Madheswaran Syncfusion Team September 18, 2020 06:01 AM UTC

 
We are glad that the reported problem resolved at your end. Please let us know, if you have any other queries. 
 
Regards, 
Saravanan.  


Loader.
Live Chat Icon For mobile
Up arrow icon