Update jqplot to

jquery.jqplot.1.0.0b2_r947
This commit is contained in:
Nathan Gray
2011-11-07 20:37:55 +00:00
parent 78855f0652
commit f8489c0ed1
256 changed files with 13654 additions and 3389 deletions

View File

@ -2,7 +2,7 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.0b2_r792
* Version: 1.0.0b2_r947
*
* Copyright (c) 2009-2011 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
@ -188,7 +188,9 @@
axes[ax]._ticks = [];
// fake out tick creation algorithm to make sure original auto
// computed format string is used if _overrideFormatString is true
axes[ax]._autoFormatString = c._zoom.axes[ax].tickFormatString;
if (c._zoom.axes[ax] !== undefined) {
axes[ax]._autoFormatString = c._zoom.axes[ax].tickFormatString;
}
}
this.redraw();
}
@ -382,9 +384,36 @@
newmin = dp;
newmax = start[ax];
}
var curax = axes[ax];
var _numberTicks = null;
// if aligning this axis, use number of ticks from previous axis.
// Do I need to reset somehow if alignTicks is changed and then graph is replotted??
if (curax.alignTicks) {
if (curax.name === 'x2axis' && plot.axes.xaxis.show) {
_numberTicks = plot.axes.xaxis.numberTicks;
}
else if (curax.name.charAt(0) === 'y' && curax.name !== 'yaxis' && curax.name !== 'yMidAxis' && plot.axes.yaxis.show) {
_numberTicks = plot.axes.yaxis.numberTicks;
}
}
if (this.looseZoom && (axes[ax].renderer.constructor === $.jqplot.LinearAxisRenderer || axes[ax].renderer.constructor === $.jqplot.DateAxisRenderer)) {
var ret = $.jqplot.LinearTickGenerator(newmin, newmax);
var ret = $.jqplot.LinearTickGenerator(newmin, newmax, curax._scalefact, _numberTicks);
// if new minimum is less than "true" minimum of axis display, adjust it
if (axes[ax].tickInset && ret[0] < axes[ax].min + axes[ax].tickInset * axes[ax].tickInterval) {
ret[0] += ret[4];
ret[2] -= 1;
}
// if new maximum is greater than "true" max of axis display, adjust it
if (axes[ax].tickInset && ret[1] > axes[ax].max - axes[ax].tickInset * axes[ax].tickInterval) {
ret[1] -= ret[4];
ret[2] -= 1;
}
axes[ax].min = ret[0];
axes[ax].max = ret[1];
axes[ax]._autoFormatString = ret[3];
@ -784,8 +813,11 @@
var plot = ev.data.plot;
var go = plot.eventCanvas._elem.offset();
var gridPos = {x:ev.pageX - go.left, y:ev.pageY - go.top};
var dataPos = {xaxis:null, yaxis:null, x2axis:null, y2axis:null, y3axis:null, y4axis:null, y5axis:null, y6axis:null, y7axis:null, y8axis:null, y9axis:null};
var an = ['xaxis', 'yaxis', 'x2axis', 'y2axis', 'y3axis', 'y4axis', 'y5axis', 'y6axis', 'y7axis', 'y8axis', 'y9axis'];
//////
// TO DO: handle yMidAxis
//////
var dataPos = {xaxis:null, yaxis:null, x2axis:null, y2axis:null, y3axis:null, y4axis:null, y5axis:null, y6axis:null, y7axis:null, y8axis:null, y9axis:null, yMidAxis:null};
var an = ['xaxis', 'yaxis', 'x2axis', 'y2axis', 'y3axis', 'y4axis', 'y5axis', 'y6axis', 'y7axis', 'y8axis', 'y9axis', 'yMidAxis'];
var ax = plot.axes;
var n, axis;
for (n=11; n>0; n--) {