D3树图,用于非常大的数据集

时间:2023-01-15 13:45:09

I am not sure if there is a way to implement this feature. I am looking in for something like zoomable treemaps but to load a few child levels on first go, then no node click add more child nodes and append them to the tree.

我不确定是否有办法实现此功能。我正在寻找像zoomable树图这样的东西,但是要先加载一些子级别,然后没有节点点击添加更多的子节点并将它们附加到树上。

Say in http://bost.ocks.org/mike/treemap/ after i reach the leaf node, I make an ajax call if child exists, and if it does, I add them as a child to the graph. I dont want to redraw the graph from scratch, but rather make it more of a visualication on click. This is challenging to me, as i am not aware of how will the accumulate function will work. This would ensure also, that if i click on grandparent it will help to go back to the previous parent. This I am planning to achive: 1. Load on click 2. Make it more dynamic 3. Implement it for a very large dataset within browsers cache-able range though

在到达叶节点后在http://bost.ocks.org/mike/treemap/中说,如果子节点存在,我会进行ajax调用,如果存在,我将它们作为子节点添加到图形中。我不想从头开始重绘图形,而是让它更像是点击的可视化。这对我来说很有挑战性,因为我不知道累积功能将如何工作。这也将确保,如果我点击祖父母,它将有助于回到前一个父母。我打算实现这一目标:1。点击加载2.使其更具动态3.在浏览器缓存范围内为非常大的数据集实现它虽然

Could someone please suggest something on this front?

有人可以在这方面提出一些建议吗?

1 个解决方案

#1


0  

I would move the algorithm of calculating the dx, dy, x and y on the server side by accepting the size of the div where you would want to place the treemap on and on a single call I'd return objects upto depth 3 or 4. The challenge could be with the animation transition.

我会在服务器端移动计算dx,dy,x和y的算法,方法是接受你希望将树形图放在单个调用上的div的大小我会返回深度为3或4的对象可能是动画转型的挑战。

#1


0  

I would move the algorithm of calculating the dx, dy, x and y on the server side by accepting the size of the div where you would want to place the treemap on and on a single call I'd return objects upto depth 3 or 4. The challenge could be with the animation transition.

我会在服务器端移动计算dx,dy,x和y的算法,方法是接受你希望将树形图放在单个调用上的div的大小我会返回深度为3或4的对象可能是动画转型的挑战。