Permalink
Browse files

Merge branch 'master' of github.com:HumbleSoftware/Flotr2

  • Loading branch information...
2 parents 9b5a4ea + 6eb9b6e commit 692a9e7227f809fc8d2dfd0e7ee59d77661c59af @cesutherland cesutherland committed Apr 7, 2012
Showing with 167 additions and 118 deletions.
  1. +1 −1 flotr2.ie.min.js
  2. +8 −7 flotr2.js
  3. +1 −1 flotr2.min.js
  4. +8 −7 js/types/candles.js
  5. +149 −102 spec/js/flotr2.stable.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -4095,6 +4095,7 @@ Flotr.addType('candles', {
yScale = options.yScale,
width = options.candleWidth / 2,
shadowSize = options.shadowSize,
+ lineWidth = options.lineWidth,
wickLineWidth = options.wickLineWidth,
pixelOffset = (wickLineWidth % 2) / 2,
color,
@@ -4135,12 +4136,12 @@ Flotr.addType('candles', {
context.save();
context.globalAlpha = options.fillOpacity;
context.fillStyle = color;
- context.fillRect(left, top2 + width, right - left, bottom2 - top2);
+ context.fillRect(left, top2 + lineWidth, right - left, bottom2 - top2);
context.restore();
}
// Draw candle outline/border, high, low.
- if (options.lineWidth || wickLineWidth) {
+ if (lineWidth || wickLineWidth) {
x = Math.floor((left + right) / 2) + pixelOffset;
@@ -4161,12 +4162,12 @@ Flotr.addType('candles', {
context.moveTo(Math.floor(right) + pixelOffset, y);
context.lineTo(x, y);
} else {
- context.strokeRect(left, top2 + width, right - left, bottom2 - top2);
+ context.strokeRect(left, top2 + lineWidth, right - left, bottom2 - top2);
- context.moveTo(x, Math.floor(top2 + width));
- context.lineTo(x, Math.floor(top + width));
- context.moveTo(x, Math.floor(bottom2 + width));
- context.lineTo(x, Math.floor(bottom + width));
+ context.moveTo(x, Math.floor(top2 + lineWidth));
+ context.lineTo(x, Math.floor(top + lineWidth));
+ context.moveTo(x, Math.floor(bottom2 + lineWidth));
+ context.lineTo(x, Math.floor(bottom + lineWidth));
}
context.closePath();
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -38,6 +38,7 @@ Flotr.addType('candles', {
yScale = options.yScale,
width = options.candleWidth / 2,
shadowSize = options.shadowSize,
+ lineWidth = options.lineWidth,
wickLineWidth = options.wickLineWidth,
pixelOffset = (wickLineWidth % 2) / 2,
color,
@@ -78,12 +79,12 @@ Flotr.addType('candles', {
context.save();
context.globalAlpha = options.fillOpacity;
context.fillStyle = color;
- context.fillRect(left, top2 + width, right - left, bottom2 - top2);
+ context.fillRect(left, top2 + lineWidth, right - left, bottom2 - top2);
context.restore();
}
// Draw candle outline/border, high, low.
- if (options.lineWidth || wickLineWidth) {
+ if (lineWidth || wickLineWidth) {
x = Math.floor((left + right) / 2) + pixelOffset;
@@ -104,12 +105,12 @@ Flotr.addType('candles', {
context.moveTo(Math.floor(right) + pixelOffset, y);
context.lineTo(x, y);
} else {
- context.strokeRect(left, top2 + width, right - left, bottom2 - top2);
+ context.strokeRect(left, top2 + lineWidth, right - left, bottom2 - top2);
- context.moveTo(x, Math.floor(top2 + width));
- context.lineTo(x, Math.floor(top + width));
- context.moveTo(x, Math.floor(bottom2 + width));
- context.lineTo(x, Math.floor(bottom + width));
+ context.moveTo(x, Math.floor(top2 + lineWidth));
+ context.lineTo(x, Math.floor(top + lineWidth));
+ context.moveTo(x, Math.floor(bottom2 + lineWidth));
+ context.lineTo(x, Math.floor(bottom + lineWidth));
}
context.closePath();
Oops, something went wrong.

0 comments on commit 692a9e7

Please sign in to comment.