fix #8056 - more refinements to checking data
[g.raphael] / g.line.js
index a0d1311..243ba8c 100644 (file)
--- a/g.line.js
+++ b/g.line.js
@@ -178,27 +178,27 @@ if (typeof(Raphael) == 'undefined') {
                     roffset :   Math.round(gutter / 100 + (1)) + 20,
             };
             //Roo.log(ax_args);
-            +ax[2] && axis.push(
-                // bottom
-                // x, y, length, from, to, steps, orientation, labels, type, dashsize, paper
-                chartinst.axis( ax_args)
-            );
-            
 //            +ax[2] && axis.push(
 //                // bottom
 //                // x, y, length, from, to, steps, orientation, labels, type, dashsize, paper
-//                chartinst.axis(
-//                    x + gutter,
-//                    y + height - gutter,
-//                    width - 2 * gutter,
-//                    minx,
-//                    maxx,
-//                    opts.axisxstep || Math.floor((width - 2 * gutter) / 20),
-//                    0,
-//                    opts.axisxlabels || false,
-//                    paper
-//                    
-//                    ));
+ //               //chartinst.axis( ax_args, paper)
+ //           );
+            
+           +ax[2] && axis.push(
+               // bottom
+               // x, y, length, from, to, steps, orientation, labels, type, dashsize, paper
+               chartinst.axis(
+                   x + gutter,
+                   y + height - gutter,
+                   width - 2 * gutter,
+                   minx,
+                   maxx,
+                   opts.axisxstep || Math.floor((width - 2 * gutter) / 20),
+                   0,
+                   opts.axisxlabels || false,
+                   paper
+                   
+                   ));
             // left axis
             +ax[3] && axis.push(
                 chartinst.axis(
@@ -227,7 +227,7 @@ if (typeof(Raphael) == 'undefined') {
                     "stroke-dasharray": opts.dash || ""
                 }));
             }
-
+            
             var sym = Raphael.is(symbol, "array") ? symbol[i] : symbol,
                 symset = paper.set();
 
@@ -238,7 +238,14 @@ if (typeof(Raphael) == 'undefined') {
                     Y = y + height - gutter - (valuesy[i][j] - miny) * ky;
 
                 (Raphael.is(sym, "array") ? sym[j] : sym) && symset.push(paper[Raphael.is(sym, "array") ? sym[j] : sym](X, Y, (opts.width || 2) * 3).attr({ fill: colors[i], stroke: "none" }));
-
+                
+                var vx = X - (opts.label_padding_x || 0);
+                var vy = Y - (opts.label_padding_y || 10);
+                
+                if(opts.linelabels && opts.linelabels[i] && opts.linelabels[i][j]){
+                    paper.text(vx, vy, opts.linelabels[i][j]);
+                }
+                
                 if (opts.smooth) {
                     if (j && j != jj - 1) {
                         var X0 = x + gutter + ((valuesx[i] || valuesx[0])[j - 1] - minx) * kx,