Chart

Overview

Chart is a class in Aspose.Cells for Python.

Represents a chart in a worksheet.

Properties

NameTypeAccessDescription
type``ReadGets or sets the chart’s type (e.g., line, bar, pie)
title``Read/WriteGets or sets the chart’s title text
category_data``Read/WriteGets or sets the category (X‑axis) data range for the chart
show_legend``Read/WriteIndicates whether the chart legend is displayed
legend_position``Read/WriteGets or sets the position of the chart legend
smooth``Read/WriteIndicates whether line series are rendered with smoothing
n_series``ReadReturns the number of data series in the chart
NSeries``ReadProvides access to the collection of series objects in the chart
grouping``Read/WriteGets or sets the grouping mode for bar or column charts
bar_direction``Read/WriteGets or sets the orientation (horizontal/vertical) of bar charts
gap_width``Read/WriteGets or sets the gap width between data points in the chart
overlap``Read/WriteGets or sets the overlap amount between series in the chart
vary_colors``Read/WriteIndicates whether each data point uses a different color
first_slice_angle``Read/WriteGets or sets the starting angle for the first slice of a pie chart
is_of_pie``Read/WriteIndicates whether the chart is an ‘of pie’ secondary chart
of_pie_type``Read/WriteGets or sets the type of the secondary ‘of pie’ chart
second_pie_size``Read/WriteGets or sets the size ratio of the secondary pie chart
quartile_method``Read/WriteGets or sets the method used to calculate quartiles in box plots
box_show_mean_line``Read/WriteIndicates if a mean line is displayed in a box plot
box_show_mean_marker``Read/Write
box_show_inner_points``Read/WriteIndicates if inner points are shown in a box plot
box_show_outlier_points``Read/Write
box_gap_width``Read/WriteGets or sets the gap width between box plot elements
is_3d``Read/WriteIndicates whether the chart is rendered in three dimensions
gap_depth``Read/WriteGets or sets the depth gap between elements of a 3D chart
view_3d``ReadGets or sets the 3D view settings of the chart
View3D``ReadProvides access to the chart’s 3D view configuration object
show_connector_lines``Read/WriteIndicates whether connector lines are displayed for data points
has_subtotals``Read/WriteIndicates if the chart includes subtotal groups
sub_charts``ReadProvides access to any sub‑charts contained within the chart
axes``Read
scatter_style``Read/Write
wireframe``Read/Write
radar_style``Read/Write
histogram_bin_count``Read/Write
histogram_bin_size``Read/Write
histogram_interval_closed``Read/Write
histogram_overflow``Read/Write
histogram_underflow``Read/Write
disp_blanks_as``Read/Write
stock_style``Read/Write

Methods

SignatureDescription
__init__(chart_type, upper_left_row, upper_left_column, lower_right_row, lower_right_column)
add_series(values, category_data, name, chart_type, x_values)Convenience method to add a series.
add_axis(axis_type, axis_id)Adds an axis to the chart and returns it.
copy()Creates and returns a duplicate of the chart