```json
{
    "title": "GrabPERF: Whole bunch of bug/performance fixes, part 2",
    "url": "https://performancezen.com/2005/09/14/grabperf-whole-bunch-of-bugperformance-fixes-part-2/",
    "datePublished": "2005-09-14",
    "dateModified": "2005-09-14",
    "language": "en-US",
    "description": "Greg Gershman from BlogDigger found a bug in the Index charts just now. Seems that the chart legend was out of whack with the lines on the chart. Easy fix.…",
    "author": "spierzchala",
    "publisher": "Performance Zen"
}
```

# GrabPERF: Whole bunch of bug/performance fixes, part 2

Greg Gershman from

[BlogDigger](http://www.blogdigger.com/)

found a bug in the Index charts just now. Seems that the chart legend was out of whack with the lines on the chart.
Easy fix. Turns out I was submitting the test ids in a random order. The graph generation component was fine with this, but when I went to build the legend, MySQL ordered the dynamic legend build result in a proper ascending fashion.
Simple fix: when I convert the test ids to an array, I sort the array before proceeding.
Thanks Greg!
