I'm currently working on an application that is using d3, dc, and crossfilter to render some charts.
- crossfilter2: v1.4.6
- d3: v3.5.17
- dc: v2.2.1
I was working on making the Y scale only showing inter numbers without a decimal point.
This is working when I run my application in development mode with 'ng serve'.
But when I build my app in production mode the Y scale is not the same.
Really the only thing different here is using "ng serve" or "ng build --prod".
The code that sets the ticks is
/* grpProductType is a crossfilter.Group*/
const maxY = d3.max(d3.values(grpProductType))(1)[0]?.value;
if (maxY < 7) {
/* dcStepsByProductType is a dc.BarChart*/
dcStepsByProductType.yAxis().ticks(maxY);
}
I have managed to narrow down what is causing the problem to a certain point. The problem is dependant on the property the angular.json file under:
projects => [app name] => architect => build => configurations => production => optimization => scripts
If this flag is true then the logic error occurs, if false then the app runs fine.
The logs when printing out when the value is true (with error) are

When the value is false (working correctly) then the logs are

It seems the return value from invoking the 'all' function is the difference.
My question is what could be possible reasons for this?


