Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vnstat v1 compatibility #3

Merged
merged 1 commit into from
Aug 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,13 @@ function drawFiveChart()
direction: -1,
format: 'H:mm',
minorGridlines: { count: 0 },
title: 'Hour:Minute',
viewWindow: {
min: new <?php echo $fiveGraph[$lastSample]['label']; ?>,
max: new <?php echo $fiveGraph[0]['label']; ?>
}
title: 'Hour:Minute Scroll to zoom, Drag to pan'
<?php if (count($fiveGraph) > 0) {
echo ", viewWindow: {";
echo "min: new " . $fiveGraph[$lastSample]['label'] . ", ";
echo "max: new " . $fiveGraph[0]['label'];
echo "}";
} ?>
},
vAxis: {
format: '###.####<?php echo $fiveLargestPrefix; ?>',
Expand Down Expand Up @@ -269,7 +271,7 @@ function drawHourlyChart()
direction: -1,
format: 'd:H',
minorGridlines: { count: 0 },
title: 'Day:Hour',
title: 'Day:Hour Scroll to zoom, Drag to pan',
viewWindow: {
min: new <?php echo $hourlyGraph[$lastSample]['label']; ?>,
max: new <?php echo $hourlyGraph[0]['label']; ?>
Expand Down Expand Up @@ -346,7 +348,7 @@ function drawDailyChart()
direction: -1,
format: 'M/d',
//minorGridlines: { count: 0 },
title: 'Date: Month/Day',
title: 'Month/Day Scroll to zoom, Drag to pan',
viewWindow: {
min: new <?php echo $dailyGraph[$lastSample]['label']; ?>,
max: new <?php echo $dailyGraph[0]['label']; ?>
Expand Down