Closed yanofsky closed 10 years ago
oh sorry about that, I didn't realize I was using tabs
I'll fix and add some tests
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?
@yanofsky ok great let me pull it down and check things over. I will report back.
@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?
There are a couple reasons that this addition is worthy
g
that you've already created and the axis is drawn inside of that. These modifications follow that pattern as long as the node is a g
or svg
svg
you could draw the chart inside a g
in that svg
instead of an svg
inside of an svg
. You could position and/or animate the g
using more common d3 patterns.svg
element or appending one independently of all other modifications to the DOM. To a person that is used to specifying their D3 container as an svg this prevents d4 from drawing another svg
inside of the target svg
it.@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?
Awesome, thanks!
Updated this pull with attribution in the Authors doc
@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.
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 thatsvg
if the container is ag
, make a chart in thatg
else the container is something else, append ansvg
and make a chart in thatsvg
As a result I renamed
this.svg
tothis.container