Changeset d63f27360b456d6275f7338b14be16f94d4f1c17
 Timestamp:
 03/18/09 02:48:06
(7 years ago)
 Author:
 Theo Schlossnagle <jesus@omniti.com>
 gitcommitter:
 Theo Schlossnagle <jesus@omniti.com> 1237344486 +0000
 gitparent:
[59ef71f1da184bd31fce88539fd66974f75dc406]
 gitauthor:
 Theo Schlossnagle <jesus@omniti.com> 1237344486 +0000
 Message:
make it possible to scale along the xaxis only, refs #108

Files:

Legend:
 Unmodified
 Added
 Removed
 Modified
 Copied
 Moved
r59ef71f 
rd63f273 

87  87  hoverable: false, 

88  88  autoHighlight: true, // highlight in case mouse is near 

89   mouseActiveRadius: 10 // how far the mouse can be away to activate an item 

 89  mouseActiveRadius: 10, // how far the mouse can be away to activate an item 

 90  hoverXOnly: false 

90  91  }, 

91  92  selection: { 

…  …  
1635  1636  // For points and lines, the cursor must be within a 

1636  1637  // certain distance to the data point 

1637   

 1638  

 1639  // if the hoverxonly option is true, y doesn't matter 

 1640  if(options.grid.hoverXOnly) my = y; 

 1641  

1638  1642  // check bounding box first 

1639  1643  if ((x  mx > maxx  x  mx < maxx)  

…  …  
1645  1649  var dx = Math.abs(axisx.p2c(x)  mouseX), 

1646  1650  dy = Math.abs(axisy.p2c(y)  mouseY), 

1647   dist = dx * dx + dy * dy; 

 1651  dist; 

 1652  dist = dx * dx; 

 1653  if(!options.grid.hoverXOnly) dist += dy * dy; 

1648  1654  if (dist < lowestDistance) { 

1649  1655  lowestDistance = dist; 

…  …  
1855  1861  

1856  1862  var pointRadius = series.points.radius + series.points.lineWidth / 2; 

1857   octx.lineWidth = pointRadius; 

 1863  octx.lineWidth = series.points.lineWidth + 1; 

1858  1864  octx.strokeStyle = parseColor(series.color).scale(1, 1, 1, 0.5).toString(); 

1859  1865  var radius = 1.5 * pointRadius; 

r59ef71f 
rd63f273 

302  302  r.options.legend.container = this.find("div.plotlegend"); 

303  303  r.options.grid.autoHighlight = false; 

 304  r.options.grid.mouseActiveRadius = 4; 

 305  r.options.grid.hoverXOnly = true; 

304  306  if(!r.options.yaxis) r.options.yaxis = {}; 

305  307  if(r.options.yaxis.suffix) 
