Commit 08fc3cf5 authored by Leo Iannacone's avatar Leo Iannacone

Merge remote-tracking branch 'github/master' into portable

parents b2cc506d e7aa8493
......@@ -141,9 +141,50 @@ function Page_History() {
else
info.push(0);
}
days_data.series.push(info);
days_data.series.push({
name: distro,
data: info
});
}
Chartist.Line('#days-chart', days_data);
var effect = function (x, t, b, c, d) {
return -c * (t /= d) * (t - 2) + b;
};
var $chart = $('#days-chart');
var $toolTip = $chart
.append('<div class="tooltip fade top in" role="tooltip">' +
'<div class="tooltip-arrow"></div> ' +
'<div class="tooltip-inner"></div>' +
'</div>').find('.tooltip').hide();
$chart.on('mouseenter', '.ct-point', function () {
var $point = $(this),
value = $point.attr('ct:value'),
seriesName = $point.parent().attr('ct:series-name');
$point.animate({
'stroke-width': '20px'
}, 300, effect);
$toolTip.find('.tooltip-inner').html(seriesName + ' (' + value + ')');
$toolTip.show();
});
$chart.on('mouseleave', '.ct-point', function () {
var $point = $(this);
$point.animate({
'stroke-width': '10px'
}, 300, effect);
$toolTip.hide();
});
$chart.on('mousemove', function (event) {
$toolTip.css({
left: event.offsetX - $toolTip.width() / 2,
top: event.offsetY - $toolTip.height() - 20
});
});
}
function _exportTableToCSV($table, filename) {
......
......@@ -265,6 +265,7 @@ footer .info {
width: 50%;
float: left;
margin-bottom: 30px;
position: relative;
}
.ct-chart .ct-label {
......
......@@ -38,7 +38,7 @@ get_tablesorter() {
}
get_chartist() {
VERSION="0.1.11"
VERSION="0.1.12"
NAME="chartist-js-${VERSION}"
if [ -d ${EXT_LIBS_DIR}/${NAME} ] ; then return ; fi
ARCHIVE=v${VERSION}.zip
......
......@@ -19,7 +19,7 @@
<script src="/external_libs/tablesorter/jquery.tablesorter.min.js"></script>
<script src="/external_libs/tablesorter/jquery.tablesorter.widgets.min.js"></script>
<script src="/external_libs/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
<script src="/external_libs/chartist-js-0.1.11/libdist/chartist.min.js"></script>
<script src="/external_libs/chartist-js-0.1.12/libdist/chartist.min.js"></script>
<script>
var config = <%- JSON.stringify(web) %>
......
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0-dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/external_libs/chartist-js-0.1.11/libdist/chartist.min.css">
<link rel="stylesheet" href="/external_libs/chartist-js-0.1.12/libdist/chartist.min.css">
<link rel="stylesheet" href="/external_libs/tablesorter/theme.bootstrap.css">
<link rel="stylesheet" href="/stylesheets/style.css?<%= version %>">
</head>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment