How to Remove Weekend date data from stock candlestick chart

Dear Support,

In the stock candle stick chart, we want to remove the weekend dates as no data will be available here. In the data that we are passing, we do not parse the weekend date values but it auto creates those dates in the x-axis.

Can you please help us with this issue. I have also attached the screenshot which shows the issue that we are facing.

Keen to hear from you soon.

Regards,
Pankaj

Attachment: image_2021_02_26T11_21_37_943Z_d5f464ce.zip

9 Replies

SM Srihari Muthukaruppan Syncfusion Team March 1, 2021 10:12 AM UTC

Hi Pankaj, 
 
Sorry for the inconvenience. 
 
We have analyzed your query. From that, if you are not getting the weekend dates in your data we suggest you to use dateTimeCategory axis to achieve your requirement. Else we suggest you to filter the data to achieve your requirement.  
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M  



KR Kristof March 30, 2021 04:13 PM UTC

Dear Srihari M ,

Is there a way to skip (or interpolate) dates without data points in candle stick StockChart? Even if there is no data for weekend days, the dates are displayed.

Thanks for the answer.


SM Srihari Muthukaruppan Syncfusion Team March 31, 2021 09:15 AM UTC

Hi Kristóf, 
 
Sorry for the inconvenience. 
 
Based on your request. We have considered the reported scenario as a feature and logged a feature request for this. This feature will be available in any of our releases. We appreciate your patience until then. You can keep track of the feature request from the feedback portal below.  
  
   
The provided feedback link is private, and you need to login to view this feedback.  
   
If you have any more specifications/precise replication procedures or a scenario to be tested, you can add it as a comment in the portal.  
  
Regards, 
Srihari M 



PA Pankaj replied to Srihari Muthukaruppan April 21, 2021 07:47 AM UTC

Hi Pankaj, 
 
Sorry for the inconvenience. 
 
We have analyzed your query. From that, if you are not getting the weekend dates in your data we suggest you to use dateTimeCategory axis to achieve your requirement. Else we suggest you to filter the data to achieve your requirement.  
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M  


Dear Srihari M ,

When I use dateTimeCategory axis give me some error:-

