Fixed today vertical line by setting time to 0:00.

This commit is contained in:
Alexis Lahouze 2013-01-13 09:50:15 +01:00
parent e712c9fb6a
commit 7e8fd0a410
1 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,4 @@
// Entry object
function entry(data){
this.id=ko.observable(ko.utils.unwrapObservable(data.id));
this.value_date=ko.observable(ko.utils.unwrapObservable(data.value_date));
@ -383,6 +384,10 @@ drawChart = function(entries, element) {
chartValues[0] = entries;
var today = new Date();
today.setHours(0);
today.setMinutes(0);
// plot chart
window.chart = $.jqplot(element.id, chartValues, {
title: "Évolution du solde",
@ -419,7 +424,7 @@ drawChart = function(entries, element) {
}},
{ dashedVerticalLine: {
name: "today",
x: new Date(),
x: today,
lineWidth: 1,
color: "gray",
shadow: false