Skip to content

Commit

Permalink
fix dates on tooltip, fix chart period filter on ff, v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zhebrak committed Mar 4, 2015
1 parent 9cc0232 commit 03804ef
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,22 @@
# v0.1

##### First public version, ready for use.

***

Stats collection

* Basic with statsy.send
* Async collection using Celery
* View decorator
* Class based view mixin
* Collection from JS

Charts

* Default charts with event/group count by period
* Registering custom charts



[+] Documentation on GitHub
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -3,7 +3,7 @@
from distutils.core import setup


__version__ = '0.0.9.8dev'
__version__ = '0.1'

short_description = 'Statistics for Django projects'

Expand Down
10 changes: 7 additions & 3 deletions statsy/static/statsy/app/css/statsy.css
Expand Up @@ -19,21 +19,25 @@ h1 {
}

.statsy__group_period, .statsy__event_period {
margin-right: 20px;
margin: 0 20px 30px 0;
float: right;
}

.btn.active.focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn:active:focus, .btn:focus {
outline: none !important;
}

.statsy__chart_container {
margin-bottom: 40px;
}

.statsy__chart {
padding: 20px;
padding: 40px 20px 20px 20px;
margin-bottom: 30px;
}

.statsy__group_list, .statsy__event_list {
margin: 10px 0 20px 20px;
margin-right: 20px;
line-height: 50px;
}

Expand Down
11 changes: 8 additions & 3 deletions statsy/static/statsy/app/js/dashboard.js
Expand Up @@ -38,8 +38,8 @@ var drawStats = function(dashboard, label, url) {
})
};

var createChart = function(groupDashboard, series, label) {
groupDashboard.highcharts({
var createChart = function(chart, series, label) {
chart.highcharts({
chart: {
type: 'spline'
},
Expand All @@ -59,7 +59,12 @@ var createChart = function(groupDashboard, series, label) {
min: 0
},
tooltip: {
valueDecimals: 2
valueDecimals: 2,
useHTML: true,
formatter: function() {
return '<table><tr><td>' + Highcharts.dateFormat('%A, %b %e, %H:%M ', new Date(this.x)) +'</td><tr/>' +
'<td style="text-align: center;"><em style="display: inline-block; height:8px; width: 8px; border-radius: 50%; background-color:' + this.series.color +';"></em><span style="color:' + this.series.color + ';"> ' + this.series.name + '</span>: <b>' + this.y.toFixed(2) + '</b></td></table>';
}
},
plotOptions: {
spline: {
Expand Down

0 comments on commit 03804ef

Please sign in to comment.