smontanari / code-forensics

A toolset for code analysis and report visualisation
384 stars 45 forks source link

System evolution graph empty #22

Closed Leviter closed 6 years ago

Leviter commented 6 years ago

When running gulp system-evolution-analysis --dateFrom=2017-01-01 --dateTo=2017-12-31 --layerGroup=Code --timeSplit=1m I see that it runs without errors. Also I see 4 generated files in the output folder. They all have data that look fine...

When I go to the report, the graphs are empty.

In the Javascript console of the browser I see the following error message a couple of times (4 times to be exact):

d3.min.js:2 Error: <path> attribute d: Expected number, "MNaN,409.60493827…".

Leviter commented 6 years ago

Found out that this happens when I specify a dateFormat (I had it set to YYYY-MM-DD).

smontanari commented 6 years ago

Interestingly the default dateFormat is indeed YYYY-MM-DD. How do you specify it? I want to see if I can replicate the issue

Leviter commented 6 years ago

I added it to the gulpfile.js. In the meantime I already removed it, but it was something like this:

require('code-forensics').configure(
  {
    "dateFormat": "YYYYMMDD",
    .......
  }
);
smontanari commented 6 years ago

thank you @Leviter. I was able to re-create the issue and it's definitely a bug. I'll look into it, for the time being you might have to stick with the original YYYY-MM-DD format for things to work