mozilla/socorro — pull request #98 by Lonnen (2011-10-21 05:34:26+00:00)
Title: bug 695928 cleanup daily.js to fix graph colours

The actual bug fix got rolled up with the formatting when I diffed it to get it out, so here's the highlights:

Bring all the color-related code into the document ready function. Create a single array of color values, use that to provide colors for the headers and the colors in the graphs.

You can see this in the first few lines, where the chart opts are brought into the ready function and the color values are defined independently of the opts. The rest of the bug fix is at the end, where the table header coloring code has been moved into the primary ready event. Instead of waiting for a ready event to be fired from the graph, it will just execute sequentially after the plot function is called.