'];
var axes = allAxes();
@@ -1668,7 +1668,7 @@
continue;
var pos = {}, align;
-
+
if (axis.direction == "x") {
align = "center";
pos.left = Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2);
@@ -1694,7 +1694,7 @@
var style = ["position:absolute", "text-align:" + align ];
for (var a in pos)
style.push(a + ":" + pos[a] + "px")
-
+
html.push('
' + tick.label + '
');
}
html.push('
');
@@ -1713,18 +1713,18 @@
if (series.points.show)
drawSeriesPoints(series);
}
-
+
function drawSeriesLines(series) {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null, prevy = null;
-
+
ctx.beginPath();
for (var i = ps; i < points.length; i += ps) {
var x1 = points[i - ps], y1 = points[i - ps + 1],
x2 = points[i], y2 = points[i + 1];
-
+
if (x1 == null || x2 == null)
continue;
@@ -1787,7 +1787,7 @@
if (x1 != prevx || y1 != prevy)
ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);
-
+
prevx = x2;
prevy = y2;
ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);
@@ -1839,7 +1839,7 @@
continue;
// clip x values
-
+
// clip with xmin
if (x1 <= x2 && x1 < axisx.min) {
if (x2 < axisx.min)
@@ -1874,7 +1874,7 @@
ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));
areaOpen = true;
}
-
+
// now first check the case where both is outside
if (y1 >= axisy.max && y2 >= axisy.max) {
ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
@@ -1886,7 +1886,7 @@
ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
continue;
}
-
+
// else it's a bit more complicated, there might
// be a flat maxed out rectangle first, then a
// triangular cutout or reverse; to find these
@@ -1895,7 +1895,7 @@
// clip the y values, without shortcutting, we
// go through all cases in turn
-
+
// clip with ymin
if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
@@ -1922,7 +1922,7 @@
ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));
// it goes to (x1, y1), but we fill that below
}
-
+
// fill triangular section, this sometimes result
// in redundant points if (x1, y1) hasn't changed
// from previous line to, but we just ignore that
@@ -1976,7 +1976,7 @@
var x = points[i], y = points[i + 1];
if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
continue;
-
+
ctx.beginPath();
x = axisx.p2c(x);
y = axisy.p2c(y) + offset;
@@ -1985,7 +1985,7 @@
else
symbol(ctx, x, y, radius, shadow);
ctx.closePath();
-
+
if (fillStyle) {
ctx.fillStyle = fillStyle;
ctx.fill();
@@ -1993,7 +1993,7 @@
ctx.stroke();
}
}
-
+
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
@@ -2064,12 +2064,12 @@
drawTop = false;
}
}
-
+
// clip
if (right < axisx.min || left > axisx.max ||
top < axisy.min || bottom > axisy.max)
return;
-
+
if (left < axisx.min) {
left = axisx.min;
drawLeft = false;
@@ -2084,7 +2084,7 @@
bottom = axisy.min;
drawBottom = false;
}
-
+
if (top > axisy.max) {
top = axisy.max;
drawTop = false;
@@ -2094,7 +2094,7 @@
bottom = axisy.p2c(bottom);
right = axisx.p2c(right);
top = axisy.p2c(top);
-
+
// fill the bar
if (fillStyleCallback) {
c.beginPath();
@@ -2131,11 +2131,11 @@
c.stroke();
}
}
-
+
function drawSeriesBars(series) {
function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) {
var points = datapoints.points, ps = datapoints.pointsize;
-
+
for (var i = 0; i < points.length; i += ps) {
if (points[i] == null)
continue;
@@ -2162,19 +2162,19 @@
if (filloptions.fillColor)
return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);
-
+
var c = $.color.parse(seriesColor);
c.a = typeof fill == "number" ? fill : 0.4;
c.normalize();
return c.toString();
}
-
+
function insertLegend() {
placeholder.find(".legend").remove();
if (!options.legend.show)
return;
-
+
var fragments = [], rowStarted = false,
lf = options.legend.labelFormatter, s, label;
for (var i = 0; i < series.length; ++i) {
@@ -2182,7 +2182,7 @@
label = s.label;
if (!label)
continue;
-
+
if (i % options.legend.noColumns == 0) {
if (rowStarted)
fragments.push('');
@@ -2192,14 +2192,14 @@
if (lf)
label = lf(label, s);
-
+
fragments.push(
'