1 issue, 1 question
Issue: I have a stock chart that works if I separately retrieve data and return in a List
Current (Failing) configuration
Here is the config of the SfStickChart and SfDataManager:
<SfStockChart @ref="sc" Height="600" >
<SfDataManager Url="odata/Instruments(10153)/InstHistDailies" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<StockChartPrimaryXAxis Title="Date" ValueType="Syncfusion.Blazor.Charts.ValueType.DateTime"></StockChartPrimaryXAxis>
<StockChartPeriods>
<StockChartPeriod IntervalType=RangeIntervalType.Days Interval="3" Text='3d'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Weeks Interval="1" Text='1w'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Weeks Interval="2" Text='2w'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Months Interval="1" Text='1m'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Months Interval="3" Text='3m' Selected="true"></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Months Interval="6" Text='6m'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Years Interval="1" Text='1y'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Years Interval="2" Text='2y'></StockChartPeriod>
<StockChartPeriod IntervalType=RangeIntervalType.Years Interval="5" Text='5y'></StockChartPeriod>
</StockChartPeriods>
<StockChartSeriesCollection>
<StockChartSeries Type="ChartSeriesType.Candle" XName="Date" YName="Close" High="High" Low="Low" Open="Open" Close="Close" Volume="Volume" Query="ChartQuery"></StockChartSeries>
@*<StockChartSeries Query="ChartQuery" Type="ChartSeriesType.Candle" XName="Date" YName="Close"></StockChartSeries>*@
</StockChartSeriesCollection>
</SfStockChart>
Here is a sample of the data being returned by the OData Endpoint (odata/Instruments(10153)/InstHistDailies):
Please advise.
Hi Phil,
Greetings from Syncfusion.
# 1 : I attempt to bind it directly to SfDataManager, it always fails
We have considered your reported scenario as bug and logged a defect report for this issue. This fix will be available in our upcoming weekly patch release which is scheduled to be rolled out on 7th June 2022. We appreciate your patience until then. You can keep track of the bug from the below feedback link.
Feedback Link : https://www.syncfusion.com/feedback/35190/odataadaptor-is-not-working-with-stockchart
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.
# 2 : to retrieve just the time-period of data being requested by the current configuration of the chart, or does it always retrieve ALL, then just display according to current settings.
You can use Query to get required number of data points from URL. Please check with the below documentation link.
Please revert us if you have any concerns.
Regards,
Durga Gopalakrishnan.
Hi Phil,
We are working on the reported issue and we will include this fix in our upcoming weekly patch release which is scheduled to be rolled out on 28th June 2022. We appreciate your patience until then.
Regards,
Durga Gopalakrishnan.
Hi Phil,
We are glad to announce that our v20.2.0.39 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.
NuGet Package : https://www.nuget.org/packages/Syncfusion.Blazor.Charts/
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.
Regards,
Durga Gopalakrishnan.
Hi, I tested the version 20.3.0.50 uncess with this configuration:
<SfStockChart Title="Test">
<SfDataManager Url="https://localhost:7253/Ohlc" CrossDomain="true" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<StockChartSeriesCollection>
<StockChartSeries Type="ChartSeriesType.Candle" XName="Date" YName="Close" High="High" Low="Low" Open="Open" Close="Close" Volume="Volume" Name="Candles">
</StockChartSeries>
</StockChartSeriesCollection>
</SfStockChart>
I discovered the code in Syncfusion.Blazor.Charts.Internal.FinancialBaseRenderer.ProcessJObjectData fails while deserializing json because non-mandatory parameters must be initialized and must be present in json, like PointColorMapping, TooltipMappingName and ChartDataLabel.Name . So I tried this:
<SfStockChart Title="Test">
<SfDataManager Url="https://localhost:7253/Ohlc" CrossDomain="true" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<StockChartSeriesCollection>
<StockChartSeries Type="ChartSeriesType.Candle" XName="Date" YName="Close" High="High" Low="Low" Open="Open" Close="Close" Volume="Volume" PointColorMapping="Date" TooltipMappingName="Date" Name="Test">
<ChartMarker>
<ChartDataLabel Visible="false" Name="Date"></ChartDataLabel>
</ChartMarker>
</StockChartSeries>
</StockChartSeriesCollection>
</SfStockChart>
But finally that crash a little further.
Can you make the fields optional and check if candle charts work with odata?
Regards,
Yann
Hi Yann,
We have considered your reported scenario as bug and logged a defect report for this issue. This fix will be available in our weekly patch release which is scheduled to be rolled out on 15th November 2022. We appreciate your patience until then. You can keep track of the bug from the below feedback link.
Feedback Link : https://www.syncfusion.com/feedback/38682/candle-stockchart-throws-exception-with-odataadaptor
If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.
Regards,
Durga Gopalakrishnan.
Thanks Durga,
When you put the feedback link in these things, could you please also grant permission? Just getting access denied when I try to view.
Regards,
Phil
Hi Phil,
We regret for inconvenience caused. We have validated the provided feedback link. Please login and check with the feedback link now.
Feedback Link : https://www.syncfusion.com/feedback/38682/candle-stockchart-throws-exception-with-odataadaptor
Kindly revert us, if you have any concerns.
Regards,
Durga Gopalakrishnan.
Nope, still no access.
Regards,
Phil
Hi Phil,
We have modified the feedback link and this can now be accessed.
Regards,
Swetha
Hi Phil,
We are glad to announce that our v20.3.0.57 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.
NuGet Package : https://www.nuget.org/packages/Syncfusion.Blazor.Charts/
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.
Regards,
Durga Gopalakrishnan.