started to add a histogram on key.

This commit is contained in:
didier.amyot committed 2014-05-24 10:02:01 -04:00
1 parent cfe5340961
commit 082157bc5f
8 files changed
+148 -4

No files matched your search

+28 -1
View File
@@ -4,10 +4,17 @@ humanValueOfStatisticalAbreviation =
mean: "mean"
std: "standard deviation"
var: "variance"
min: "minimum"
max: "maximum"
n: "number of documents"
getAxisLabel = (min, stepSize, numberOfBins) ->
return (min + 0.5 * stepSize + i * stepSize for i in [0... numberOfBins])
root.controllers.controller('keyStatCtrl', ['$scope', '$routeParams', 'util', ($scope, $routeParams, util) ->
$scope.name = "didier!"
$scope.name = $routeParams.key
$scope.stats = []
url = "/api/#{ $routeParams.server }/#{ $routeParams.database }/#{ $routeParams.collection }"
@@ -18,5 +25,25 @@ root.controllers.controller('keyStatCtrl', ['$scope', '$routeParams', 'util', ($
$scope.stats.push({name: humanValueOfStatisticalAbreviation[key], value: val })
)
$scope.chartConfig =
options:
chart:
type: 'column'
plotOptions:
column:
groupPadding: 0
pointPadding: 0
borderWidth: 0
xAxis:
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
title:
text: 'Distribution'
loading: false
series: [{
data: [10, 15, 12, 8, 7, 4, 12, 12, 9, 11],
name: $routeParams.key
color: '#008CBA'
}]
])