[CalendarServer-changes] [12713] CalendarServer/trunk/calendarserver/webadmin/work.xhtml
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:16:27 PDT 2014
Revision: 12713
http://trac.calendarserver.org//changeset/12713
Author: wsanchez at apple.com
Date: 2014-02-14 17:11:35 -0800 (Fri, 14 Feb 2014)
Log Message:
-----------
Placeholder for updates
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/webadmin/work.xhtml
Modified: CalendarServer/trunk/calendarserver/webadmin/work.xhtml
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/work.xhtml 2014-02-15 00:43:26 UTC (rev 12712)
+++ CalendarServer/trunk/calendarserver/webadmin/work.xhtml 2014-02-15 01:11:35 UTC (rev 12713)
@@ -22,16 +22,16 @@
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8" />
<script type="text/javascript">
- window.onload = function() {
+ function init() {
var data = [4, 8, 15, 16, 23, 42];
/* scale is a function that normalizes a value in data into the range 0-98 */
var scale = d3.scale.linear()
- .domain([0, d3.max(data)])
+ .domain([0, 200])
.range([0, 98])
- var bars = d3.select(".chart")
+ var bars = d3.select("#work_queues_chart")
.selectAll("div")
.data(data)
.enter().append("div")
@@ -41,6 +41,14 @@
}
+ function update() {
+ var data = [0, 0, 0, 0, 0, 0];
+
+ /* http://stackoverflow.com/questions/14958825/dynamically-update-chart-data-in-d3 */
+ }
+
+ window.onload = init;
+
</script>
</head>
@@ -49,8 +57,10 @@
<h1><t:slot name="title" /></h1>
- <div id="work_queues_chart" class="chart" />
+ <div id="work_queues_chart" />
+ <button onclick="update()">Update</button>
+
</body>
</html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/729f0792/attachment.html>
More information about the calendarserver-changes
mailing list