heavysixer / d4

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

Allow for a chart to be built inside of existing elements #24

Closed yanofsky closed 10 years ago

yanofsky commented 10 years ago

I think it will be useful to be able to build charts inside of existing elements. I added logic to scaffoldChart that does the following.

if the container is a svg, make a chart in that svg if the container is a g, make a chart in that g else the container is something else, append an svg and make a chart in that svg

As a result I renamed this.svg to this.container

yanofsky commented 10 years ago

oh sorry about that, I didn't realize I was using tabs

I'll fix and add some tests

yanofsky commented 10 years ago

So it turns out I had another branch merged in there, but the other noise, i'm not sure where that's coming from. It's all on files that I didn't touch. Is the repo missing a grunt config?

heavysixer commented 10 years ago

@yanofsky ok great let me pull it down and check things over. I will report back.

heavysixer commented 10 years ago

@yanofsky followup question what is the use case for this addition? Is this so that I can have a chart within a chart? Can you please help me understand the intent of it?

yanofsky commented 10 years ago

There are a couple reasons that this addition is worthy

heavysixer commented 10 years ago

@yanofsky this sounds great. I am going to do some testing tonight and see if I can remove some of the noise from this diff and then i'll merge everything down unless I have additional questions. How do you wanted to be credited on the contributors document?

yanofsky commented 10 years ago

Awesome, thanks!

Updated this pull with attribution in the Authors doc

heavysixer commented 10 years ago

@yanofsky followup on this PR. I noticed you have several other active branches on D4, which means that you must have spent some time digging through the guts of it. If you have any feedback or feature requests for this project I would love to hear it.