Does the main D3 module namespace not get updated with bleeding edge submodule additions?












1















I'm trying to use d3.group, a very new addition to the d3-array submodule that got released a few days ago. I am using a yarn/webpack workflow and import statements to pull in D3 like so:



import * as d3 from 'd3';


However, when I tried to use d3.group, it didn't work.



console.log(d3.group)


Returns undefined.



I to solve this, I had to install the newest version of d3-array and assign that to a new namespace.



import * as d3Array from 'd3-array';
console.log(d3Array.group)


This successfully returned the function.



So my question is, when Bostock or the other D3 developers update the submodules, do the updates not get added to the main D3 namespace until a major update? Is it necessary to pull from the submodules every time I want to use a really new feature?










share|improve this question


















  • 1





    Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

    – cal_br_mar
    Nov 13 '18 at 2:35
















1















I'm trying to use d3.group, a very new addition to the d3-array submodule that got released a few days ago. I am using a yarn/webpack workflow and import statements to pull in D3 like so:



import * as d3 from 'd3';


However, when I tried to use d3.group, it didn't work.



console.log(d3.group)


Returns undefined.



I to solve this, I had to install the newest version of d3-array and assign that to a new namespace.



import * as d3Array from 'd3-array';
console.log(d3Array.group)


This successfully returned the function.



So my question is, when Bostock or the other D3 developers update the submodules, do the updates not get added to the main D3 namespace until a major update? Is it necessary to pull from the submodules every time I want to use a really new feature?










share|improve this question


















  • 1





    Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

    – cal_br_mar
    Nov 13 '18 at 2:35














1












1








1








I'm trying to use d3.group, a very new addition to the d3-array submodule that got released a few days ago. I am using a yarn/webpack workflow and import statements to pull in D3 like so:



import * as d3 from 'd3';


However, when I tried to use d3.group, it didn't work.



console.log(d3.group)


Returns undefined.



I to solve this, I had to install the newest version of d3-array and assign that to a new namespace.



import * as d3Array from 'd3-array';
console.log(d3Array.group)


This successfully returned the function.



So my question is, when Bostock or the other D3 developers update the submodules, do the updates not get added to the main D3 namespace until a major update? Is it necessary to pull from the submodules every time I want to use a really new feature?










share|improve this question














I'm trying to use d3.group, a very new addition to the d3-array submodule that got released a few days ago. I am using a yarn/webpack workflow and import statements to pull in D3 like so:



import * as d3 from 'd3';


However, when I tried to use d3.group, it didn't work.



console.log(d3.group)


Returns undefined.



I to solve this, I had to install the newest version of d3-array and assign that to a new namespace.



import * as d3Array from 'd3-array';
console.log(d3Array.group)


This successfully returned the function.



So my question is, when Bostock or the other D3 developers update the submodules, do the updates not get added to the main D3 namespace until a major update? Is it necessary to pull from the submodules every time I want to use a really new feature?







d3.js






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 0:30









InspectorDannoInspectorDanno

738




738








  • 1





    Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

    – cal_br_mar
    Nov 13 '18 at 2:35














  • 1





    Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

    – cal_br_mar
    Nov 13 '18 at 2:35








1




1





Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

– cal_br_mar
Nov 13 '18 at 2:35





Are you sure the latest d3-array 2.0 is already on the the d3 package? github.com/d3/d3/blob/master/CHANGES.md github.com/d3/d3/blob/master/package.json

– cal_br_mar
Nov 13 '18 at 2:35












1 Answer
1






active

oldest

votes


















0














Considering that the newest d3-array is not it on the latest d3 bundle, and you're using webpack/yarn



You can easily loads the modules on the d3.*, install the latest modules and wrap then together,



example:
// select all your d3 modules and save it on d3.js
// then load it on your script -> import d3 from './d3';
import { select, selectAll } from 'd3-selection'
import { group } from 'd3-array'



    const d3 = Object.assign(
{},
{
select,
selectAll,
group,
}
)
export default d3;


ref: https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272082%2fdoes-the-main-d3-module-namespace-not-get-updated-with-bleeding-edge-submodule-a%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Considering that the newest d3-array is not it on the latest d3 bundle, and you're using webpack/yarn



    You can easily loads the modules on the d3.*, install the latest modules and wrap then together,



    example:
    // select all your d3 modules and save it on d3.js
    // then load it on your script -> import d3 from './d3';
    import { select, selectAll } from 'd3-selection'
    import { group } from 'd3-array'



        const d3 = Object.assign(
    {},
    {
    select,
    selectAll,
    group,
    }
    )
    export default d3;


    ref: https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/






    share|improve this answer




























      0














      Considering that the newest d3-array is not it on the latest d3 bundle, and you're using webpack/yarn



      You can easily loads the modules on the d3.*, install the latest modules and wrap then together,



      example:
      // select all your d3 modules and save it on d3.js
      // then load it on your script -> import d3 from './d3';
      import { select, selectAll } from 'd3-selection'
      import { group } from 'd3-array'



          const d3 = Object.assign(
      {},
      {
      select,
      selectAll,
      group,
      }
      )
      export default d3;


      ref: https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/






      share|improve this answer


























        0












        0








        0







        Considering that the newest d3-array is not it on the latest d3 bundle, and you're using webpack/yarn



        You can easily loads the modules on the d3.*, install the latest modules and wrap then together,



        example:
        // select all your d3 modules and save it on d3.js
        // then load it on your script -> import d3 from './d3';
        import { select, selectAll } from 'd3-selection'
        import { group } from 'd3-array'



            const d3 = Object.assign(
        {},
        {
        select,
        selectAll,
        group,
        }
        )
        export default d3;


        ref: https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/






        share|improve this answer













        Considering that the newest d3-array is not it on the latest d3 bundle, and you're using webpack/yarn



        You can easily loads the modules on the d3.*, install the latest modules and wrap then together,



        example:
        // select all your d3 modules and save it on d3.js
        // then load it on your script -> import d3 from './d3';
        import { select, selectAll } from 'd3-selection'
        import { group } from 'd3-array'



            const d3 = Object.assign(
        {},
        {
        select,
        selectAll,
        group,
        }
        )
        export default d3;


        ref: https://www.giacomodebidda.com/how-to-import-d3-plugins-with-webpack/







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 7:33









        cal_br_marcal_br_mar

        62138




        62138






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272082%2fdoes-the-main-d3-module-namespace-not-get-updated-with-bleeding-edge-submodule-a%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Danny Elfman

            Lugert, Oklahoma