What is the best way to update d3 charts using - AJAX

前端 未结 3 1332
广开言路
广开言路 2020-12-23 23:22

I\'ve learned few blocks of d3. And I\'ve made a responsive d3 histogram with the help of jquery.

Now that I wanted to go a bit forward on updating d3 c

3条回答
  •  情歌与酒
    2020-12-23 23:48

    I know the OP specified jQuery, but for those Googlers not wanting another framework, there is a native D3 way of doing this, using either request or json:

    d3.request(url, function(error, response) {
        // Now use response to do some d3 magic
    });
    

    or

    d3.json(url, function(error, response) {
        // Now use response to do some d3 magic
    });
    

提交回复
热议问题