Giter Site home page Giter Site logo

Comments (4)

jefffriesen avatar jefffriesen commented on June 27, 2024

I've tried this but doesn't work:

d3.select('#example')
      .datum(parsedData.data)
      .transition().duration(500)
      .call(chart);

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

Hey @jefffriesen
Transitions are a work in progress right now and unfortunately will not work for all chart types right now. Mostly this is due to the fact that when I started writing d4 it was done as work for hire for a company that needed static charts used in dynamically generated presentations. As such there was no need for transitions. Unfortunately, it appears transitions are not something that i'll be able to bolt on and I am presently working through the implications of restructuring the rendering routines to support them.

I took a stab at the new structure with the donut chart as you pointed out, and I've taken another shot at it here:
http://visible.io/charts/column/dynamic-update.html

The differences between the two is that the donut uses the unique key property that d3 expects in order to handle the tweening, the dynamic column chart merely redraws the chart over again. Feel free to hack around on this feature if you want I am actively looking for collaborators ;-)

I have an open issue dedicated to transitions here:
#4

from d4.

jefffriesen avatar jefffriesen commented on June 27, 2024

@heavysixer
Thanks for the update and the example. That helps. I saw #4 but I didn't know if the intention was tweened transitions or just updating charts based on data model changes.

Ultimately what I'm looking for is a d3 charting lib that I can use within a React.js app (if you have examples I would love to see that). Charting libraries, and especially transitions, have their own set of challenges with React that I haven't yet solved. So far I like the approach of this library the best.

I've used dc.js quite a bit and it's great - but there are some rough edges. And something more low-level like this may be easier to integrate with React.

On one hand, tweened transitions are somewhat of a bonus. On the other hand, they can make a big different in interpreting changing data.

If I do start using this library heavily I would love to contribute what I can. At some point I would need a geo map and a heat map, so maybe I could contribute that.

I'm not sure if you want to close this ticket or leave it open because you're planning on working on transitions. I'll leave that up to you.

from d4.

heavysixer avatar heavysixer commented on June 27, 2024

@jefffriesen
I'll go ahead and close this ticket since #4 is where i'm tracking the transition discussion. I completely agree with you in regards to the benefits of tweening transitions and so I would love to fully support them at some point. In regards to tracking model changes, this is something better handled by something like crossfilter, which is why d4 doesn't have any concept of the data itself, meaning the data is passed directly into d3 and merely iterated over by d4. This is done so that d4 could offer some tie-in like dc at some point like you pointed out. Glad you like the approach to d4, please let me know if you hit any more snags.

from d4.

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.