Commit f39c71fb authored by David Schnur's avatar David Schnur

Remove unused variable definitions.

parent 9fc03e53
...@@ -96,7 +96,7 @@ The plugin also adds four public methods: ...@@ -96,7 +96,7 @@ The plugin also adds four public methods:
crosshair.locked = false; crosshair.locked = false;
}; };
function onMouseOut(e) { function onMouseOut() {
if (crosshair.locked) { if (crosshair.locked) {
return; return;
} }
......
...@@ -636,7 +636,7 @@ Licensed under the MIT license. ...@@ -636,7 +636,7 @@ Licensed under the MIT license.
}; };
plot.getData = function () { return series; }; plot.getData = function () { return series; };
plot.getAxes = function () { plot.getAxes = function () {
var res = {}, i; var res = {};
$.each(xaxes.concat(yaxes), function (_, axis) { $.each(xaxes.concat(yaxes), function (_, axis) {
if (axis) { if (axis) {
res[axis.direction + (axis.n !== 1 ? axis.n : "") + "axis"] = axis; res[axis.direction + (axis.n !== 1 ? axis.n : "") + "axis"] = axis;
...@@ -1069,8 +1069,8 @@ Licensed under the MIT license. ...@@ -1069,8 +1069,8 @@ Licensed under the MIT license.
var topSentry = Number.POSITIVE_INFINITY, var topSentry = Number.POSITIVE_INFINITY,
bottomSentry = Number.NEGATIVE_INFINITY, bottomSentry = Number.NEGATIVE_INFINITY,
fakeInfinity = Number.MAX_VALUE, fakeInfinity = Number.MAX_VALUE,
i, j, k, m, length, i, j, k, m,
s, points, ps, x, y, axis, val, f, p, s, points, ps, val, f, p,
data, format; data, format;
function updateAxis(axis, min, max) { function updateAxis(axis, min, max) {
...@@ -1443,7 +1443,7 @@ Licensed under the MIT license. ...@@ -1443,7 +1443,7 @@ Licensed under the MIT license.
axisMargin = options.grid.axisMargin, axisMargin = options.grid.axisMargin,
padding = options.grid.labelMargin, padding = options.grid.labelMargin,
all = axis.direction === "x" ? xaxes : yaxes, all = axis.direction === "x" ? xaxes : yaxes,
index, innermost; innermost;
// determine axis margin // determine axis margin
var samePosition = $.grep(all, function (a) { var samePosition = $.grep(all, function (a) {
...@@ -1518,7 +1518,7 @@ Licensed under the MIT license. ...@@ -1518,7 +1518,7 @@ Licensed under the MIT license.
// inside the canvas and isn't clipped off // inside the canvas and isn't clipped off
var minMargin = options.grid.minBorderMargin, var minMargin = options.grid.minBorderMargin,
margins = { x: 0, y: 0 }, i, axis; margins = { x: 0, y: 0 }, i;
// check stuff from the plot (FIXME: this should just read // check stuff from the plot (FIXME: this should just read
// a value from the series, otherwise it's impossible to // a value from the series, otherwise it's impossible to
...@@ -2332,7 +2332,7 @@ Licensed under the MIT license. ...@@ -2332,7 +2332,7 @@ Licensed under the MIT license.
var points = datapoints.points, var points = datapoints.points,
ps = datapoints.pointsize, ps = datapoints.pointsize,
bottom = Math.min(Math.max(0, axisy.min), axisy.max), bottom = Math.min(Math.max(0, axisy.min), axisy.max),
i = 0, top, areaOpen = false, i = 0, areaOpen = false,
ypos = 1, segmentStart = 0, segmentEnd = 0; ypos = 1, segmentStart = 0, segmentEnd = 0;
// we process each segment in two turns, first forward // we process each segment in two turns, first forward
...@@ -2864,7 +2864,7 @@ Licensed under the MIT license. ...@@ -2864,7 +2864,7 @@ Licensed under the MIT license.
function findNearbyItem(mouseX, mouseY, seriesFilter) { function findNearbyItem(mouseX, mouseY, seriesFilter) {
var maxDistance = options.grid.mouseActiveRadius, var maxDistance = options.grid.mouseActiveRadius,
smallestDistance = maxDistance * maxDistance + 1, smallestDistance = maxDistance * maxDistance + 1,
item = null, foundPoint = false, i, j, ps; item = null, i, j, ps;
for (i = series.length - 1; i >= 0; --i) { for (i = series.length - 1; i >= 0; --i) {
if (!seriesFilter(series[i])) { if (!seriesFilter(series[i])) {
...@@ -2965,7 +2965,7 @@ Licensed under the MIT license. ...@@ -2965,7 +2965,7 @@ Licensed under the MIT license.
function onMouseLeave(e) { function onMouseLeave(e) {
if (options.grid.hoverable) { if (options.grid.hoverable) {
triggerClickHoverEvent("plothover", e, triggerClickHoverEvent("plothover", e,
function (s) { return false; }); function () { return false; });
} }
} }
......
...@@ -149,7 +149,7 @@ More detail and specific examples can be found in the included HTML file. ...@@ -149,7 +149,7 @@ More detail and specific examples can be found in the included HTML file.
} }
}); });
function processDatapoints(plot, series, datapoints) { function processDatapoints(plot) {
if (!processed) { if (!processed) {
processed = true; processed = true;
canvas = plot.getCanvas(); canvas = plot.getCanvas();
......
...@@ -40,11 +40,11 @@ can just fix the size of their placeholders. ...@@ -40,11 +40,11 @@ can just fix the size of their placeholders.
plot.draw(); plot.draw();
} }
function bindEvents(plot, eventHolder) { function bindEvents(plot) {
plot.getPlaceholder().resize(onResize); plot.getPlaceholder().resize(onResize);
} }
function shutdown(plot, eventHolder) { function shutdown(plot) {
plot.getPlaceholder().unbind("resize", onResize); plot.getPlaceholder().unbind("resize", onResize);
} }
......
...@@ -269,7 +269,7 @@ The plugin allso adds the following methods to the plot object: ...@@ -269,7 +269,7 @@ The plugin allso adds the following methods to the plot object:
} }
function setSelection(ranges, preventEvent) { function setSelection(ranges, preventEvent) {
var axis, range, o = plot.getOptions(); var range, o = plot.getOptions();
if (o.selection.mode === "y") { if (o.selection.mode === "y") {
selection.first.x = 0; selection.first.x = 0;
......
...@@ -14,17 +14,17 @@ The symbols are accessed as strings through the standard symbol options: ...@@ -14,17 +14,17 @@ The symbols are accessed as strings through the standard symbol options:
*/ */
(function ($) { (function ($) {
function processRawData(plot, series, datapoints) { function processRawData(plot, series) {
// we normalize the area of each symbol so it is approximately the // we normalize the area of each symbol so it is approximately the
// same as a circle of the given radius // same as a circle of the given radius
var handlers = { var handlers = {
square: function (ctx, x, y, radius, shadow) { square: function (ctx, x, y, radius) {
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var size = radius * Math.sqrt(Math.PI) / 2; var size = radius * Math.sqrt(Math.PI) / 2;
ctx.rect(x - size, y - size, size + size, size + size); ctx.rect(x - size, y - size, size + size, size + size);
}, },
diamond: function (ctx, x, y, radius, shadow) { diamond: function (ctx, x, y, radius) {
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2) // pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
var size = radius * Math.sqrt(Math.PI / 2); var size = radius * Math.sqrt(Math.PI / 2);
ctx.moveTo(x - size, y); ctx.moveTo(x - size, y);
...@@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options: ...@@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options:
ctx.lineTo(x - size/2, y + height/2); ctx.lineTo(x - size/2, y + height/2);
} }
}, },
cross: function (ctx, x, y, radius, shadow) { cross: function (ctx, x, y, radius) {
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2 // pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var size = radius * Math.sqrt(Math.PI) / 2; var size = radius * Math.sqrt(Math.PI) / 2;
ctx.moveTo(x - size, y - size); ctx.moveTo(x - size, y - size);
......
...@@ -195,7 +195,7 @@ API.txt for details. ...@@ -195,7 +195,7 @@ API.txt for details.
[1, "year"]]); [1, "year"]]);
function init(plot) { function init(plot) {
plot.hooks.processOptions.push(function (plot, options) { plot.hooks.processOptions.push(function (plot) {
$.each(plot.getAxes(), function(axisName, axis) { $.each(plot.getAxes(), function(axisName, axis) {
var opts = axis.options; var opts = axis.options;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment