NickQiZhu/dc.js — pull request #165 by ChaksChigurupati (2013-04-29 01:22:29+00:00)
Title: Fix to avoid inefficient recomputation of chart properties upon focusing on a specific x-axis range

Hi Nick,

I noticed an issue with bar charts with too many bars and multiple stacking levels taking too much time to redraw after adjusting a focus window (e.g. the redraw of the moveChart when slider is changed on the volumeChart in your nasdaq example). Profiling in the chrome's javascript profiler revealed that the barWidth() function was getting called repeatedly for each and every bar because the _chart.refocused() was returning true. In this commit, I modified the code to not rely on the _chart.refocused() api but set the required properties to null before calling the chart.redraw(). Please take a look and offer your review comments.

Thx
Chaks Chigurupati