logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dhaval_bi  
#1 Posted : Tuesday, May 10, 2016 12:50:16 PM(UTC)
dhaval_bi

Rank: Newbie

Groups: Registered
Joined: 3/17/2016(UTC)
Posts: 8
United States

Thanks: 2 times
Under Views > View > Model HTML View, set “Use custom template text” to True and expand Custom Template.

This not only allows for changes to Legend position, but also allows making other customizations that may be required to the report.


Search for the below code in the Edit custom template
svg
.datum(@(page.NVD3ChartType != "pieChart" ? "series" : "series[0].values"))
.transition().duration(500)
.call(chart);

And add this code. In the code, 600 is the x-coordinate and -100 is the y-coordinate.

d3.select(".nv-legendWrap")
.attr("transform","translate(600,-100)");

epf  
#2 Posted : Monday, May 23, 2016 12:26:31 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 205 time(s) in 198 post(s)
Thank you for the trick.
Note that in the new version 2.1 you can insert this piece of JavaScript into a new NVD3 parameter "Script: Final" so you do not have to edit a custom template.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.