Thank you for
contacting syncfusion support.
We have analyzed
the problems reported in your sample. Please find the solution below.
|
S.NO |
Query |
Solution |
|
|
1. |
Scrollbar does
not appear for high zoom values. In the sample, if you first thing click the
zoom 1 day button, the scrollbar does not appear. It will appear however, if
you click the X axis. If you first click 3 or 2 day zoom, then when you click
the 1 day zoom, the scrollbar will appear, but not in the correct position.
The scrollbar is supposed to appear in the right-most position (scrolled to
the last datapoint). |
We have
resolved this problem by setting the SmallChange value as 0 for scrollbar as
per the below code snippet.
|
|
|
2. |
Scrollbar
disappears after clicking a zoom button after scrolling. If you first click
the 3 day zoom button, then scroll a bit, then click the 3 day zoom button
again, the scrollbar disappears. |
We have
resolved this problem by updating the previousZoomFactor value of the
scrollbar as follows.
|
|
|
3. |
Scrollbar does
not allow scrolling to the last datapoint for high zoom values. After showing
the scrollbar for 1 day zoom, it's not possible to scroll to the last
datapoint in the series. Only half of the last day is visible. |
This problem
have resolved by using solution 1. |
|
|
4. |
Can't
get VisibleRange immediately after zooming the X axis. The Y axis is
supposed to be zoomed into min and max y values within the visible x range.
But after clicking a zoom button, the Y axis does not zoom in. It only zooms
when you click the button twice, or start to scroll with the scrollbar. How
can I get VisibleRange immediately after zooming the X axis so that the Y
axis can be zoomed correctly after clicking a zoom button. |
We would like
to inform you that visible range will not calculated immediately while
setting zoom factor. So we recommend you to get this visible range after the
chart layout update as follows.
|
|
|
5. |
When scrolling
very quickly to the beginning or end of the chart, the Y zoom doesn't update. |
This problem
have resolved by using solution 4. |
|
|
6. |
A MajorGridLine
is always visible on the left Y axis when scrolling a zoomed chart. This is
particularly visible if you increase the MajorGridLine thickness. The red
gridline jumps around the left Y axis as you scroll the chart. Often
(but not visible on this sample), the label of the previous interval will
also be stuck to the left Y axis. For example, if the leftmost visible
label is "9 March", the label "8 March" will be
constantly hovering on the left Y axis as you scroll the chart. |
The problem was
resolved by setting corresponding IntervalType as Minutes and Interval as
1440 in zoom button clicks as follows.
|
|
|
7. |
Artifacts
appear on the left Y axis during scrolling. Small lines or single pixel dots
with the same color as the series appear on the left Y axis during scrolling.
This is particularly visible when the chart background is black with a bright
colored series. In the attachment is an image example. |
We are able to reproduce
the issue “FastStepLineSeries edge pixels not rendering properly while
scrolling”. The fix will be available on our upcoming volume 2 release, which
will be available in month of May, 2018.
|
We have modified
your sample based on above solutions, please find the sample from the following.
Sample : http://www.syncfusion.com/downloads/support/forum/136864/ze/sfChartZoomTest1509826224
Please let us
know if you have any queries.
Thanks,
Muneesh Kumar G.
|
S.No |
Query |
Solution | ||
|
1. |
Scrollbar issue. Your code works for a normal touchmode scrollbar, but not for a modified scrollbar with the number of days over 100. I've modified your sample to include a dictionary file which contains the modifications to the scrollbar, and the number of days set to 200. The problems with the 1 day zoom is the same as before. If you click the 1 day zoom button the scrollbar does not appear. If you set the number of days to 300, the 2 day zoom button also does not display the scrollbar.
|
We would like to inform you that, we have rendered the axis scrollbar for minimum zoom position 0.99. So we have checked the condition for ZoomFactor and ZoomPosition as follows.
Also we recommend you to first set the zoom position and then zoom factor.
Code Snippet
| ||
|
2. |
VisibleRange flicker issue. Your suggested method of getting the visible range after the chart update has the side effect of the chart flickering momentarily. This is particularly noticeable with large amount of data (over 1000 days) with a dark background. I believe this is because the chart must first display the non Y zoomed chart, then get the visible range, then lastly show the Y zoomed chart. I would like to remove this flickering. I guess one approach would be to somehow calculate the visible range from the source data without needing to update the chart first to get VisibleRange. Could you suggest an approach that will eliminate the flickering? Note that the source data does not contain weekend days. Also, holidays will not be included, or any days that do not contain data.
|
We have resolved this problem by calculating the visible range in ActualRangeChanged event of the primary axis.
Code Snippet
XAML
C#
| ||
|
3. |
Scrolling display issue. I guess this is related to the VisibleRange issue. When scrolling the chart, the chart will first display the non Y zoomed state before displaying the Y zoomed state. Having the chart display twice this way is jarring, as well as probably affects the scrolling performance negatively.
| |||
|
4. |
Perhaps you could add a "SecondaryAxisAutoZoom" feature to the sfChart that enables the chart to automatically zoom the Y axis? This will fix issue 2 and 3. I think many users require this and will save a lot of coding and workarounds and will probably be better performance wise too.
| |||
|
5. |
Primary axis gridline issue. Your solution of setting DateTimeIntervalType to minute instead of days changes the nature of the gridlines. The purpose of the gridlines is to show when a day changes to the next day. For example, a gridline should be shown between the last minute of May 18 and the first minute of May 19, and should stay there during scrolling the chart. But by setting the interval type to minute, the gridlines continuously move from minute to minute during scrolling which is not the correct behavior. So the interval type should be set to day, and the issue remains, that the previous day gridline and label is constantly hovering over the left Y axis during scrolling. This looks like a bug.
|
We have resolved this problem by overriding the visible labels generations method in axis as follows.
XAML
Code Snippet
| ||
|
6. |
Artifact issue. Please also fix artifact issue for FastCandleBitmapSeries. This is visible on the sample.
|
We have already logged issue report for this. The fix will be available on our upcoming volume 2 release, which will be available in month of May, 2018.
|
|
S.No |
Query |
Solution | |
|
1. |
There is one important issue remaining, and that is the 1 day zoom issue. You say the scrollbar is rendered with a minimum zoom position of 0.99. As I understand, this means that the scrollbar of sfChart cannot display properly for zoom factors less than 0.01? If this is the case it is a major limitation. This means that, for my sample, for 200 days the smallest I can zoom with correct scrollbar display and scrolling behavior is 2 days. If I have 500 days, I can only zoom up to 5 days, etc. If there are no workarounds to this issue, can you have this fixed by removing this limitation? Or increasing the resolution so that the scrollbar can be rendered properly with a minimum zoom position of at least 0.9999?
|
We can achieve your requirement to zoom the char to below 5 days by using PinchZooming / EnableZoomingToolBar / EnableSelectionZooming / EnableMouseWheelZooming. We can move the chart using EnablePanning as true as per the below code snippet.
Code Snippet[XAML]
Please refer below UG documentation for more details.
| |
|
2. |
As for your solution to the primary axis gridline hovering over the Y axis issue, it works fine if the first minute of the day is always 9:00 am, however, this might not always be the case. Sometimes it could be 8:40 am, or even 13:12 pm, if there is data missing |
Instead of checking 9:00 am we have check the initial date of the visible range which satisfies your requirement whatever discontinuous the data may be.
Code snippet [C#]:
| |
|
3. |
Therefore, the code would need to loop over every single minute to find the first minute of every day. Since there could be hundreds of thousands of minutes I'm concerned this will slow down responsiveness of the chart, especially during scrolling. |
We are able to reproduce the issue “Scrolling get slowdown in huge data with DatetimeCategoryAxis”. The fix for this issue will be available in one of our upcoming volume release. |
|
Private Sub btZoom1day_Click(sender As Object, e As RoutedEventArgs) Handles btZoom1day.Click
'SET X ZOOM
Dim zoomDays As Integer = 1
Dim zoomPosition = (1 - (zoomDays / (TestColl.TotalDays)))
'zoomPosition = If(zoomPosition <= 0.99, zoomPosition, 0.99)
chartPrimaryAxis.ZoomPosition = zoomPosition
Dim zoomFactor = (zoomDays / (TestColl.TotalDays))
'zoomFactor = If(zoomFactor >= 0.01, zoomFactor, 0.01)
..
End Sub |
|
Query |
Solution | |
|
1 Yes, the scrollbar gets very small so a solution would be to incorporate a minimum scrollbar size.
2 The scrollbar is not positioned completely to right, as should be when scrolled to the last datapoint. |
The reported issue can be resolved by setting the ScrollButtonVisibility property as collapsed in scroll bar template.
Code Snippet:
| |
|
3 There is still an issue where when clicking the 1 day zoom button from the zoom-all state the chart does not Y scale correctly. It only Y scales when starting to scroll the chart. |
We have resolved this problem by calculating y axis range in CalculateVisibleRange method in axis as per the below code snippet.
Code Snippet
|
|
Query |
Solution | |
|
1. Outside: Changing the data source when the zoom level is 1 day fails to Y zoom. Also, CalculateVisibleRange gets called twice, except for 1 day zoom. This slows down the chart because GetExtremes is executed twice.
2. Inside: Switching data source fails to Y zoom when the zoom level is 3, 2 and 1. For examle, first click zoom 1 day, then change from A to B.
3. Collapsed: Switching data source fails to Y zoom when the zoom level is 3, 2 and 1. |
Sorry for the inconvenience caused.
We have resolved these problems by updating the y axis visible range in x axis CalculateVisibleRange override method as per the below code snippet.
Code Snippet
|