FastColumnBitmapSeries strange artifact display

Hi, the FastColumnBitmapSeries displays horzontal lines beneath the columns which have value of zero. This creates the false illusion of there being columns with a small positive/negative value when there is none, especially when the chart is very small. How can these lines be removed?

Attached is an image showing the wrong (current display) and the correct version (how it should look like). Also attached is the sample app.

Thank you.

Attachment: sfChartFastColumn_8f041ea7.rar

3 Replies

MK Muneesh Kumar G Syncfusion Team August 6, 2018 11:59 AM UTC

Hi Tom, 
 
Greetings from Syncfusion. We have analyzed your requirement and we would like to inform you that chart renders single pixel height column when segment value is zero. So, we have achieved your requirement by using custom FastColumnBitmapSeties and setting NaN value instead of zero in YValues in OnDataSourceChanged method as per the below code snippet.  
 
Code snippet [FastColumnBitmapSeriesExt.vb]: 
Public Class FastColumnBitmapSeriesExt 
    Inherits FastColumnBitmapSeries 
 
    Protected Overrides Sub OnDataSourceChanged(oldValue As IEnumerable, newValue As IEnumerable) 
 
        MyBase.OnDataSourceChanged(oldValue, newValue) 
 
        For number As Int32 = 0 To YValues.Count - 1 Step 1 
            If (YValues(number) = 0) Then 
                YValues(number) = Double.NaN 
            End If 
        Next 
 
    End Sub 
 
End Class 
 
Code snippet [MainWindow.vb] 
Class MainWindow 
 
    .. 
 
    Dim SeriesPrice As New FastSteplineBitmapSeriesExt 
    Dim SeriesVolumeBuy As New FastColumnBitmapSeriesExt 
    Dim SeriesVolumeSell As New FastColumnBitmapSeriesExt 
 
    Dim scrollBar As SfChartResizableBar 
    Dim zoomDays As Integer 
.. 
 
We have modified your sample based on this, please find the sample from the following location.  
 
 
Hope this helps.  
 
Thanks, 
Muneesh Kumar G. 
 



TO Tom August 6, 2018 03:11 PM UTC

This is great, thank you Muneesh.


MK Muneesh Kumar G Syncfusion Team August 7, 2018 04:55 AM UTC

Hi Tom, 

Thanks for the update.

We are glad to know that the given solution works. Please let us know if you need any further assistance.

Thanks,
Muneesh Kumar G.

Loader.
Up arrow icon