Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
860
OlapXAxis refresh grid causes graph to "flicker"
posted

Hello

I have a XamDataChart with a OlapXAxis set to a FlatDataSource. 

I've made som logic in the FlatDataSource.ResultChanged (aggregators and auto expand). This is done after following suggestions on this Forum. However it is nessesarry to call RefreshGrid in the event, which causes the graph to draw multiple times. This looks wierd and the graphs flickers. This is because I attach the datasource which causes the graph to draw, then I call RefreshGrid in the result changed, which causes the graph to redraw. 

I have different thoughts on how to fix this, but I struggle with finding a suitable event. I need a way to suspend the layout and then resume it after drawing is done.

Any ideas?

Parents
  • 34810
    Offline posted

    Hello logimatic,

    I have been investigating into this issue, and you are correct that the RefreshGrid method will cause the XamDataChart and its OlapXAxis to redraw. The flicker seems to be most easily reproduced on my end when the dimensions of the Olap hierarchy are expanded, especially if they are fully expanded.

    I am curious if the flicker is happening mostly on your end due to the expansion and aggregator assignment happening within the ResultChanged event of the FlatDataSource. The reason why I am curious about this, is because both the assignment of aggregators and the calling of the RefreshGrid method will cause this event to fire again, and so it is possible that the ResultChanged event may be firing multiple times on your end, and firing the RefreshGrid method multiple times with it. Would it be possible for you to please provide some more detail on exactly what is happening during this ResultChanged event, and if you are taking any measures to prevent the re-fire of this event?

    So far, I have not personally found a way to "suspend" the layout and resume it after drawing is done, unless this happens at the start of the application, in which case you can do the expansion and aggregator assignment before assigning the data source to the XamDataChart.OlapXAxis. This would allow the chart to show up with the expansion and aggregator assignment. I am currently investigating further into this, though, as it is possible that we are destroying and redrawing more than we actually need to internally to the OlapXAxis, which could also cause this flicker you are seeing.

    I hope to have more information for you on this matter soon. In the meantime, would it be possible for you to please provide your thoughts on the above? Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Reply Children