Possible to Sort Chart Series? [solved]

by ChuckNelson » Fri Jan 29, 2016 2:17 pm

Is it possible to enforce ordering of a series?

I tried ordering in various ways w/ the CAML query, but it doesn't seem to be working. I would want the series to display in the order of Draft, Business Review, Import, Implemented below, but as you can see in the screenshot below, the order seems arbitrary right now.



Plumsail Series Order Issue.JPG
Plumsail Series Order Issue.JPG (21.1 KiB) Viewed 493 times
Last edited by ChuckNelson on Mon Feb 01, 2016 12:25 pm, edited 1 time in total.
User avatar
Posts: 4
Joined: Fri Jan 29, 2016 1:57 pm

by ChuckNelson » Sat Jan 30, 2016 6:35 pm

Similar to my other post, also solved this one by sorting in the preRender handler, just had to sort the modified date first to get the weeks to show up in the correct order, then sorted the overall series array by the status.

Code: Select all
var series = config.series;
/* Sort each series array (which are the items by status) by modified date so weeks are sorted correctly */
for (var i = 0; i < series.length; i++) {
  series[i].data.sort(function(a, b) {
    return a.Modified - b.Modified;
/* Sort series by the status they contain */
series.sort(function(a, b) {
  return a.data[0].Status_x0020_Order - b.data[0].Status_x0020_Order;
User avatar
Posts: 4
Joined: Fri Jan 29, 2016 1:57 pm

by Rostislav » Mon Feb 01, 2016 12:36 pm

User avatar
Posts: 61
Joined: Fri Oct 09, 2015 10:51 am

Return to Dashboard Designer for SharePoint 2013