Hi Anil,
Greetings from Syncfusion. We have analyzed your queries at our end and provided the responses below.
Query #1: (First and last wick is showing half only)
We have analyzed on the above scenario and we would like to share some information regarding the rangePadding property of an axis available in the chart. Using this property, you can be able to add additional padding at the start and end of the chart axis by setting the value for this property as ChartRangePadding.additional. Please refer the code snippet below for further reference.
|
SfCartesianChart(
primaryXAxis: DateTimeAxis(
rangePadding: ChartRangePadding.additional
)
) |
Also, to mention that, if you are using visibleMinimum and visibleMaximum property to set the visible range for the chart, then the applying range padding wont work. So, in this case, you can add additional duration before setting the necessary visible minimum and maximum values in the axis. That is, before setting the visible minimum datetime value, you can decrease the duration (say -1 day or -12 hour) according to the respective axis interval by adding duration to that datetime value and before setting visible maximum datetime value, you can add additional duration (say +1 day or +12 hour) according to the respective axis interval. Please refer the code snippet below for further reference.
|
SfCartesianChart(
primaryXAxis: DateTimeAxis(
visibleMinimum: DateTime(2020, 10, 26).add(Duration(day: -1)),
visibleMaximum: DateTime(2020, 11, 5).add(Duration(day: 1))
)
) |
Please check with the above response and revert us if you still have further concerns on this.
Query #2: (How to hide empty area for empty data)
We have analyzed on the above scenario with the provided screenshot at our end and we are sorry that the empty area left due to empty data points cannot be hidden in the chart. This is default behavior behaviour. However, we would also like to know about the empty data point’s high, low, open, close values which you sending into the chart whether their values are equal or their values are sent null because, we have property called the showIndicationForSameValues available for the financial series types and when this property is set to false(default),then data points with same high and low or open and close values will not get render and left as blank area/space at that point’s x axis value and if this property is set to true, then there will be an indication line either horizontal or vertical according to the same high, low, open and close values. So, we kindly request you to share us with more information on the empty data points high, low, open and close values which you providing for the chart data source so that it will be helpful in providing the solutions sooner.
For further reference on showIndicationForSameValue property, please check the link below.
Regards,
Sriram Kiran