In a nonpartisan (Spring) election, the order in which candidates names appear on the ballot is determined by the drawing of lots, or by any method that is by chance. S. 5.60(1)(b), Wis. Stats. 3/24/2003
In a partisan primary, the order in which candidates of one party's names appear is also determined by lot.
At a partisan General Election (such as for Governor or President) the ballot order is determined by which political party's candidate received the most votes at the last General Election. For example, Governor Walker received the most votes in the 2010 General Election, so Republican candidates were first on the 2012 General Election ballot. In 2012, President Obama received the most votes, so Democratic candidates are first on the 2014 General Election ballot.
The ballot order for independent candidates is determined by lot.