Giter Club home page Giter Club logo

Comments (9)

David-Desmaisons avatar David-Desmaisons commented on May 12, 2024 1
  1. Understood, I played around with another type of zoom where the geometry were re-calculated some time ago. This waht we need here. There maybe have a commit somewhere in the history of this repo with such a code.
  2. Ok
  3. Thanks.
  1. This is a good sugestion I will provide

from vue.d3.tree.

elendirx avatar elendirx commented on May 12, 2024 1

Any update on this?

from vue.d3.tree.

David-Desmaisons avatar David-Desmaisons commented on May 12, 2024 1

@G3z version 4.1.0 introduces min and max zoom props as well as a "rescaling" zoom.
This correct problem 1 and 4 that you mentioned.

from vue.d3.tree.

David-Desmaisons avatar David-Desmaisons commented on May 12, 2024

Hello @G3z , thanks for your feedback and suggestion

  1. For the overlap mention, did you try the zoomable props and if so why was it not satisfactory?
  2. This is an interesting suggestion, I like the open property more than a max number of nodes since it will be hard to decide which nodes to show. It will be a good idea also to make this open prop reactive.
  3. Could you share your data as a JSON so I can play around with your data?

from vue.d3.tree.

G3z avatar G3z commented on May 12, 2024
  1. the problem with zooming is that everything just gets bigger or smaller proportionally (dots lines and text should stay the same size only move further apart), so you'll see the above graph bigger. negative margine works better (because drawing size gets bigger than svg size)
  2. 👍
  3. I'll clean the personal data and share it with you to do some tests asap
  4. after tinkering with your lib i noticed min/max zooming is hard coded, using a prop would be better, don't you think ?

from vue.d3.tree.

G3z avatar G3z commented on May 12, 2024

data.json.zip
this is a json of 9239 nested accounts
and this is the unzoomed result in a 1108x900 svg:
schermata 2017-08-13 alle 03 14 46

how can i help ?

from vue.d3.tree.

G3z avatar G3z commented on May 12, 2024

I think i've found a simple trick to avoid overlapping:
currently you are setting the canvas size with cluster_size but it is possible to specify the node size

...
this.layout.size(this.internaldata.tree, size, this.margin, this.maxTextLenght)
.nodeSize([15, 200]); // add this = height:15, width:200px
...

from vue.d3.tree.

David-Desmaisons avatar David-Desmaisons commented on May 12, 2024

@G3z could you detail better your proposal, or create a PR?
Thanks

from vue.d3.tree.

G3z avatar G3z commented on May 12, 2024

I'm going by memory:

I propose to add a nodeSize property to tree that accepts an array in the form of [width,height] so that it's possible to set a size that prevent overlapping

In the code around here https://github.com/David-Desmaisons/Vue.D3.tree/blob/master/src/Tree.vue#L146
in resize() and completeRedraw()

...
this.internaldata.svg
              .attr('width', size.width)
              .attr('height', size.height)
this.layout.size(this.internaldata.tree, size, this.margin, this.maxTextLenght)
...

you are letting D3 figuring out node dimensions but it's possible to set the single node dimensions and this helps D3 prevent overlapping

...
this.internaldata.svg
              .attr('width', size.width)
              .attr('height', size.height)
this.layout.size(this.internaldata.tree, size, this.margin, this.maxTextLenght)
              .nodeSize([15, 200]) // this should come from props
...

from vue.d3.tree.

Related Issues (20)

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.