Skip to content

Commit

Permalink
Merge pull request #126 from JacksonTian/fix_line
Browse files Browse the repository at this point in the history
采用删除svg而不是重置svg,重置svg会导致创建2个svg对象在DOM节点中
  • Loading branch information
theseue committed Mar 3, 2013
2 parents 1fe7390 + 9983533 commit e3792e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/charts/line.js
Expand Up @@ -384,7 +384,7 @@
* @param {object} options options json object for determin line style.
*/
Line.prototype.render = function () {
this.canvas.clear();
this.canvas.remove();
this.createCanvas();
var conf = this.defaults;
var linesData = this.linesData;
Expand Down Expand Up @@ -419,7 +419,6 @@
var y = y0 - ((nodeData[j] - min) * yMatchNum);

linePath = linePath + x + "," + y;

if (j < l - 1) {
linePath = linePath + "L";
}
Expand Down Expand Up @@ -502,7 +501,6 @@
$(this.node).append(this.floatTag);
// if (hoverMode) {
// background.mouseover(function () {

// }).mouseout(function () {
// floatTag.css({"visibility" : "hidden"});
// });
Expand Down

0 comments on commit e3792e5

Please sign in to comment.