Show More
@@ -330,9 +330,9 b' E.onDOMReady(function(e){' | |||
|
330 | 330 | } |
|
331 | 331 | |
|
332 | 332 | /** |
|
333 |
* This function will detect if selected period has some changesets |
|
|
334 | if it does this data is then pushed for displaying | |
|
335 | Additionally it will only display users that are selected by the checkbox | |
|
333 | * This function will detect if selected period has some changesets | |
|
334 | for this user if it does this data is then pushed for displaying | |
|
335 | Additionally it will only display users that are selected by the checkbox | |
|
336 | 336 | */ |
|
337 | 337 | function getDataAccordingToRanges(ranges) { |
|
338 | 338 | |
@@ -340,31 +340,28 b' E.onDOMReady(function(e){' | |||
|
340 | 340 | var keys = []; |
|
341 | 341 | for(var key in dataset){ |
|
342 | 342 | var push = false; |
|
343 | ||
|
343 | 344 | //method1 slow !! |
|
344 |
// |
|
|
345 | //* | |
|
345 | 346 | for(var ds in dataset[key].data){ |
|
346 | 347 | commit_data = dataset[key].data[ds]; |
|
347 | //console.log(key); | |
|
348 | //console.log(new Date(commit_data.time*1000)); | |
|
349 | //console.log(new Date(ranges.xaxis.from*1000)); | |
|
350 | //console.log(new Date(ranges.xaxis.to*1000)); | |
|
351 | 348 | if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){ |
|
352 | 349 | push = true; |
|
353 | 350 | break; |
|
354 | 351 | } |
|
355 | 352 | } |
|
356 |
|
|
|
353 | //*/ | |
|
354 | ||
|
357 | 355 | /*//method2 sorted commit data !!! |
|
356 | ||
|
358 | 357 | var first_commit = dataset[key].data[0].time; |
|
359 | 358 | var last_commit = dataset[key].data[dataset[key].data.length-1].time; |
|
360 | 359 | |
|
361 | console.log(first_commit); | |
|
362 | console.log(last_commit); | |
|
363 | ||
|
364 | 360 | if (first_commit >= ranges.xaxis.from && last_commit <= ranges.xaxis.to){ |
|
365 | 361 | push = true; |
|
366 | 362 | } |
|
367 | */ | |
|
363 | //*/ | |
|
364 | ||
|
368 | 365 | if(push){ |
|
369 | 366 | data.push(dataset[key]); |
|
370 | 367 | } |
@@ -405,14 +402,14 b' E.onDOMReady(function(e){' | |||
|
405 | 402 | new_data.push(getDummyData(checkbox_key)); |
|
406 | 403 | } |
|
407 | 404 | } |
|
408 |
|
|
|
405 | ||
|
409 | 406 | var new_options = YAHOO.lang.merge(plot_options, { |
|
410 | 407 | xaxis: { |
|
411 | 408 | min: cur_ranges.xaxis.from, |
|
412 | 409 | max: cur_ranges.xaxis.to, |
|
413 | 410 | mode:"time", |
|
414 | 411 | timeformat: "%d/%m", |
|
415 | } | |
|
412 | }, | |
|
416 | 413 | }); |
|
417 | 414 | if (!new_data){ |
|
418 | 415 | new_data = [[0,1]]; |
@@ -440,13 +437,20 b' E.onDOMReady(function(e){' | |||
|
440 | 437 | data = getDataAccordingToRanges(ranges); |
|
441 | 438 | generateCheckboxes(data); |
|
442 | 439 | |
|
440 | ||
|
441 | console.log(data); | |
|
443 | 442 | var new_options = YAHOO.lang.merge(plot_options, { |
|
444 | 443 | xaxis: { |
|
445 | 444 | min: ranges.xaxis.from, |
|
446 | 445 | max: ranges.xaxis.to, |
|
447 | 446 | mode:"time", |
|
448 | 447 | timeformat: "%d/%m", |
|
449 | } | |
|
448 | }, | |
|
449 | yaxis: { | |
|
450 | min: ranges.yaxis.from, | |
|
451 | max: ranges.yaxis.to, | |
|
452 | }, | |
|
453 | ||
|
450 | 454 | }); |
|
451 | 455 | // do the zooming |
|
452 | 456 | plot = YAHOO.widget.Flot(plotContainer, data, new_options); |
General Comments 0
You need to be logged in to leave comments.
Login now