charteditor

class camelot.view.controls.editors.charteditor.ChartEditor(parent=None, width=50, height=40, dpi=50, field_name='chart', **kwargs)[source]

Editor to display and manipulate matplotlib charts. The editor itself is generic for all kinds of plots, it simply provides the data to be ploted with a set of axes. The data itself should know how exactly to plot itself.

copy_to_clipboard()[source]

Copy the chart to the clipboard

eventFilter(object, event)[source]

intercept mouse clicks on a chart to show the chart fullscreen

on_draw()[source]

draw the matplotlib figure on the canvas

print_preview()[source]

Popup a print preview dialog for the Chart

set_field_attributes(*args, **kwargs)[source]

Overwrite set_field attributes because a ChartEditor cannot be disabled or have its background color changed

set_value(value)[source]

Accepts a camelot.container.chartcontainer.FigureContainer or a camelot.container.chartcontainer.AxesContainer

show_fullscreen()[source]

Show the plot full screen, using the litebox

static show_fullscreen_chart(chart, parent)[source]
Parameters:chart – a chart container
Returns:the widget showing the chart, by default a LiteBoxView