voidlabs / elycharts

Interactive Javascript (SVG|VML) Charting Library
http://elycharts.com
Other
10 stars 6 forks source link

nx!=auto doesn't work fine when ny != auto and ny < nx #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems the algorythm that decides where to draw vertical lines takes "ny" 
into consideration when it shouldn't. (it only displays ny lines when you have 
nx > ny).

---
        for (i = 0; i < nx + 1; i++) {
          if (
            forceBorderX1 && i == 0 || // Always show first line if forced
            forceBorderX2 && i == nx || // Always show last line if forced
            drawV && ( // To show other lines draw must be true
              (props.nx != 'auto' && i > 0 && i < ny) || // If nx = [number] show other lines (first and last are managed above with forceBorder)
              (props.nx == 'auto' && (typeof labels[i] != 'boolean' || labels[i])) // if nx = 'auto' show all lines if a label is associated
            )
            // Show all lines if props.nx is a number, or if label != false, AND draw must be true
          ) {

---

Probably the issue is in the "props.nx != 'auto' && i > 0 && i < ny": maybe 
this should be nx and not ny.

Original issue reported on code.google.com by stefano....@gmail.com on 2 Aug 2011 at 12:16

GoogleCodeExporter commented 9 years ago

Original comment by stefano....@gmail.com on 3 Aug 2011 at 6:24