Code Monkey home page Code Monkey logo

Comments (4)

christabor avatar christabor commented on June 20, 2024 1

I have not tried it with the new version - I'll take a look and see what kind of errors I get.

from d3.geometer.

christabor avatar christabor commented on June 20, 2024

What version did you try and what specific problems did you have? I just swapped the v3 version with https://cdnjs.cloudflare.com/ajax/libs/d3/4.7.1/d3.min.js in the examples directory and it still works fine. actually I'm seeing some errors. I'll take a long, but let me know what you are seeing as well.

from d3.geometer.

christabor avatar christabor commented on June 20, 2024

I went through the d3 v4 CHANGES docs and made the relevant updates. It seems to be working for both now! Let me know if I missed something. I have not looked at this plugin for some time.

from d3.geometer.

AndreaSimeone avatar AndreaSimeone commented on June 20, 2024

Thanks, now works like a charm!
Just another question(probably is just my fault): I've some problems with ngons and rotations (I want visualize shapes with odd sides with Y axes simmetry) but can't figure out how to obtain rotation.
Example:

     var root = d3.select("svg").append("g").attr("id","container");
     var ngon = d3_geometer.NGon(root);
     ngon(width / 6, 3)
     .drawVertices()
     .drawLabels()
     .drawPerimeterInteriorAngles()
     .calculateEdgeOffsets()
     .move(width / 2, height / 2)
     .rotate(-30,"root");

This chunk of code doesn't produce any rotation effect. If I pass the D3 selector to the rotate function an error occur:

Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '[object Object]' is not a valid selector.

What's the correct way to implement rotation?
Thanks!

from d3.geometer.

Related Issues (4)

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.