forked from external-repos/pa11y-dashboard
Amend xaxis mode to time from category to try to reduce x axis clutter
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = function (grunt) {
|
|||||||
'public/js/vendor/bootstrap/js/dropdown.js',
|
'public/js/vendor/bootstrap/js/dropdown.js',
|
||||||
'public/js/vendor/bootstrap/js/tooltip.js',
|
'public/js/vendor/bootstrap/js/tooltip.js',
|
||||||
'public/js/vendor/flot/jquery.flot.js',
|
'public/js/vendor/flot/jquery.flot.js',
|
||||||
'public/js/vendor/flot/jquery.flot.categories.js',
|
'public/js/vendor/flot/jquery.flot.time.js',
|
||||||
'public/js/vendor/flot/jquery.flot.selection.js',
|
'public/js/vendor/flot/jquery.flot.selection.js',
|
||||||
'public/js/vendor/flot/jquery.flot.resize.js',
|
'public/js/vendor/flot/jquery.flot.resize.js',
|
||||||
'public/js/site.js'
|
'public/js/site.js'
|
||||||
|
@@ -17,8 +17,9 @@ $(document).ready(function(){
|
|||||||
hoverable: true
|
hoverable: true
|
||||||
},
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
mode: 'categories',
|
mode: 'time',
|
||||||
tickLength: 0
|
tickLength: 0,
|
||||||
|
timeformat: "%d %b"
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
tickDecimals: 0
|
tickDecimals: 0
|
||||||
@@ -115,7 +116,7 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getXAxisLabel (el) {
|
function getXAxisLabel (el) {
|
||||||
return el.find('[data-role="category"]').html();
|
return el.find('[data-role="category"]').attr('data-value');
|
||||||
}
|
}
|
||||||
|
|
||||||
function storeDatum (el, label) {
|
function storeDatum (el, label) {
|
||||||
|
4
public/js/site.min.js
vendored
4
public/js/site.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -17,4 +17,9 @@ function helper (register) {
|
|||||||
return moment(context).fromNow();
|
return moment(context).fromNow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
register('date-timestamp', function (context) {
|
||||||
|
return moment(context).valueOf();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{{#results}}
|
{{#results}}
|
||||||
<tr data-role="url-stats">
|
<tr data-role="url-stats">
|
||||||
<td data-role="category">{{date-format date format="DD MMM YYYY"}}</td>
|
<td data-value="{{date-timestamp date}}" data-role="category">{{date-format date format="DD MMM YYYY"}}</td>
|
||||||
<td class="text-center" data-label="error">{{count.error}}</td>
|
<td class="text-center" data-label="error">{{count.error}}</td>
|
||||||
<td class="text-center" data-label="warning">{{count.warning}}</td>
|
<td class="text-center" data-label="warning">{{count.warning}}</td>
|
||||||
<td class="text-center" data-label="notice">{{count.notice}}</td>
|
<td class="text-center" data-label="notice">{{count.notice}}</td>
|
||||||
|
Reference in New Issue
Block a user