Changeset 30:b8003f616519 in stamper for bin/stamps


Ignore:
Timestamp:
Aug 9, 2014, 2:59:49 AM (10 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Refactored the graphs/charts code:

  • Fixed a bug introduced when we added the date-based filtering
  • Moved the graph/chart code into a separate method, calling only that method when the user wants to generate a graph.
  • Integrated the code a bit better with the new details method.
  • The svg files are generated using the current date and time, adding a -latest.svg symlink so finding the latest one is easier.

Some examples:

  • generate a chart of all the times recorded for all customers:

stamps -g

  • generates a chart of all the times recorded for all customers for the past week:

stamps -g 1w

  • generates a chart of all the times for a given customer since the first day of 2014:

stamps -g customer 2014-01-01*

(see the filters code to learn more about them)

Still some work needed here though, and I've disabled the nice stacking
bars, which should be back with some form of chart types selector
(so users can set on runtime which type of chart they want)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bin/stamps

    r29 r30  
    3636    if args.timeline:
    3737        s.timeline()
     38    elif args.graph:
     39        s.graph_stamps(args.customer, args.filter)
    3840    else:
    39         s.show_stamps(args.customer, args.filter, args.verbose, args.sum,
    40                       args.graph)
     41        s.show_stamps(args.customer, args.filter, args.verbose, args.sum)
Note: See TracChangeset for help on using the changeset viewer.