def __init__(self, series_set, scale, style=None, vertical_scale=True, zero_base=True, smoothed=True, bottom_scale=False, no_bottom_labels=False, vertical_label="", peak_highlight=None, two_passes=False): """ Constructor; creates a new LineGraph. @param mseries: The data to plot, as a MultiSeries @type mseries: graphication.series.MultiSeries @param style: The Style to apply to this graph @type style: graphication.style.Style @param scale: The Scale to use for the graph. @type scale: graphication.scales.BaseScale @param smoothed: If the graph is smoothed (not straight lines) @type smoothed: bool """ self.series_set = series_set self.style = default_css.merge(style) self.scale = scale self.zero_base = zero_base self.vertical_scale = vertical_scale self.smoothed = smoothed self.no_bottom_labels = no_bottom_labels self.vertical_label = vertical_label self.peak_highlight = peak_highlight self.two_passes = two_passes self.first_pass = False self.calc_rel_points()
def __init__(self, series_set, scale, style=None, vertical_scale=None, zero_base=True, label_on=True, stacked=True, sharp_edges=True, top_only=False, border_only=False): """ Constructor; creates a new CurvyBarChart. """ self.series_set = series_set self.style = default_css.merge(style) self.scale = scale self.label_height = style['curvybarchart label'].get_float("height", 30) self.label_on = label_on self.zero_base = zero_base self.stacked = stacked self.sharp_edges = sharp_edges self.top_only = top_only self.border_only = border_only if vertical_scale is None: if stacked: y_min, y_max = self.stacked_value_range() else: y_min, y_max = self.series_set.value_range() if self.zero_base: y_min = 0 vertical_scale = VerticalWavegraphScale(y_min, y_max) self.y_scale = vertical_scale
def __init__(self, series_set, scale, style=None, vertical_scale=True, stacked=True, zero_base=True): """ Constructor; creates a new LineGraph. @param mseries: The data to plot, as a MultiSeries @type mseries: graphication.series.MultiSeries @param style: The Style to apply to this graph @type style: graphication.style.Style @param scale: The Scale to use for the graph. @type scale: graphication.scales.BaseScale @param smoothed: If the graph is smoothed (not straight lines) @type smoothed: bool """ self.series_set = series_set self.style = default_css.merge(style) self.scale = scale self.stacked = stacked self.zero_base = zero_base self.vertical_scale = vertical_scale # Initialise the vertical scale if stacked: y_min, y_max = self.stacked_value_range() else: y_min, y_max = self.series_set.value_range() if self.zero_base: y_min = 0 self.y_scale = VerticalWavegraphScale(y_min, y_max)
def __init__(self, series_set, scale, style=None, label_curves=True, vertical_scale=False, debug=False, textfix=False): """ Constructor; creates a new WaveGraph. @param mseries: The data to plot, as a MultiSeries @type mseries: graphication.series.MultiSeries @param style: The Style to apply to this graph @type style: graphication.style.Style @param scale: The Scale to use for the graph. @type scale: graphication.scales.BaseScale @param label_curves: If the curves should have labels written directly on top of them, fitted into their shape. Note: Takes a while to render. @type label_curves: bool @param vertical_axis: If a vertical scale should be drawn on the graph @type vertical_axis: bool """ self.series_set = series_set self.style = default_css.merge(style) self.scale = scale self.debug = debug self.label_curves = label_curves self.vertical_scale = vertical_scale self.textfix = textfix self.calc_rel_points()
def __init__(self, text, style=None): """ Constructor. @param text: The text of the label @type text: str @param style: The style to apply @type style: graphication.style.Style """ self.text = text self.style = default_css.merge(style)
def __init__(self, series_set, style=None): """ Constructor; creates a new WaveGraph. @param series_set: The data to plot, as a SeriesSet @type series_set: graphication.series.SeriesSet @param style: The Style to apply to this graph @type style: graphication.style.Style """ self.series_set = series_set self.style = default_css.merge(style)
def __init__(self, scale, style=None, hide_first=False): """ Constructor; creates a new Ticks. @param scale: The Scale to use for the graph. @type scale: graphication.scales.BaseScale @param style: The Style to apply to this graph @type style: graphication.style.Style """ self.style = default_css.merge(style) self.scale = scale self.hide_first = hide_first
def __init__(self, series_set, style=None, dashed_name=None): """ Constructor; creates a new Legend. @param series_set: The data to label, as a SeriesSet @type series_set: graphication.series.SeriesSet @param style: The Style to apply to this legend. @type style: graphication.style.Style """ self.series_set = series_set self.dashed_name = dashed_name self.style = default_css.merge(style)
def __init__(self, style=None, padding=0): self.style = default_css.merge(style) self.items = [] self.padding = padding
def __init__(self, style=None): self.style = default_css.merge(style)