---
schema_version: "1"
id: 08a8b4aec7646b0c9ac073e2d2a33df8f2de646bb097f5f4bee8e20091b278bd
title: ReportChartComponentLayoutItem Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: dac070ca94d36fcdb49e096c1e0fd75f527240e30838e40ad021fe561bf88ffa
description: Represents the settings for a report chart on a standard or custom page.Indicates whether to use cached data when displaying the chart. When the attribute is set to true, data is cached for 24 hours. When the attribute is set to false, the report is run every time the page is refreshed.Unique development name of the field by which a report chart is filtered to return data relevant to the page. If set, the ID field for the parent object of the page or report type is the chart data filter. The parent object for the report type and the page must match for a chart to return relevant data.Error string that is populated only when an error occurs in the underlying report.Controls whether users see a chart that has an error. When an error occurs and this attribute is not set, the chart doesn’t show any data except the error. Set the attribute to true to hide the chart from a page on error.If true, filters the report chart to return data that’s relevant to the page.Unique development name of a report that includes a chart.If true, applies the title from the report to the chart.Size of the displayed chart. The default is medium.Makes a duplicate copy of the Metadata.ReportChartComponentLayoutItem.
---
# ReportChartComponentLayoutItem Class

Represents the settings for a report chart on a standard or custom page.

## Namespace

[Metadata](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Metadata.htm "The Metadata namespace provides classes and methods for working with custom metadata in Salesforce")

## Usage

Use this class when accessing [Metadata.Layout](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_Layout.htm#apex_class_Metadata_Layout "Represents the metadata associated with a page layout.") metadata components. For more information, see “ReportChartComponentLayoutItem” in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_intro.htm).

- **[ReportChartComponentLayoutItem Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_properties)**
- **[ReportChartComponentLayoutItem Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_methods)**

## ReportChartComponentLayoutItem Properties

The following are properties for ReportChartComponentLayoutItem.

- **[cacheData](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_cacheData)**  
    Indicates whether to use cached data when displaying the chart. When the attribute is set to true, data is cached for 24 hours. When the attribute is set to false, the report is run every time the page is refreshed.
- **[contextFilterableField](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_contextFilterableField)**  
    Unique development name of the field by which a report chart is filtered to return data relevant to the page. If set, the ID field for the parent object of the page or report type is the chart data filter. The parent object for the report type and the page must match for a chart to return relevant data.
- **[error](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_error)**  
    Error string that is populated only when an error occurs in the underlying report.
- **[hideOnError](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_hideOnError)**  
    Controls whether users see a chart that has an error. When an error occurs and this attribute is not set, the chart doesn’t show any data except the error. Set the attribute to true to hide the chart from a page on error.
- **[includeContext](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_includeContext)**  
    If true, filters the report chart to return data that’s relevant to the page.
- **[reportName](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_reportName)**  
    Unique development name of a report that includes a chart.
- **[showTitle](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_showTitle)**  
    If true, applies the title from the report to the chart.
- **[size](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_size)**  
    Size of the displayed chart. The default is medium.

### cacheData

Indicates whether to use cached data when displaying the chart. When the attribute is set to true, data is cached for 24 hours. When the attribute is set to false, the report is run every time the page is refreshed.

#### Signature

public Boolean cacheData {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### contextFilterableField

Unique development name of the field by which a report chart is filtered to return data relevant to the page. If set, the ID field for the parent object of the page or report type is the chart data filter. The parent object for the report type and the page must match for a chart to return relevant data.

#### Signature

public String contextFilterableField {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### error

Error string that is populated only when an error occurs in the underlying report.

#### Signature

public String error {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### hideOnError

Controls whether users see a chart that has an error. When an error occurs and this attribute is not set, the chart doesn’t show any data except the error. Set the attribute to true to hide the chart from a page on error.

#### Signature

public Boolean hideOnError {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### includeContext

If true, filters the report chart to return data that’s relevant to the page.

#### Signature

public Boolean includeContext {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### reportName

Unique development name of a report that includes a chart.

#### Signature

public String reportName {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### showTitle

If true, applies the title from the report to the chart.

#### Signature

public Boolean showTitle {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### size

Size of the displayed chart. The default is medium.

#### Signature

public Metadata.ReportChartComponentSize size {get; set;}

#### Property Value

Type: [Metadata.ReportChartComponentSize](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_Metadata_ReportChartComponentSize.htm#apex_enum_Metadata_ReportChartComponentSize "Describes the size of the displayed report chart component.")

## ReportChartComponentLayoutItem Methods

The following are methods for ReportChartComponentLayoutItem.

- **[clone()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Metadata_ReportChartComponentLayoutItem.htm#apex_Metadata_ReportChartComponentLayoutItem_clone)**  
    Makes a duplicate copy of the Metadata.ReportChartComponentLayoutItem.

### clone()

Makes a duplicate copy of the Metadata.ReportChartComponentLayoutItem.

#### Signature

public Object clone()

#### Return Value

Type: Object