pygal.graph.time module

XY time extensions: handle convertion of date, time, datetime, timedelta into float for xy plot and back to their type for display

class pygal.graph.time.DateLine(*args, **kwargs)[source]

Bases: pygal.graph.time.DateTimeLine

Date abscissa xy graph class

class pygal.graph.time.DateTimeLine(*args, **kwargs)[source]

Bases: pygal.graph.xy.XY

DateTime abscissa xy graph class

class pygal.graph.time.TimeDeltaLine(*args, **kwargs)[source]

Bases: pygal.graph.xy.XY

TimeDelta abscissa xy graph class

class pygal.graph.time.TimeLine(*args, **kwargs)[source]

Bases: pygal.graph.time.DateTimeLine

Time abscissa xy graph class

pygal.graph.time.date_to_datetime(x)[source]

Convert a date into a datetime

pygal.graph.time.datetime_to_time(x)[source]

Convert a datetime into a time

pygal.graph.time.datetime_to_timestamp(x)[source]

Convert a datetime into a utc float timestamp

pygal.graph.time.seconds_to_time(x)[source]

Convert a number of second into a time

pygal.graph.time.time_to_datetime(x)[source]

Convert a time into a datetime

pygal.graph.time.time_to_seconds(x)[source]

Convert a time in a seconds sum

pygal.graph.time.timedelta_to_seconds(x)[source]

Convert a timedelta into an amount of seconds