Collapsible tree diagram v4 and Internet Explorer





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am using this d3 Javascript library: https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd



When i use Google Chrome it works fine, but when I use Internet Explorer 11. I get an error in:



 path = `M ${s.y} ${s.x}
C ${(s.y + d.y) / 2} ${s.x},
${(s.y + d.y) / 2} ${d.x},
${d.y} ${d.x}`


The problem is the sign `. I know that Internet Explorer and Chrome "read" code differently, but how can i modify my code to work in Internet Explorer or in both?










share|improve this question























  • Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

    – Khauri McClain
    Nov 16 '18 at 13:35











  • No don't mind the spacing. Can you give an example of how you would write it ?

    – TheAsker
    Nov 16 '18 at 13:41











  • Looks like Zim's got you covered in his answer

    – Khauri McClain
    Nov 16 '18 at 13:50


















0















I am using this d3 Javascript library: https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd



When i use Google Chrome it works fine, but when I use Internet Explorer 11. I get an error in:



 path = `M ${s.y} ${s.x}
C ${(s.y + d.y) / 2} ${s.x},
${(s.y + d.y) / 2} ${d.x},
${d.y} ${d.x}`


The problem is the sign `. I know that Internet Explorer and Chrome "read" code differently, but how can i modify my code to work in Internet Explorer or in both?










share|improve this question























  • Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

    – Khauri McClain
    Nov 16 '18 at 13:35











  • No don't mind the spacing. Can you give an example of how you would write it ?

    – TheAsker
    Nov 16 '18 at 13:41











  • Looks like Zim's got you covered in his answer

    – Khauri McClain
    Nov 16 '18 at 13:50














0












0








0








I am using this d3 Javascript library: https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd



When i use Google Chrome it works fine, but when I use Internet Explorer 11. I get an error in:



 path = `M ${s.y} ${s.x}
C ${(s.y + d.y) / 2} ${s.x},
${(s.y + d.y) / 2} ${d.x},
${d.y} ${d.x}`


The problem is the sign `. I know that Internet Explorer and Chrome "read" code differently, but how can i modify my code to work in Internet Explorer or in both?










share|improve this question














I am using this d3 Javascript library: https://bl.ocks.org/d3noob/43a860bc0024792f8803bba8ca0d5ecd



When i use Google Chrome it works fine, but when I use Internet Explorer 11. I get an error in:



 path = `M ${s.y} ${s.x}
C ${(s.y + d.y) / 2} ${s.x},
${(s.y + d.y) / 2} ${d.x},
${d.y} ${d.x}`


The problem is the sign `. I know that Internet Explorer and Chrome "read" code differently, but how can i modify my code to work in Internet Explorer or in both?







javascript google-chrome d3.js internet-explorer-11






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 16 '18 at 13:28









TheAskerTheAsker

98




98













  • Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

    – Khauri McClain
    Nov 16 '18 at 13:35











  • No don't mind the spacing. Can you give an example of how you would write it ?

    – TheAsker
    Nov 16 '18 at 13:41











  • Looks like Zim's got you covered in his answer

    – Khauri McClain
    Nov 16 '18 at 13:50



















  • Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

    – Khauri McClain
    Nov 16 '18 at 13:35











  • No don't mind the spacing. Can you give an example of how you would write it ?

    – TheAsker
    Nov 16 '18 at 13:41











  • Looks like Zim's got you covered in his answer

    – Khauri McClain
    Nov 16 '18 at 13:50

















Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

– Khauri McClain
Nov 16 '18 at 13:35





Apparently IE11 doesn't support template literals. You can probably modify the code (laboriously) by using plain quotes " instead and then replacing all of the ${...} with string concatenation like we used to do in the old days. Also, is there any particular reason for this spacing? Because that might make things slightly harder.

– Khauri McClain
Nov 16 '18 at 13:35













No don't mind the spacing. Can you give an example of how you would write it ?

– TheAsker
Nov 16 '18 at 13:41





No don't mind the spacing. Can you give an example of how you would write it ?

– TheAsker
Nov 16 '18 at 13:41













Looks like Zim's got you covered in his answer

– Khauri McClain
Nov 16 '18 at 13:50





Looks like Zim's got you covered in his answer

– Khauri McClain
Nov 16 '18 at 13:50












1 Answer
1






active

oldest

votes


















1














If template literals are not supported, just build the path by concatenating Strings and variables as you would have done prior ES6:



path = "M " + s.y + " " + s.x + " C " + ((s.y + d.y) / 2) + " " + s.x + ", " + ((s.y + d.y) / 2) + " " + d.x + ", " + d.y + " " + d.x;





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%2f53338840%2fcollapsible-tree-diagram-v4-and-internet-explorer%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









    1














    If template literals are not supported, just build the path by concatenating Strings and variables as you would have done prior ES6:



    path = "M " + s.y + " " + s.x + " C " + ((s.y + d.y) / 2) + " " + s.x + ", " + ((s.y + d.y) / 2) + " " + d.x + ", " + d.y + " " + d.x;





    share|improve this answer




























      1














      If template literals are not supported, just build the path by concatenating Strings and variables as you would have done prior ES6:



      path = "M " + s.y + " " + s.x + " C " + ((s.y + d.y) / 2) + " " + s.x + ", " + ((s.y + d.y) / 2) + " " + d.x + ", " + d.y + " " + d.x;





      share|improve this answer


























        1












        1








        1







        If template literals are not supported, just build the path by concatenating Strings and variables as you would have done prior ES6:



        path = "M " + s.y + " " + s.x + " C " + ((s.y + d.y) / 2) + " " + s.x + ", " + ((s.y + d.y) / 2) + " " + d.x + ", " + d.y + " " + d.x;





        share|improve this answer













        If template literals are not supported, just build the path by concatenating Strings and variables as you would have done prior ES6:



        path = "M " + s.y + " " + s.x + " C " + ((s.y + d.y) / 2) + " " + s.x + ", " + ((s.y + d.y) / 2) + " " + d.x + ", " + d.y + " " + d.x;






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 16 '18 at 13:43









        ZimZim

        1,0741817




        1,0741817
































            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%2f53338840%2fcollapsible-tree-diagram-v4-and-internet-explorer%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

            Bressuire

            Vorschmack

            Quarantine