pyrevit.coreutils.charts

Charts engine for output window

class pyrevit.coreutils.charts.PyRevitOutputChart(output, chart_type='line', version=None)

Bases: object

Chart wrapper object for output window.

output

output window wrapper object

Type:pyrevit.output.PyRevitOutputWindow
chart_type

chart type name

Type:str
draw()

Request chart to draw itself on output window.

randomize_colors()

Randomize chart datasets colors.

set_height(height)

Set chart height on output window.

set_style(html_style)

Set chart styling.

Parameters:html_style (str) – inline html css styling string

Example

>>> chart.set_style('height:150px')
set_width(width)

Set chart width on output window.

class pyrevit.coreutils.charts.PyRevitOutputChartData

Bases: object

Chart data wrapper object.

new_dataset(dataset_label)

Create new data set.

Parameters:dataset_label (str) – dataset label
Returns:dataset wrapper object
Return type:PyRevitOutputChartDataset

Example

>>> chart.data.new_dataset('set_a')
class pyrevit.coreutils.charts.PyRevitOutputChartDataset(label)

Bases: object

Chart dataset wrapper object.

set_color(*args)

Set dataset color.

Arguments are expected to be R, G, B, A values.

Example

>>> dataset_obj.set_color(0xFF, 0x8C, 0x8D, 0.8)
class pyrevit.coreutils.charts.PyRevitOutputChartOptions

Bases: object

Chart options wrapper object.