There are actually 2 charts in this visualization. The main chart and a 'preview' - the smaller picture of the whole chart below the main one. So, this height2 = is the height of the preview. 
There must be a variable to store the height for the preview. There is no necessary to make a relation between  chart's heights. I can make the heights independent. Don't see any other better ways. 
Any ideas?