Code Monkey home page Code Monkey logo

d3-voronoi-treemap's People

Contributors

dependabot[bot] avatar kathyreid avatar kcnarf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d3-voronoi-treemap's Issues

Stability, or Update Function?

Hi,
This is excellent work and looks beautiful and I am excited to use this in my projects, thank you!

In my use case, the clip changes, and transitions between a rectangle and an ellipse and back. The problem I'm experiencing is that in order to correctly fill the space in both cases (and in between), I need to update the layout, which, as far as I know, recomputes the layout from scratch and comes up with a completely new layout. This results in jumping between two completely separate layouts, and is even more hectic during the transitions.

Is there any chance for an update function that can try to find a correct layout that starts with the current layout, or maybe the same seed points?
Thank you!

Manually set the initial position

Hi,
Is it possible to have an API to set the initial position of each node? I understand that this d3-voronoi-treemap is based your previous d3-voronoi-map. The reason to add this API is that your current voronoi treemap is not suitable for dynamic hierarchical data.

My current solution is to set the .prng to a seedable PRNG for dynamic hierarchical data and generate them separately. I don't think it is an efficient way to update the voronoi treemap.

Thanks.

rootNode.descendants in readme

In your readme, you have:

var allNodes = rootNode.descendants;

which will cause a subtle failure later in your sample code. The line should be:

var allNodes = rootNode.descendants();

Also, while I did figure it out eventually, it would be helpful for people new to d3 if you defined cellLiner at least, and possibly gave a sample weightAccessor and fillScale.

Thanks for contributing this project.

Request support for the vite environment

Recently, Svelte started to use the latest version of vite to for new projects. Vite doesn't support the current way of importing functions in the "src/d3-voronoi-treemap.js". I found out that way to make the package works again is to replace the first line of "src/d3-voronoi-treemap.js" to import * as voronoiMap from 'd3-voronoi-map'. Could the development team of d3-voronoi-map considering changing the file to make it compatible to vite environment? Thank you!

release new version

i am in the process of building a nice chart on observable with this library, but my console gets swamped with log messages from the code. it looks like there have been a few changes from the latest 1.1.0 release, including removal of these console log messages. any chance you bump the version and push the release?

voronoi-treemap without d3

I know this library is depends on some of the d3 libraries. But what are the chances of making it completely independent of d3 ?

If you remove the dependency ,it will easy to transform this to any other programming language and use it on any other platform.

change license from GPL-3.0 to a more general

This issue is a continuation of a discussion initiated in the d3/d3-voronoi's issue#5.

Summary of previous discussion :
@Svmali84 - So can I make use of it (i.e. d3-voronoi-treemap) on my website free ? I see it is under GPL-3 license. So putting copyright is sufficient ?
@micahstubbs - I imagine that you can use it so long as you do not distribute it. this stackoverflow answer may help ๐Ÿ˜„ https://stackoverflow.com/a/2281266/1732222
@micahstubbs - we could also ask @Kcnarf if he would be willing to release d3-voronoi under a more liberal license, like for example the BSD-3-Clause license that d3 itself is released under or the popular MIT license

Add padding to child polygons for deep hierarchies

Hi - it'd be quite useful to be able to pad child hierarchies a bit, so it's clearer what the top-level polygons are, compared to lower level ones.

You can set the stroke width as discussed in #8 but that doesn't always look good and has issues with the lines overlapping child polygons; I'd like to be able to pass a padding function that returns the desired padding based on tree depth.

(I'm going to try to see if I can implement this and raise a PR, thought I'd raise an issue for discussion first)

d3VoronoiMap.voronoiMap is not a function

Greetings,

Receiving the subject error from the below code:

var stratify = d3.stratify()
            .id(function(d) { return d.id_field; })
            .parentId(function(d) { return d.parent_field; });

let tree = stratify(data);

function weightAccessor(d) {
            return d.value_field;
}

var rootNode = d3.hierarchy(tree, d => d.values); 

rootNode.sum(weightAccessor);

var voronoiTreemap = d3.voronoiTreemap().clip([[0, 0], [0, h], [w, h], [w, 0]]);
voronoiTreemap(rootNode);

Using all the latest versions of the libs and loading in the correct order:

<script type="text/javascript" src="../libs/vendor/d3-weighted-voronoi.js"></script> <script type="text/javascript" src="../libs/vendor/d3-voronoi-map.js"></script> <script type="text/javascript" src="../libs/vendor/d3-voronoi-treemap.js"></script>

FYI - using d3 v5

Any advice for correcting the error?

Thanks and Great Work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.