DateAxisRender/CanvasAxisTickRenderer duplicate date label bug

Matthew Lucas avatarMatthew Lucas created an issue

The data is a set of dates and a number. I render a bar graph for the data set below. Each date only appears once in the data, but the graph duplicates 11-04.

If I enable highlighting, the values still show up correctly (hover over the end, it says 2012-11-30, but it is aligned with 2012-11-29.

Only everything from 2012-11-05 and on are shifted from the label.

[["2012-11-01",6],
["2012-11-02",10],
["2012-11-03",4],
["2012-11-04",9],
["2012-11-05",2],
["2012-11-06",9],
["2012-11-07",10],
["2012-11-08",2],
["2012-11-09",8],
["2012-11-10",7],
["2012-11-11",4],
["2012-11-12",8],
["2012-11-13",3],
["2012-11-14",1],
["2012-11-15",9],
["2012-11-16",8],
["2012-11-17",2],
["2012-11-18",3],
["2012-11-19",7],
["2012-11-20",4],
["2012-11-21",5],
["2012-11-22",8],
["2012-11-23",8],
["2012-11-24",5],
["2012-11-25",1],
["2012-11-26",2],
["2012-11-27",2],
["2012-11-28",6],
["2012-11-29",8],
["2012-11-30",8]]

Comments (5)

  1. sectio_aurea

    I had this same problem appear out of the blue recently, where axis labels were duplicated but mouseover/hover values on data points were accurate.

    A possible workaround, which worked for my scenario, is to change the date values to e.g. "2012-11-30 12:00PM", with a time of day specified. This returned axis labels to the correct display for me - no duplicates.

  2. mike_young_

    I had the same issue come up for me, but I was already supplying dates in the javascript format with time included. If there is no workaround for this, it will mean I'll have to completely rewrite my charts using another plugin.

    -Sad Panda

  3. mike_young_

    unrelated, but this variable, if used is .... well, wrong:

    var daysInMonths = [31,28,31,30,31,30,31,30,31,30,31,30]; should be: var daysInMonths = [31,28,31,30,31,30,31,31,30,31,30,31];

  4. Log in to comment
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.