On principle, it's a shame to hand the browser dimensions to a server-side component.
But you can definitely do this as a multi stage process if you really have to:
- render your empty page, first determining the viewport size using JavaScript,
- populate some hidden form field with that height and invoke an actionFunction,
- use the actionFunction rerender to draw your chart component using the newly persisted height.

The general idea is to grab the window size of the browser, transmit it to the server in a form submission and then draw the chart using a {!Height}
controller property, like this:
<apex:page controller="ChartHeightController">
<apex:form>
<apex:inputHidden id="Field" value="{!Height}" />
<apex:actionFunction name="doResize" rerender="chart" />
<c:PartitionChart id="chart" JsonData="{!JsnString}" chartHeight="{!Height}" chartWidth="800" />
<script>
var windowOnload = window.onload;
window.onload = function() {
if (windowOnload) windowOnload(); //be nice, don't trash existing onload
document.getElementById('{!$Component.Field}').value = window.innerHeight;
doResize();
}
</script>
</apex:form>
</apex:page>
The controller just provides a dumb target for the height to hang around in the viewstate.
public class ChartHeightController {
public Integer Height {get; set;}
}
apex:chart
does accept percentage values like100%
forwidth
attribute. – bigassforce May 24 '14 at 3:17