Chart#

class ansys.mechanical.stubs.v261.Ansys.Mechanical.DataModel.Utilities.Charts.Chart#

Bases: object

Chart is an object utilized by the Line Chart object to display charts and customize them with the flexibility to allow modification to the data of the chart to a certain extent.

Overview#

AddDataset

Adds a dataset to a chart, provided the data is valid.

Equals

Equals method.

GetDisplayOptionsForDataset

Returns a reference to the dataset display options for a specific dataset.

GetHashCode

GetHashCode method.

GetLabelCollectionForDataset

Returns a reference to the label collection for a specific dataset.

GetType

GetType method.

RemoveDataset

Removes a dataset from the chart.

ToString

ToString method.

ChartDisplayOptions

Returns a reference to the display options of a chart.

Datasets

Retrieves all datasets of a chart.

InternalObject

InternalObject property.

NormalizeYAxis

Allows a normalized display of y-axis values, usually for cases where the axis has mixed quantities.

XAxisDisplayOptions

Returns a reference to the x-axis display options of a chart.

YAxisDisplayOptions

Returns a reference to the y-axis display options of a chart.

Property detail#

property Chart.ChartDisplayOptions: Ansys.Mechanical.DataModel.Utilities.Charts.ChartDisplayOptions | None#

Returns a reference to the display options of a chart.

property Chart.Datasets: List[Ansys.Mechanical.DataModel.Utilities.Dataset.Dataset2D] | None#

Retrieves all datasets of a chart.

property Chart.InternalObject: Ansys.Common.Interop.DSUtils.IDSCharts | None#

InternalObject property.

property Chart.NormalizeYAxis: bool | None#

Allows a normalized display of y-axis values, usually for cases where the axis has mixed quantities. An InvalidOperationException will be thrown if attempting to set to False, when the Y axis datasets have incompatible Quantity types and the UseAutomaticLimits property is also set to False.

property Chart.XAxisDisplayOptions: Ansys.Mechanical.DataModel.Utilities.Charts.AxisDisplayOptions | None#

Returns a reference to the x-axis display options of a chart.

property Chart.YAxisDisplayOptions: Ansys.Mechanical.DataModel.Utilities.Charts.AxisDisplayOptions | None#

Returns a reference to the y-axis display options of a chart.

Method detail#

Chart.AddDataset(dataset: Ansys.Mechanical.DataModel.Utilities.Dataset.Dataset2D, name: str) None#
Adds a dataset to a chart, provided the data is valid.
Adding a name for the dataset is optional, the default name for the nth dataset added is “Series n”.
An InvalidOperationException is thrown if the dataset is either invalid, already added to the chart,
or contains non-positive values when the chart has IsLogarithmic enabled.
Chart.Equals(obj: Any) bool#

Equals method.

Chart.GetDisplayOptionsForDataset(dataset: Ansys.Mechanical.DataModel.Utilities.Dataset.Dataset2D) Ansys.Mechanical.DataModel.Utilities.Charts.Dataset2DDisplayOptions#

Returns a reference to the dataset display options for a specific dataset.

Chart.GetHashCode() int#

GetHashCode method.

Chart.GetLabelCollectionForDataset(dataset: Ansys.Mechanical.DataModel.Utilities.Dataset.Dataset2D) Ansys.Mechanical.DataModel.Utilities.Charts.LabelCollection#

Returns a reference to the label collection for a specific dataset.

Chart.GetType() type#

GetType method.

Chart.RemoveDataset(dataset: Ansys.Mechanical.DataModel.Utilities.Dataset.Dataset2D) None#

Removes a dataset from the chart.

Chart.ToString() str#

ToString method.