|
@ -50,6 +50,7 @@ var DEFAULTS = { |
|
|
showShadow : false, |
|
|
showShadow : false, |
|
|
keepAspectRatio : true, |
|
|
keepAspectRatio : true, |
|
|
verticalRatio : 0.5, // 0.1 to 1.0, where 1.0 results in a 'cube'
|
|
|
verticalRatio : 0.5, // 0.1 to 1.0, where 1.0 results in a 'cube'
|
|
|
|
|
|
dotSizeRatio : 0.02, // size of the dots as a fraction of the graph width
|
|
|
|
|
|
|
|
|
showAnimationControls: autoByDefault, |
|
|
showAnimationControls: autoByDefault, |
|
|
animationInterval : 1000, // milliseconds
|
|
|
animationInterval : 1000, // milliseconds
|
|
@ -897,13 +898,18 @@ Graph3d.prototype._redrawClear = function() { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Graph3d.prototype._dotSize = function() { |
|
|
|
|
|
return this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Get legend width |
|
|
* Get legend width |
|
|
*/ |
|
|
*/ |
|
|
Graph3d.prototype._getLegendWidth = function() { |
|
|
Graph3d.prototype._getLegendWidth = function() { |
|
|
var width; |
|
|
var width; |
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
var dotSize = this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
|
|
|
|
|
var dotSize = this._dotSize(); |
|
|
width = dotSize / 2 + dotSize * 2; |
|
|
width = dotSize / 2 + dotSize * 2; |
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
width = this.xBarWidth ; |
|
|
width = this.xBarWidth ; |
|
@ -972,7 +978,7 @@ Graph3d.prototype._redrawLegend = function() { |
|
|
// draw the size legend box
|
|
|
// draw the size legend box
|
|
|
var widthMin; |
|
|
var widthMin; |
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
var dotSize = this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
|
|
|
|
|
var dotSize = this._dotSize(); |
|
|
widthMin = dotSize / 2; // px
|
|
|
widthMin = dotSize / 2; // px
|
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
//widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues
|
|
|
//widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues
|
|
@ -1521,7 +1527,7 @@ Graph3d.prototype._redrawDataDot = function() { |
|
|
this._calcTranslations(this.dataPoints); |
|
|
this._calcTranslations(this.dataPoints); |
|
|
|
|
|
|
|
|
// draw the datapoints as colored circles
|
|
|
// draw the datapoints as colored circles
|
|
|
var dotSize = this.frame.clientWidth * this.dotSizeRatio; // px
|
|
|
|
|
|
|
|
|
var dotSize = this._dotSize(); |
|
|
for (i = 0; i < this.dataPoints.length; i++) { |
|
|
for (i = 0; i < this.dataPoints.length; i++) { |
|
|
var point = this.dataPoints[i]; |
|
|
var point = this.dataPoints[i]; |
|
|
|
|
|
|
|
|