Skip to content

Commit

Permalink
color scheme now includes plot colors, new stephan mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Boyer committed Dec 11, 2011
1 parent 18722e4 commit e980a45
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
31 changes: 25 additions & 6 deletions ui/website/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,33 @@
text_color: "#444444",
message_color: "#0000aa",
error_color: "#ff0000",
prompt_color: "#00aa00"
prompt_color: "#00aa00",
plot_grid_color: "#dadada",
plot_axis_color: "#aaaaaa",
plot_text_color: "#444444",
plot_line_color: "#4d87b7",
}],
["Viral", {
background_color: "#000000",
text_color: "#ffff00",
message_color: "#0000aa",
error_color: "#ff0000",
prompt_color: "#00bb00"
prompt_color: "#00bb00",
plot_grid_color: "#333333",
plot_axis_color: "#666666",
plot_text_color: "#ffff00",
plot_line_color: "#4d87c7",
}],
["Stephan", {
background_color: "#000000",
text_color: "#dddddd",
message_color: "#0000aa",
error_color: "#ff0000",
prompt_color: "#00bb00",
plot_grid_color: "#333333",
plot_axis_color: "#666666",
plot_text_color: "#dddddd",
plot_line_color: "#4d87c7",
}],
];

Expand All @@ -100,6 +119,10 @@
$("span.color-scheme-message").css("color", color_schemes[current_color_scheme][1].message_color);
$("span.color-scheme-error").css("color", color_schemes[current_color_scheme][1].error_color);
$("span.color-scheme-prompt").css("color", color_schemes[current_color_scheme][1].prompt_color);
$("svg .hrule line, svg .vrule line").css("stroke", color_schemes[current_color_scheme][1].plot_grid_color);
$("svg .hrule2 line, svg .vrule2 line").css("stroke", color_schemes[current_color_scheme][1].plot_axis_color);
$("svg text").css("fill", color_schemes[current_color_scheme][1].plot_text_color);
$("svg .line").css("stroke", color_schemes[current_color_scheme][1].plot_line_color);
}

// when the DOM loads
Expand Down Expand Up @@ -568,7 +591,6 @@
.attr("y", h + 10)
.attr("dy", ".71em")
.attr("text-anchor", "middle")
.attr("fill", "#444444")
.text(x.tickFormat(10));

// y-axis labels
Expand All @@ -577,7 +599,6 @@
.attr("x", -5)
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("fill", "#444444")
.text(y.tickFormat(10));

// y-axis
Expand All @@ -594,15 +615,13 @@

// y-axis line
vrules2.filter(function(d) { return (d == 0); }).append("line")
.attr("class", "axis")
.attr("x1", x)
.attr("x2", x)
.attr("y1", 0)
.attr("y2", h - 1);

// x-axis line
hrules2.filter(function(d) { return (d == 0); }).append("line")
.attr("class", "axis")
.attr("y1", y)
.attr("y2", y)
.attr("x1", 0)
Expand Down
22 changes: 6 additions & 16 deletions ui/website/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,32 +165,22 @@ select#color-scheme-picker

/* for plotting */

.hrule line {
stroke: #dadada;
svg .hrule line, svg .vrule line {
shape-rendering: crispEdges;
}

.hrule2 line.axis {
stroke: #aaa;
svg .hrule2 line, svg .vrule2 line {
shape-rendering: crispEdges;
}

.vrule line {
stroke: #dadada;
shape-rendering: crispEdges;
}

.vrule2 line.axis {
stroke: #aaa;
shape-rendering: crispEdges;
}

.line {
svg .line {
fill: none;
stroke: steelblue;
stroke-width: 1.5px;
}

svg text {
}

/* for Internet Explorer */
a img
{
Expand Down

0 comments on commit e980a45

Please sign in to comment.