Commits

Chris Leonello committed 6eacf28

Partially working renderer.

Comments (0)

Files changed (2)

src/plugins/jqplot.meritOrderAxisRenderer.js

         this._barLabels = [];
         $.extend(true, this, options);
         if (this.name == 'yaxis') {
-            this.tickOptions.formatString = this.tickOptions.formatString || "%d\%";
+            this.tickOptions.formatter = $.jqplot.PercentTickFormatter;
+            this.tickOptions.formatString = '%d%%';
         }
         var db = this._dataBounds;
         db.min = 0;

src/plugins/jqplot.meritOrderRenderer.js

         this._plotData = [[this._xstart, this.data[0][1]/this._yaxis._maxSeriesY]];
         this._yheight = yp(0) - yp(this._plotData[0][1]);
 
-        this.gridData.push([xp(this._plotData[0][0]), yp(this._plotData[0][1]), this._xwidth, this._yheight]);
+        this.gridData.push([Math.round(xp(this._plotData[0][0])), Math.round(yp(this._plotData[0][1])), Math.round(this._xwidth), Math.round(this._yheight)]);
     };
     
     // Method: makeGridData
     // called within scope of series.
     $.jqplot.MeritOrderRenderer.prototype.draw = function(ctx, gd, options) {
         var i;
-        var opts = (options != undefined) ? options : {};
+        var opts = $.extend(true, {}, {fillStyle: this.color}, options);
         var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
-        var colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors);
         ctx.save();
         if (gd.length) {
             if (showLine) {
                 for (i=0; i<gd.length; i++){
-                    opts.fillStyle = colorGenerator.next();
-                    if (this.renderer.showBorders) {
-                        opts.strokeStyle = this.renderer.borderColor;
-                    }
-                    else {
-                        opts.strokeStyle = opts.fillStyle;
-                    }
                     this.renderer.shapeRenderer.draw(ctx, gd[i], opts);
                 }
             }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.