heavysixer / d4

A friendly reusable charts DSL for D3
MIT License
432 stars 46 forks source link

Live updates #8

Open Timopheym opened 10 years ago

Timopheym commented 10 years ago

I am creating something like chart's constructor using d4. And now i need a lot of live updates features. Am i need to recreate all chart with d3, each time when i change something, or play with native css\svg data? May be it's possible to make some setter's like in https://github.com/curran/model ? It could be very useful for dynamic charts. What do you think?

Thanks.

heavysixer commented 10 years ago

This is an excellent idea. I would love to partially update just a specific feature of a d4 chart as opposed to re-rendering the entire chart over again. I think that it could fit in quite well with the existing structure of how things are rendered presently. I would be more than happy to work with you on this feature, but I can't do it alone because I am slammed getting other loose ends tied up on the project.

So consider this +1 from me!

Timopheym commented 10 years ago

So, i'l do it with a big pleasure (also 'corse it will be a part of my full-time job). But how do you see it? D3 is date-driven lib, so maybe it would be better to extend data object in mode.js way? And create relation with when-like features inside on d4objet?

heavysixer commented 10 years ago

@Timopheym yes I think decoupled is better, especially if it allows better composition. Right now d4 doesn't know anything about the data object. This is by design, because where possible I want d3 to do the heavy lifting and keep d4 as light weight as possible, to avoid recreating the wheel. I would love to see what you propose, my only suggestion would be to ensure that your approach is opt-in when needed so that those who just want a simple chart that renders once do not have to jump through any extra hoops.

Timopheym commented 10 years ago

I get you, so i will create a fork, and do some drafts...

heavysixer commented 10 years ago

Hey @Timopheym so I am starting to work on this problem myself. Did you make any progress on it you'd like to share?

Timopheym commented 10 years ago

I am afraid i am not =( A have lot of tasks.. But let me know how you will do it, may be i can do some module by the same way as you!