Permalink
Browse files

now both graph kinds work with rickshaw

  • Loading branch information...
1 parent c56d195 commit f644f70eb5a1c1a1b04e01e8ae0621f234839efb @tarekziade tarekziade committed Feb 28, 2013
Showing with 289 additions and 289 deletions.
  1. +10 −8 monolith/media/app.js
  2. +1 −19 monolith/media/index.html
  3. +263 −262 monolith/media/lib/monolith.js
  4. +15 −0 monolith/media/monolith.css
View
@@ -65,18 +65,18 @@ app.directive('chart', function() {
// XXX can this be externalized as a template ?
// not an ugly string
template:
- '<div><div class="chart span12" >' +
-
+ '<div><div class="chart" >' +
+
// y axis legend
- '<div id="y_axis-{{id}}"/>' +
+ '<div class="y_axis" id="y_axis-{{id}}"/>' +
// actual chart
'<div id="chart-{{id}}" style="height:300px; margin: 0 auto"/>' +
// legend and change button
- '<div class="span12">' +
- '<a href="#modal-{{id}}" role="button" class="span2 btn btn-primary" data-toggle="modal">Change</a>' +
- '<div class="span3 offset7" id="legend-{{id}}"></div>' +
+ '<div >' +
+ '<a href="#modal-{{id}}" role="button" class="btn btn-primary" data-toggle="modal">Change</a>' +
+ '<div id="legend-{{id}}"></div>' +
'</div>' +
// modal box
@@ -107,7 +107,8 @@ app.directive('chart', function() {
if (scope.type == 'series') {
- scope.chart = new MonolithSeries(dashboard.server,
+ scope.chart = new MonolithSeries(scope.id,
+ dashboard.server,
"#startdate-" + scope.id,
"#enddate-" + scope.id,
"#appid-" + scope.id,
@@ -117,7 +118,8 @@ app.directive('chart', function() {
}
if (scope.type == 'aggregate') {
- scope.chart = new MonolithAggregate(dashboard.server,
+ scope.chart = new MonolithAggregate(scope.id,
+ dashboard.server,
"#startdate-" + scope.id,
"#enddate-" + scope.id,
"#appid-" + scope.id,
View
@@ -25,22 +25,6 @@
<script type="text/javascript" src="app.js"></script>
- <style>
- .rickshaw_graph .detail .x_label { display: none }
- .rickshaw_graph .detail .item { line-height: 1.4; padding: 0.5em }
- .detail_swatch { float: right; display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 0 }
- .rickshaw_graph .detail .date { color: #a0a0a0 }
-
-#y_axis-chart2 {
- position: relative;
- width: 40px;
- height: 100%;
- float: right;
-}
-.rickshaw_legend {
-/* float: left;*/
-}
- </style>
</head>
<body ng-app="components" class="preview" data-spy="scroll" data-target=".subnav" data-offset="80">
@@ -72,12 +56,10 @@
</div>
<div class="span6">
-<!--
<chart title="Downloads and Daily Users"
id="chart1"
- fields="downloads_count,users_count"
+ fields="visits"
type="series"/>
--->
</div>
</div> <!-- end of span12 -->
</div> <!-- end of row-fluid -->
Oops, something went wrong.

0 comments on commit f644f70

Please sign in to comment.