Uncaught (in promise) TypeError: Cannot read property 'calculateRangeAndInterval' of undefined
    at e.measureDefinition (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at e.measureColumnAxis (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at e.measureAxis (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at r.calculateBounds (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at r.refreshBound (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at t.refreshChart (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at t.dataManagerSuccess (:57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1)
    at :57549/_content/Syncfusion.Blazor/scripts/stockchart-aa60e9.min.js:1

Also please check my implementation:-

<SfStockChart Title="@CandalText" Height="500px" EnableSelector="false">
                                                                                                <StockChartEvents Loaded="@ChartLoaded"></StockChartEvents>
                                                                                                <StockChartPeriods>
                                                                                                    <StockChartPeriod IntervalType=RangeIntervalType.Months Interval="1" Text='1M'></StockChartPeriod>
                                                                                                    <StockChartPeriod IntervalType=RangeIntervalType.Months Interval="2" Text='2M'></StockChartPeriod>
                                                                                                    <StockChartPeriod IntervalType=RangeIntervalType.Months Interval="3" Text='3M' Selected="true"></StockChartPeriod>
                                                                                                    <StockChartPeriod IntervalType=RangeIntervalType.Months Interval="6" Text='6M'></StockChartPeriod>
                                                                                                    <StockChartPeriod Text='YTD'></StockChartPeriod>
                                                                                                    <StockChartPeriod Text='ALL'></StockChartPeriod>
                                                                                                </StockChartPeriods>
                                                                                                <StockChartChartArea>
                                                                                                    <StockChartChartAreaBorder Width="0"></StockChartChartAreaBorder>
                                                                                                </StockChartChartArea>
                                                                                                <StockChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.DateTimeCategory" LabelIntersectAction="LabelIntersectAction.Hide" EdgeLabelPlacement="EdgeLabelPlacement.Shift">
                                                                                                    <StockChartAxisMajorGridLines Width="0"></StockChartAxisMajorGridLines>
                                                                                                    <StockChartAxisCrosshairTooltip Enable="true"></StockChartAxisCrosshairTooltip>
                                                                                                </StockChartPrimaryXAxis>
                                                                                                <StockChartPrimaryYAxis LabelFormat="n0">
                                                                                                    <StockChartAxisLineStyle Width="0"></StockChartAxisLineStyle>
                                                                                                </StockChartPrimaryYAxis>
                                                                                                <StockChartTooltipSettings Enable="true"></StockChartTooltipSettings>
                                                                                                <StockChartCrosshairSettings Enable="true"></StockChartCrosshairSettings>
                                                                                                <StockChartAxes>
                                                                                                    <StockChartAxis RowIndex=1 Name="yAxis1" OpposedPosition="true">
                                                                                                    </StockChartAxis>
                                                                                                </StockChartAxes>
                                                                                                <StockChartRows>
                                                                                                    <StockChartRow Height="30%"></StockChartRow>
                                                                                                    <StockChartRow Height="70%"></StockChartRow>
                                                                                                </StockChartRows>
                                                                                                <StockChartSeriesCollection>
                                                                                                    <StockChartSeries DataSource="@_StockDetails" Type="ChartSeriesType.Candle" XName="x" High="high" YAxisName="yAxis1" Low="low" Close="close" Open="open"></StockChartSeries>
                                                                                                    <StockChartSeries DataSource="@_StockDetails" Type="ChartSeriesType.Column" XName="x" YName="volume" High="high" Low="low" Name="@Stock.ToUpper()"></StockChartSeries>
                                                                                                </StockChartSeriesCollection>
                                                                                            </SfStockChart>

Thanks for the answer.


SM Srihari Muthukaruppan Syncfusion Team April 22, 2021 06:50 AM UTC

Hi Pankaj, 
  
As stated earlier we have considered the reported scenario as a feature and logged a feature request for this. This feature will be available in any of our releases. We appreciate your patience until then. You can keep track of the feature request from the feedback portal below.   
                                                                                                          
 
The provided feedback link is private, and you need to login to view this feedback.   
    
If you have any more specifications/precise replication procedures or a scenario to be tested, you can add it as a comment in the portal.   
   
Regards,  
Srihari M 



JU Justin November 13, 2022 06:27 PM UTC

Hello Srihari,

Is there any update regarding skipping gaps in data? It would be great if this is a higher priority as I've never seen a stock chart that doesn't skip missing / unrequired data.

Thank you



DG Durga Gopalakrishnan Syncfusion Team December 1, 2022 02:43 PM UTC

Hi Justin,


We will include this feature in our upcoming Volume 1 Main Release which is expected to be rolled out at end of March 2022.  We appreciate your patience until then.


Regards,

Durga Gopalakrishnan.



DG Durga Gopalakrishnan Syncfusion Team March 27, 2023 10:43 AM UTC

Justin,


We will include this feature in our upcoming Volume 2 Main Release which is expected to be rolled out at end of July 2023. We appreciate your patience until then.


Feedback Link : https://www.syncfusion.com/feedback/10776/need-to-provide-datetimecategory-support-for-stock-chart


Please let us know if you have any concerns.



DG Durga Gopalakrishnan Syncfusion Team July 18, 2023 12:16 PM UTC

Justin,


We are glad to announce that our Essential Studio 2023 Volume 2 Main Release V22.1.34 is rolled out. We have added a “DateTimeCategory” axis type for stockchart in this release and is available for download under the following link.


Essential Studio 2023 Volume 2 Main Release v22.1.34 is available for download | Announcements Forums | Syncfusion


Online Demo : https://blazor.syncfusion.com/demos/stock-chart/date-time-category-axis?theme=fluent


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Loader.
Up arrow icon