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
Indiana  
#1 Posted : Monday, November 23, 2015 9:48:06 AM(UTC)
Indiana

Rank: Newbie

Groups: Registered
Joined: 11/23/2015(UTC)
Posts: 1
Belgium

Hi,

Is there a way possible to sort the Legend in a NVD3 created Pie Chart or Bar ?
I have a legend LOW,MEDIUM,HIGH but the legend is not always shown in the correct Order.
Sorting in the SQL statement does not make a difference.

Any Ideas? Thanks.

epf  
#2 Posted : Monday, November 23, 2015 10:53:01 AM(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)
Good find, actually it is now listed as a bug 53 and it will be fixed in the 2.0 release.
If you need a hot fix, you should modify the ReportView.cs file, method initXValues():
Code:
return result.OrderBy(i => i.Value).ToDictionary(i => i.Key, i => i.Value); 


The fix also include a test to perform ascending or descending sort...
epf  
#3 Posted : Tuesday, January 19, 2016 7:57:04 AM(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)
Actually the fix proposed is incorrect...
You can check if the 2.0 has still the problem (refer to https://sealreport.org/forum/default.aspx?g=posts&t=181#post423)
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.