Skip to main content

ApiChart

Class representing a chart.

ApiChart is a subclass of ApiDrawing.

Methods​

The following table lists the available methods.

MethodReturnsDescription
AddSeriaNoneAdds a new series to the current chart.
ApplyChartStylebooleanSets a style to the current chart by style ID.
CopyApiChartCreates a copy of the current chart.
DeletebooleanDeletes the specified drawing object.
FillbooleanSets the fill formatting properties to the current graphic object.
GetAllSeriesApiChartSeries[]Returns all series from the chart space.
GetChartTypeChartTypeLegacyReturns a type of the chart object.
GetClassType"chart"Returns a type of the ApiChart class.
GetDescriptionstring | nullGets the description of the current drawing.
GetFillApiFill | nullGets the fill formatting properties from the current graphic object.
GetFlipHboolean | nullGet horizontal flip of current drawing.
GetFlipVboolean | nullGet vertical flip of current drawing.
GetHeightEMUReturns the height of the current drawing.
GetInternalIdstringReturns an internal ID of the current drawing object.
GetLineApiStroke | nullGets the outline properties from the current graphic object.
GetLockAspectbooleanReturns whether the aspect ratio of the drawing is locked.
GetLockValuebooleanReturns the lock value for the specified lock type of the current drawing.
GetNamestringReturns the name of the current drawing.
GetParentSheetApiWorksheet | null | undefinedReturns the parent sheet of the current drawing.
GetPosXEMUReturns the x position of the current drawing on the worksheet.
GetPosYEMUReturns the y position of the current drawing on the worksheet.
GetPositionDrawingCellAnchor | nullReturns the cell anchor of the current drawing; the offsets are limited by the anchor cell.
GetRotationnumberReturns the rotation angle of the current drawing object.
GetSeriesApiChartSeries | null | undefinedReturns the series with a specific index.
GetShadowApiShadow | nullReturns the shadow of the current graphic object.
GetTextRangeApiTextRange | nullReturns a text range that covers the whole text of the current drawing. Creates a text body if the drawing does not yet have one.
GetTitlestring | nullReturns the chart title text.
GetTypeChartTypeReturns a type of the chart object using the chart type names from the {@link ChartType} enumeration.
GetWidthEMUReturns the width of the current drawing.
HasTextContentbooleanChecks whether the current drawing has a text body.
RemoveSeriabooleanRemoves the specified series from the current chart.
SelectNoneSelects the current graphic object.
SetAxisNumFormatbooleanSets the specified numeric format to the axis values.
SetCatFormulaNoneSets a range with the category values to the current chart.
SetDataLabelsTextPrbooleanSets the text properties to the chart data labels.
SetDataPointFillbooleanSets the fill to the data point in the specified chart series.
SetDataPointOutLinebooleanSets the outline to the data point in the specified chart series.
SetDescriptionbooleanSets the description of the current drawing.
SetFillbooleanSets the fill formatting properties to the current graphic object.
SetFlipHbooleanSets the horizontal flip of the current drawing.
SetFlipVbooleanSets the vertical flip of the current drawing.
SetHorAxisLabelsFontSizebooleanSpecifies font size for labels of the horizontal axis.
SetHorAxisMajorTickMarkbooleanSpecifies major tick mark for the horizontal axis.
SetHorAxisMinorTickMarkbooleanSpecifies minor tick mark for the horizontal axis.
SetHorAxisOrientationbooleanSpecifies the horizontal axis orientation.
SetHorAxisTickLabelPositionbooleanSpicifies tick labels position for the horizontal axis.
SetHorAxisTitlebooleanSpecifies the chart horizontal axis title.
SetLegendFillbooleanSets the fill to the chart legend.
SetLegendFontSizebooleanSpecifies the legend font size.
SetLegendOutLinebooleanSets the outline to the chart legend.
SetLegendPosbooleanSpecifies the chart legend position.
SetLinebooleanSets the outline properties to the current graphic object.
SetLockAspectbooleanSets whether the aspect ratio of the drawing is locked.
SetLockValuebooleanSets the lock value to the specified lock type of the current drawing.
SetMajorHorizontalGridlinesbooleanSpecifies major horizontal gridline visual properties.
SetMajorVerticalGridlinesbooleanSpecifies major vertical gridline visual properties.
SetMarkerFillbooleanSets the fill to the marker in the specified chart series.
SetMarkerOutLinebooleanSets the outline to the marker in the specified chart series.
SetMinorHorizontalGridlinesbooleanSpecifies minor horizontal gridline visual properties.
SetMinorVerticalGridlinesbooleanSpecifies minor vertical gridline visual properties.
SetNamebooleanSets the name of the current drawing.
SetOutLinebooleanSets the outline properties to the specified graphic object.
SetPlotAreaFillbooleanSets the fill to the chart plot area.
SetPlotAreaOutLinebooleanSets the outline to the chart plot area.
SetPointDataLabelTextPrbooleanSets the text properties to the chart point data label.
SetPositionNoneChanges the position for the drawing object.
SetRotationbooleanSets the rotation angle to the current drawing object.
SetSeriaNamebooleanSets a name to the specified series.
SetSeriaValuesbooleanSets values from the specified range to the specified series.
SetSeriaXValuesbooleanSets the x-axis values from the specified range to the specified series.
SetSeriesFillbooleanSets the fill to the specified chart series.
SetSeriesOutLinebooleanSets the outline to the specified chart series.
SetShadowbooleanSets the shadow to the current graphic object.
SetShowDataLabelsbooleanSpecifies which chart data labels are shown for the chart.
SetShowDataTablebooleanSpecifies whether the data table is displayed below the chart, optionally with the legend keys.
SetShowPointDataLabelbooleanSpicifies the show options for data labels.
SetSizeNoneSets a size of the object (image, shape, chart) bounding box.
SetTitlebooleanSpecifies the chart title.
SetTitleFillbooleanSets the fill to the chart title.
SetTitleOutLinebooleanSets the outline to the chart title.
SetVerAxisOrientationbooleanSpecifies the vertical axis orientation.
SetVerAxisTitlebooleanSpecifies the chart vertical axis title.
SetVertAxisLabelsFontSizebooleanSpecifies font size for labels of the vertical axis.
SetVertAxisMajorTickMarkbooleanSpecifies major tick mark for the vertical axis.
SetVertAxisMinorTickMarkbooleanSpecifies minor tick mark for the vertical axis.
SetVertAxisTickLabelPositionbooleanSpicifies tick labels position for the vertical axis.
UnselectbooleanRemoves the current drawing from the selection.