|
|
@ -538,7 +538,9 @@ LineGraph.prototype.redraw = function(forceGraphUpdate) { |
|
|
|
|
|
|
|
// calculate actual size and position
|
|
|
|
this.props.width = this.dom.frame.offsetWidth; |
|
|
|
this.props.height = this.body.domProps.centerContainer.height; |
|
|
|
this.props.height = this.body.domProps.centerContainer.height |
|
|
|
- this.body.domProps.border.top |
|
|
|
- this.body.domProps.border.bottom; |
|
|
|
|
|
|
|
// update the graph if there is no lastWidth or with, used for the initial draw
|
|
|
|
if (this.lastWidth === undefined && this.props.width) { |
|
|
@ -568,9 +570,9 @@ LineGraph.prototype.redraw = function(forceGraphUpdate) { |
|
|
|
|
|
|
|
// update the height of the graph on each redraw of the graph.
|
|
|
|
if (this.updateSVGheight == true) { |
|
|
|
if (this.options.graphHeight != this.body.domProps.centerContainer.height + 'px') { |
|
|
|
this.options.graphHeight = this.body.domProps.centerContainer.height + 'px'; |
|
|
|
this.svg.style.height = this.body.domProps.centerContainer.height + 'px'; |
|
|
|
if (this.options.graphHeight != this.props.height + 'px') { |
|
|
|
this.options.graphHeight = this.props.height + 'px'; |
|
|
|
this.svg.style.height = this.props.height + 'px'; |
|
|
|
} |
|
|
|
this.updateSVGheight = false; |
|
|
|
} |
|
|
|