|
|
@ -50,6 +50,7 @@ var DEFAULTS = { |
|
|
|
showShadow : false, |
|
|
|
keepAspectRatio : true, |
|
|
|
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, |
|
|
|
animationInterval : 1000, // milliseconds
|
|
|
@ -897,13 +898,18 @@ Graph3d.prototype._redrawClear = function() { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Graph3d.prototype._dotSize = function() { |
|
|
|
return this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Get legend width |
|
|
|
*/ |
|
|
|
Graph3d.prototype._getLegendWidth = function() { |
|
|
|
var width; |
|
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
|
var dotSize = this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
var dotSize = this._dotSize(); |
|
|
|
width = dotSize / 2 + dotSize * 2; |
|
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
|
width = this.xBarWidth ; |
|
|
@ -972,7 +978,7 @@ Graph3d.prototype._redrawLegend = function() { |
|
|
|
// draw the size legend box
|
|
|
|
var widthMin; |
|
|
|
if (this.style === Graph3d.STYLE.DOTSIZE) { |
|
|
|
var dotSize = this.frame.clientWidth * this.dotSizeRatio; |
|
|
|
var dotSize = this._dotSize(); |
|
|
|
widthMin = dotSize / 2; // px
|
|
|
|
} else if (this.style === Graph3d.STYLE.BARSIZE) { |
|
|
|
//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); |
|
|
|
|
|
|
|
// 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++) { |
|
|
|
var point = this.dataPoints[i]; |
|
|
|
|
|
|
|