Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'format' of undefined #1333

Closed
kranthibhagath opened this issue Sep 4, 2017 · 2 comments
Closed

Comments

@kranthibhagath
Copy link

Uncaught TypeError: Cannot read property 'format' of undefined
at _dc (dc.js:273)
at dc.js:5417
at dc.js:5420

i am the beginner for the dc.js lib i am trying to execute the the file it showing this error i dont know what i did wrong can any one help me to solve this issue
my program is

<title> dc templets </title> <style type="text/css"> body, html { height: 100%; margin: 0; padding: 0; }
    div {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
</style>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.2/d3.js"></script>
<script type="text/javascript" src="crossfilter.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/dc/1.7.5/dc.js"></script>
<script type="text/javascript" src="print_filter.js"></script>

<script type="text/javascript">
    var data = [{
        date: "2011-11-14T16:17:54Z",
        quantity: 2,
        total: 190,
        tip: 100,
        type: "tab"
    }, {
        date: "2011-11-14T16:20:19Z",
        quantity: 2,
        total: 190,
        tip: 100,
        type: "tab"
    }, {
        date: "2011-11-14T16:28:54Z",
        quantity: 1,
        total: 300,
        tip: 200,
        type: "visa"
    }, {
        date: "2011-11-14T16:30:43Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T16:48:46Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T16:53:41Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T16:54:06Z",
        quantity: 1,
        total: 100,
        tip: 0,
        type: "cash"
    }, {
        date: "2011-11-14T16:58:03Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T17:07:21Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T17:22:59Z",
        quantity: 2,
        total: 90,
        tip: 0,
        type: "tab"
    }, {
        date: "2011-11-14T17:25:45Z",
        quantity: 2,
        total: 200,
        tip: 0,
        type: "cash"
    }, {
        date: "2011-11-14T17:29:52Z",
        quantity: 1,
        total: 200,
        tip: 100,
        type: "visa"
    }]

    var facts = crossfilter(data);
    //console.log(data);
    console.log(facts);
    print_filter('facts');
</script>
@gordonwoodhull
Copy link
Contributor

dc.js is not yet compatible with d3v4 (#1173); please use the last d3 in the 3.x series (3.5.17).

Additionally, unless you have legacy constraints, I suggest using either the stable dc.js 2.0.x versions, or the latest 2.1.x versions.

@kranthibhagath
Copy link
Author

kranthibhagath commented Sep 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants