---
id: object/codeunit/1315
type: object
title: Codeunit 1315 "Chart Management"
summary: Codeunit 1315 "Chart Management" in Base Application (System.Visualization). 19 public procedures, 8 events, 1 event subscribers. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 6cd8add0ed9f9cc0633af636cc502c53ea9b6c2909ff009c581ffdf60b1ab45f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/GenericChart/ChartManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/System/GenericChart/ChartManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 1315
name: Chart Management
namespace: System.Visualization
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 32
  events: 8
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 7
  called_by: 9
  implements: 0
---

# Codeunit 1315 "Chart Management"

> Codeunit 1315 "Chart Management" in Base Application (System.Visualization). 19 public procedures, 8 events, 1 event subscribers. Present since at least BC23, still in BC30.

Base Application · System.Visualization · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/GenericChart/ChartManagement.Codeunit.al) · facts from BC29

## Events published

- `OnAfterPopulateChartDefinitionTable()` (integration)
- `OnBeforeChartDescription(ChartDefinition: Record "Chart Definition"; var ChartDescription: Text; var IsHandled: Boolean)` (integration)
- `OnBeforeDataPointClicked(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; var IsHandled: Boolean)` (integration)
- `OnBeforeSetPeriodLength(ChartDefinition: Record "Chart Definition"; PeriodLength: Option; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateChart(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; Period: Option; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateNextPrevious(var ChartDefinition: Record "Chart Definition"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateStatusText(ChartDefinition: Record "Chart Definition"; BusinessChartBuffer: Record "Business Chart Buffer"; var StatusText: Text; var IsHandled: Boolean)` (integration)
- `OnUpdateChartSafe(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; Period: Option)` (integration)
  - subscribers: [Codeunit 1315 "Chart Management"](../codeunit/1315.md) HandleUpdateChartSafe

## Event subscriptions

- HandleUpdateChartSafe subscribes to Codeunit "Chart Management" OnUpdateChartSafe

## Procedures

- `AddinReady(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer")`
- `ChartDescription(ChartDefinition: Record "Chart Definition"): Text`
- `CashFlowChartName(): Text[30]`
- `CashCycleChartName(): Text[30]`
- `IncomeAndExpenseChartName(): Text[30]`
- `DataPointClicked(var BusinessChartBuffer: Record "Business Chart Buffer"; var ChartDefinition: Record "Chart Definition")`
- `PopulateChartDefinitionTable()`
- `SelectChart(var BusinessChartBuffer: Record "Business Chart Buffer"; var ChartDefinition: Record "Chart Definition")`
- `SetDefaultPeriodLength(ChartDefinition: Record "Chart Definition"; var BusChartBuf: Record "Business Chart Buffer")`
- `SetPeriodLength(ChartDefinition: Record "Chart Definition"; var BusChartBuf: Record "Business Chart Buffer"; PeriodLength: Option; IsInitState: Boolean)`
- `UpdateChartSafe(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; Period: Option; var ErrorMessage: Text): Boolean`
- `UpdateChart(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; Period: Option)`
- `UpdateNextPrevious(var ChartDefinition: Record "Chart Definition"): Boolean`
- `UpdateStatusText(var ChartDefinition: Record "Chart Definition"; var BusinessChartBuffer: Record "Business Chart Buffer"; var StatusText: Text)`
- `EnableChart(var ChartDefinition: Record "Chart Definition")`
- `AgedAccReceivableName(): Text[60]`
- `AgedAccPayableName(): Text[60]`
- `ScheduleTopCustomerListRefreshTask()`
- `TopCustomerListUpdatedRecently(var LastCustomerLedgerEntryNo: Integer): Boolean`

Plus 4 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 763 "Aged Acc. Receivable"](../codeunit/763.md) (4 calls: `ChartDescription → Description`, `DataPointClicked → DrillDownByGroup`, `UpdateChart → SaveSettings`, …)
- [Codeunit 764 "Aged Acc. Payable"](../codeunit/764.md) (4 calls: `ChartDescription → Description`, `DataPointClicked → DrillDownByGroup`, `UpdateChart → SaveSettings`, …)
- [Codeunit 762 "Acc. Sched. Chart Management"](../codeunit/762.md) (3 calls: `DataPointClicked → DrillDown`, `UpdateChart → GetSetupRecordset`, `UpdateChart → UpdateData`)
- [Codeunit 1316 "Top Ten Customers Chart Mgt."](../codeunit/1316.md) (2 calls: `DataPointClicked → DrillDown`, `UpdateChart → UpdateChart`)
- [Codeunit 1317 "Aged Inventory Chart Mgt."](../codeunit/1317.md) (2 calls: `DataPointClicked → DrillDown`, `UpdateChart → UpdateChart`)
- [Codeunit 1326 "Top Five Customers Chart Mgt."](../codeunit/1326.md) (2 calls: `DataPointClicked → DrillDown`, `UpdateChart → UpdateChart`)
- [Query 1319 "Sales by Cust. Grp. Chart Mgt."](../query/1319.md) (2 calls: `DataPointClicked → (object)`, `UpdateChart → (object)`)

## Called by

- [Page 1392 "Help And Chart Wrapper"](../page/1392.md) (7 calls: `InitializeSelectedChart → SetDefaultPeriodLength`, `InitializeSelectedChart → UpdateChartSafe`, `InitializeSelectedChart → UpdateNextPrevious`, …)
- [Codeunit 1316 "Top Ten Customers Chart Mgt."](../codeunit/1316.md) (1 call: `CalcTopTenSalesCustomers → ScheduleTopCustomerListRefreshTask`)
- [Codeunit 1326 "Top Five Customers Chart Mgt."](../codeunit/1326.md) (1 call: `CalcTopSalesCustomers → ScheduleTopCustomerListRefreshTask`)
- [Codeunit 1328 "Top Customers By Sales Job"](../codeunit/1328.md) (1 call: `UpdateCustomerTopList → TopCustomerListUpdatedRecently`)
- [Codeunit 5427 "Create Chart Definition"](../codeunit/5427.md) (1 call: `OnRun → PopulateChartDefinitionTable`)
- [Codeunit 6306 "PBI Aged Acc. Calc"](../codeunit/6306.md) (1 call: `SetPeriodAndUpdateChart → SetPeriodLength`)
- [Codeunit 6307 "PBI Aged Inventory Calc."](../codeunit/6307.md) (1 call: `GetValues → SetPeriodLength`)
- [Page 6307 "PBI Aged Acc. Payable"](../page/6307.md) (1 call: `OnOpenPage → AgedAccPayableName`)
- [Page 6308 "PBI Aged Acc. Receivable"](../page/6308.md) (1 call: `OnOpenPage → AgedAccReceivableName`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Chart Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
