Giter Club home page Giter Club logo

Comments (5)

goodforenergy avatar goodforenergy commented on June 25, 2024 1

Thanks @davelandry. I'm not sure this module is exactly what I'm looking for. The two features I'm making use of from the full D3Plus library at the moment are:

  • text-wrapping within a circle (i.e knowing that the width at which text should wrap changes as the y placement of the text changes)
  • automatic detection of container bounds (so I don't have to calculate those widths myself)

Here's a simple example demonstrating how I'm currently using the library.

I tried to replicate this example using this module, which you can see here.

Am I correct in presuming that to finish this example I would need to calculate the width of the circle myself for each line of text? Or am I missing something?

from d3plus-text.

davelandry avatar davelandry commented on June 25, 2024 1

This module isn't currently as fully functional as the text wrapping from the main library, but those are both features we want to incorporate. I've created specific issues for those features. Don't be shy in creating new issues 😉

  • circle wrapping: #5
  • bounds detection: #6

from d3plus-text.

goodforenergy avatar goodforenergy commented on June 25, 2024 1

Got it. Thanks @davelandry :)

from d3plus-text.

davelandry avatar davelandry commented on June 25, 2024

I'm using this module in the new d3plus-shape module. Take a look at these lines for an example enter/update/exit: https://github.com/d3plus/d3plus-shape/blob/master/src/rect.js#L104-L166

The biggest change is that the container element for the new d3plus-text module should be either an <svg> or <g> element (and not a <text> tag). The module itself handles creating the <text> tag along with all of the <tspan> lines.

from d3plus-text.

davelandry avatar davelandry commented on June 25, 2024

Big update today. Renamed some functions and updated the README with 2 examples: one is a generic getting started and another one shows the resize function.

Are there any other specific questions/features that anyone would like to see documented at this time? I will keep this issue open as long as there are requested examples.

from d3plus-text.

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.