zegrimace
zegrimace

Reputation: 1

Error encountered when building composite chart dc.js

I am receiving the following error when trying to build a composite chart in DC.js:

Uncaught TypeError: Cannot create property '_function () { return dc.utils.subtract(d3.min(getAllXAxisMinFromChildCharts()), _chart.xAxisPadding()); }' on string 'xAxisMin'

My composite chart code is as follows:

var comChart = dc.compositeChart("#comChart")  
    .width(450)  
    .height(300)
    .elasticX(true)  
    .x(d3.scale.linear().domain([0,100]))  
    .elasticY(true)  
    .brushOn(false)  
    .group(sumGroup)  
    .dimension(dayCountDimension)   
    .compose([  
        dc.lineChart(comChart)  
            .colors('green')  
            .group(group1),  
        dc.lineChart(comChart)  
            .colors('brown')   
            .group(group2)  
        ]);

The day count dimension is an int, and all groups are products of a sum map reduce. Has anyone encountered this issue before?

Upvotes: 0

Views: 65

Answers (1)

Gordon
Gordon

Reputation: 20120

It looks like you probably have some odd version of the code from between versions. This was fixed in January 2014.

Please try updating to the 2.0 betas (preferably - will be released soon), or backing out to 1.7.5.

Upvotes: 0

Related Questions