I am looking to fetch data for the chart separately and display the chart component (e.g., “SfCartesianChart”) before the data fetch is complete. This is to improve the user experience during the waiting time for data fetching. However, it seems that, for example, in the case of SfCartesianChart, the XAxis labels cannot be displayed without a data source, perhaps because they are matched to the data source’s index. How can I display the XAxis labels before the data source is available?
YGYuvaraj Gajaraj Syncfusion Team April 4, 2023 10:31 AM UTC
InCategoryAxisthe axis labels are rendered based on the data source only and it is the default behavior of theCategoryAxisin a chart and having the default range when the empty data source is not possible. So, if the fetched data point x value is numeric or date-time then use theNumericAxisorDateTimeAxisrespectively instead ofCategoryAxis.
Marked as answer
THTakuya HaraApril 6, 2023 02:17 AM UTC
Thank you. The problem is solved, thank you for your help.
YGYuvaraj Gajaraj Syncfusion Team April 6, 2023 06:52 AM UTC
Most Welcome. Kindly get back to us if you have further queries. We are always happy to assist you.