-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change funnel orientation #23
Comments
There is no way to do this as it stands in the current implementation. However, you can use SVG transformations to rotate the funnel. Assuming you wanted a left-to-right funnel, you could do the following after the funnel has been drawn: d3.select('#funnel svg')
.attr('transform', 'translate(0, ' + width + ')rotate(270)')
.attr('width', height)
.attr('height', width); You can also rotate the labels such that they are oriented correctly. However, it's likely the text will overflow the block: d3.selectAll('#funnel text').each(function () {
var element = d3.select(this).attr(),
x = element.attr('x'),
y = element.attr('y');
element.attr('transform', 'rotate(90, ' + x + ', ' + y + ')');
}); See complete example below: |
I am thinking about adding an option in a future release, such as the following: {
orientation: 'top-to-bottom', // Default
orientation: 'right-to-left', // Opposite of most horizontal funnels
orientation: 'bottom-to-top', // Equivalent to `isInverted` option
orientation: 'left-to-right' // Most horizontal funnels
} It might make sense to also allow a rotation degree (0 - 360). This would naturally complicate some of the math that goes on. |
Any word on the progress of this? |
@dearsaturn No recent progress on this. It is one of the more "doable" outstanding issues, so I might pick it up in the coming holidays when I have more availability. |
💯 happy holidays! |
While I could do a |
Also remove #23, as it will take a little more effort.
Is there any way to divide funnel horizontally and vertically both? |
@amitb009 That is a very interesting visualization. It could be supported in a future version, but is not quite on the horizon. It is a bit different than this issue, though, so it might make sense to create a new issue allowing for block partitions. |
Dear Jake, |
No, it does not. It is a high priority enhancement, however, and will be included in the next feature release (whenever that is). |
Is there any way to change the funnel from a vertical view to a horizontal view?
I haven't look into the code to check how that can be done but wanted to check first to see if there is any possibility to do this.
The text was updated successfully, but these errors were encountered: