Permalink
Browse files

simplify chart div

  • Loading branch information...
1 parent 57ddf66 commit b851520da58690c2704b100979801ed440f45fbf @MJIO MJIO committed May 4, 2011
Showing with 10 additions and 9 deletions.
  1. +5 −0 public/css/style.css
  2. +5 −9 public/js/main.js
View
@@ -69,6 +69,11 @@ h1 {
padding: 5px;
}
+.line_chart {
+ height: 300px;
+ width: 100%;
+}
+
.clear {
clear: both;
}
View
@@ -71,13 +71,11 @@ var Healthety = function(){
// Check if host is already known.
if(charts[json.name] === undefined){
- $('#main').append('<li id="'+ json.name +'" class="block widget">'+
- '<div class="block_head"><div class="bheadl"></div><div class="bheadr">'+
- '</div><h2>'+ json.name +'</h2><ul class="tabs value"></ul></div>'+
- '<div class="block_content tab_content"><div class="line_chart">'+
- '</div></div><div class="bendl"></div><div class="bendr"></div></li>');
+ $('#widgets').append('<li id="'+ json.name +'"><div class="header"><h2>' +
+ json.name +'</h2><div class="values"></div><div class="clear"></div>' +
+ '</div><div class="container"><div class="line_chart"></div></div></li>');
- $('#main').sortable();
+ $('#widgets').sortable();
var options = {
series: { shadowSize: 0},
@@ -90,9 +88,7 @@ var Healthety = function(){
values[json.name] = {};
lines[json.name] = {};
- charts[json.name] = $.plot(
- $('.line_chart:last'), [], options
- );
+ charts[json.name] = $.plot($('.line_chart:last'), [], options);
}
replaceValue(json);
appendLine(json);

0 comments on commit b851520

Please sign in to comment.