Chart
Overview
Chart is a class in Aspose.Cells for Python.
Represents a chart in a worksheet.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
type | `` | Read | Gets or sets the chart’s type (e.g., line, bar, pie) |
title | `` | Read/Write | Gets or sets the chart’s title text |
category_data | `` | Read/Write | Gets or sets the category (X‑axis) data range for the chart |
show_legend | `` | Read/Write | Indicates whether the chart legend is displayed |
legend_position | `` | Read/Write | Gets or sets the position of the chart legend |
smooth | `` | Read/Write | Indicates whether line series are rendered with smoothing |
n_series | `` | Read | Returns the number of data series in the chart |
NSeries | `` | Read | Provides access to the collection of series objects in the chart |
grouping | `` | Read/Write | Gets or sets the grouping mode for bar or column charts |
bar_direction | `` | Read/Write | Gets or sets the orientation (horizontal/vertical) of bar charts |
gap_width | `` | Read/Write | Gets or sets the gap width between data points in the chart |
overlap | `` | Read/Write | Gets or sets the overlap amount between series in the chart |
vary_colors | `` | Read/Write | Indicates whether each data point uses a different color |
first_slice_angle | `` | Read/Write | Gets or sets the starting angle for the first slice of a pie chart |
is_of_pie | `` | Read/Write | Indicates whether the chart is an ‘of pie’ secondary chart |
of_pie_type | `` | Read/Write | Gets or sets the type of the secondary ‘of pie’ chart |
second_pie_size | `` | Read/Write | Gets or sets the size ratio of the secondary pie chart |
quartile_method | `` | Read/Write | Gets or sets the method used to calculate quartiles in box plots |
box_show_mean_line | `` | Read/Write | Indicates if a mean line is displayed in a box plot |
box_show_mean_marker | `` | Read/Write | |
box_show_inner_points | `` | Read/Write | Indicates if inner points are shown in a box plot |
box_show_outlier_points | `` | Read/Write | |
box_gap_width | `` | Read/Write | Gets or sets the gap width between box plot elements |
is_3d | `` | Read/Write | Indicates whether the chart is rendered in three dimensions |
gap_depth | `` | Read/Write | Gets or sets the depth gap between elements of a 3D chart |
view_3d | `` | Read | Gets or sets the 3D view settings of the chart |
View3D | `` | Read | Provides access to the chart’s 3D view configuration object |
show_connector_lines | `` | Read/Write | Indicates whether connector lines are displayed for data points |
has_subtotals | `` | Read/Write | Indicates if the chart includes subtotal groups |
sub_charts | `` | Read | Provides 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
| Signature | Description |
|---|---|
__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 |