Issue #54 resolved

Minor graphical glitch in Firefox

Anonymous created an issue

I get little spikes above and below the data points in Firefox 3.5 with the following graph (and a lot of others). Chrome renders it just fine. Didn't test any other browsers. {{{ <div id="graph7957" class="graph" style="width:400px;height:300px;"></div> <script type="text/javascript"> $(function () { $.jqplot("graph7957", [[["2007-12-01",463.865000],["2008-01-01",424.445000],["2008-02-01",681.985000],["2008-03-01",484.400000],["2008-04-01",408.885000],["2008-05-01",473.145000],["2008-06-01",446.705000],["2008-07-01",498.910000],["2008-08-01",825.725000],["2008-09-01",500.460000],["2008-10-01",970.060000],["2008-11-01",492.655000],["2008-12-01",1461.025000],["2009-01-01",933.045000],["2009-02-01",683.225000],["2009-03-01",756.155000],["2009-04-01",482.315000],["2009-05-01",520.490000],["2009-06-01",545.150000],["2009-07-01",388.350000]]], {"axes":{"xaxis":{"renderer":$.jqplot.DateAxisRenderer}}}); }); </script> }}} If you don't see the issue, let me know and I'll provide a screenshot.

If it's a bug in Firefox or too much work, just close this issue as wontfix. I don't really care about those little spikes, I just wanted you to know about them.

Comments (2)

  1. Chris Leonello repo owner

    This can be fixed by changing the lineJoin property of the line renderer from "miter" to "round". Here is a diff of jquery.jqplot.js: with the necessary 2 changes (lines 2073 and 2085):

    @@ -2073,7 +2073,7 @@
         $.jqplot.LineRenderer.prototype.init = function(options) {
             $.extend(true, this.renderer, options);
             // set the shape renderer options
    -        var opts = {lineJoin:'miter', lineCap:'round', fill:this.fill, isarc:false, strokeStyle:this.color, fillStyle:this.fillColor, lineWidth:this.lineWidth, closePath:this.fill};
    +        var opts = {lineJoin:'round', lineCap:'round', fill:this.fill, isarc:false, strokeStyle:this.color, fillStyle:this.fillColor, lineWidth:this.lineWidth, closePath:this.fill};
             this.renderer.shapeRenderer.init(opts);
             // set the shadow renderer options
             // scale the shadowOffset to the width of the line.
    @@ -2085,7 +2085,7 @@
             else {
                 var shadow_offset = this.shadowOffset*Math.atan((this.lineWidth/2.5))/0.785398163;
             }
    -        var sopts = {lineJoin:'miter', lineCap:'round', fill:this.fill, isarc:false, angle:this.shadowAngle, offset:shadow_offset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.lineWidth, closePath:this.fill};
    +        var sopts = {lineJoin:'round', lineCap:'round', fill:this.fill, isarc:false, angle:this.shadowAngle, offset:shadow_offset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.lineWidth, closePath:this.fill};
             this.renderer.shadowRenderer.init(sopts);
         };
    

    I'll make these changes and if no issues, it will be in the next release.

  2. Log in to comment