When a table has lots of columns and may be sorted by any combination of them, it's helpful to display the spread in a consistent order.

This can be accomplished by changing lines 257-260 of views_summarize.module from

  foreach ($hist as $value => $count) {
    $rows[] = array($value, $count);
  }
  

to

  foreach ($hist as $value => $count) {
    $rows[$value] = array($value, $count);
  }
  ksort($rows);

Sorry, I suck at rolling patches, but perhaps someone who finds this useful will roll a patch. Thank you for a great module!!

Comments

oadaeh’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: bug » feature
StatusFileSize
new569 bytes

I created and attached a patch. I also included the option of doing natural sorts for users of PHP 5.4 or newer.

oadaeh’s picture

Status: Needs review » Fixed

This has been committed to the 7.x-1.x branch, here: http://drupalcode.org/project/views_summarize.git/commit/2da9372

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.