summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d2fadf2)
candidates won't have graphs with dangerously similar colors. After 10
candidates though, they're on their own. Also added captions to the pref_tables
of the Schulze method to quickly explain how to read them. Feel free to
edit/move them. I tried to make them quick, explanatory and look-alikes to the
rest of the text, but definitely failed on the look-alike requirement. Please
fix...
class GraphController < ApplicationController
class GruffGraff
class GraphController < ApplicationController
class GruffGraff
- COLORS = ['#74CE00', '#005CD9', '#DC0D13', '#131313', '#990033']
+ COLORS = ['#74CE00', '#005CD9', '#DC0D13', '#131313', '#A214A4', 'EFF80E',
+ '90E5E6', 'F58313', '437D3D', '0E026C']
BACKGROUND_COLORS = ['#74CE00', '#FFFFFF'] #for green and white background
def initialize(options)
BACKGROUND_COLORS = ['#74CE00', '#FFFFFF'] #for green and white background
def initialize(options)
<!-- This table shows how many times each choice was ranked above the other,
with percentages-->
<table class="preftable">
<!-- This table shows how many times each choice was ranked above the other,
with percentages-->
<table class="preftable">
+<caption>Each number shows how many times the candidate on the left beat the
+matching candidate on the top. The Schulze/Condorcet winner is on the top of the
+left column.</caption>
<tr>
<td></td>
<% candidates.each do |candidate| -%>
<tr>
<td></td>
<% candidates.each do |candidate| -%>
<br />
<!-- This table generates a margin of victory -->
<table class="preftable">
<br />
<!-- This table generates a margin of victory -->
<table class="preftable">
+<caption>A simplification of the above data. The winner is on the left; each cell
+names the defeated candidate and the magnitude of the victory in parenthesis.
+</caption>
<% candidates.each do |victor| %>
<tr>
<th><%=h @names[victor] %></th>
<% candidates.each do |victor| %>
<tr>
<th><%=h @names[victor] %></th>
+ font-family: verdana,arial,helvetica,sans-serif;
- border-width: 2px;
- border-color: #999999;
- border-style: solid;
+ border-width: 2px;
+ border-color: #999999;
+ border-style: solid;
+ caption-side: top;
+}
+.preftable caption {
+ font-family: verdana,arial,helvetica,sans-serif;
+ font-size: 0.9em;
.preftable th {
font-family: verdana,arial,helvetica,sans-serif;
border-width: 2px;
.preftable th {
font-family: verdana,arial,helvetica,sans-serif;
border-width: 2px;
border-width: 1px;
border-color: #999999;
border-style: solid;
border-width: 1px;
border-color: #999999;
border-style: solid;
text-align: right;
padding-right: 5px;
padding-left: 5px;
text-align: right;
padding-right: 5px;
padding-left: 5px;
.voterbox#election td { border-color: #990d13;}
.voterbox#election td { border-color: #990d13;}
.rbmoreinfo hr {
width: 100%;
height: 10px;
.rbmoreinfo hr {
width: 100%;
height: 10px;