Fixed legend background color, added forgotten template file to SVN

This commit is contained in:
Gregory Shikhman 2009-07-15 03:31:32 +00:00
parent d8893ed791
commit 5022fb966d
2 changed files with 97 additions and 1 deletions

View file

@ -0,0 +1,96 @@
<!-- $Id$ -->
<!--
Copyright (C) 2009 by Gregory Shikhman <cornmander@cornmander.com>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
or at your option any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="/wesstats/js/calendar.js"></script>
<link rel="stylesheet" rev="stylesheet" href="/wesstats/css/calendar.css" media="screen" />
<style type="text/css">@import url('http://www.wesnoth.org/mw/skins/glamdrol/main.css');</style>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['linechart']});
</script>
<script type="text/javascript">
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addRows($numdates);
data.addColumn('string', '${xlabel}');
${js_columnnames}
${js_celldata}
// Create and draw the visualization.
new google.visualization.LineChart(document.getElementById('visualization')).
draw(data, {title: '${title}', backgroundColor: {stroke:'#FFFBF0', fill:'#FFFBF0', strokeSize: 0}, legendBackgroundColor: {stroke:'#FFFBF0', fill:'#FFFBF0', strokeSize: 0}} );
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body>
<div id="header">
<div id="logo">
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
</div>
<div id="nav">
<ul>
<li><a href="http://www.wesnoth.org/">Home</a></li>
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
</ul>
</div>
</div>
<div id="visualization" style="width: 800px; height: 600px;">
</div>
<div id="filter_box">
Used filters:
<b py:if="len(used_filters) == 0">None</b>
<table border="1">
<tr py:for="filter in used_filters">
<td>${filter}</td>
<td py:for="val in ufilters_vals[filter]">
${val}
</td>
</tr>
</table>
<form method="get">
<table border="1">
<tr>
<td py:for="filter in filters">
${filter}
</td>
</tr>
<tr>
<td py:for="filter in filters">
<select name="${filter}" multiple="multiple" size="5">
<option py:for="item in sorted(fdata[filter])">${item}</option>
</select>
</td>
</tr>
</table>
Start date: <input name="startdate" />
<input type="button" value="select" onclick="displayDatePicker('startdate');" />
<br />
End date: <input name="enddate" />
<input type="button" value="select" onclick="displayDatePicker('enddate');" />
<br />
<input type="submit" value="Submit" />
</form>
</div>
</body>
</html>

View file

@ -31,7 +31,7 @@
${data}
// Create and draw the visualization.
new google.visualization.PieChart(document.getElementById('visualization')).
draw(data, {title: '${title}', backgroundColor: {stroke:'#FFFBF0', fill:'#FFFBF0', strokeSize: 0} } );
draw(data, {title: '${title}', backgroundColor: {stroke:'#FFFBF0', fill:'#FFFBF0', strokeSize: 0}, legendBackgroundColor: {stroke:'#FFFBF0', fill:'#FFFBF0', strokeSize: 0} } );
}
google.setOnLoadCallback(drawVisualization);