Kind: Class
Source: Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-data-fields.ts (line 441)
Part of: Pams
Chart represents chart-related field metadata for dashboard data. It stores field names, captions, comparison and storage identifiers, and a hidden state that controls whether the chart is displayed.
Methods
| Method | Signature | Returns |
|---|---|---|
isHidden | isHidden() | boolean |
setHidden | setHidden(flag: boolean) | void |
GetStoredName | GetStoredName() | string |
SetStoredName | SetStoredName(name: string) | void |
GetComparedFieldName | GetComparedFieldName() | string |
SetComparedFieldName | SetComparedFieldName(name: string) | void |
GetFieldName | GetFieldName() | string |
SetFieldName | SetFieldName(name: string) | void |
GetCaption | GetCaption() | string |
SetCaption | SetCaption(input: string) | void |
SetDataType | SetDataType(ty: DataTypeEnum) | void |
GetDataType | GetDataType() | DataTypeEnum |
GetFieldNameAgru | GetFieldNameAgru() | string |
SetFieldNameAgru | SetFieldNameAgru(name: string) | void |
GetStoredNameAgru | GetStoredNameAgru() | string |
SetStoredNameAgru | SetStoredNameAgru(name: string) | void |
GetTypeAgru | GetTypeAgru() | DateGroupEnum |
SetTypeAgru | SetTypeAgru(dt: DateGroupEnum) | void |
Where it refuses work
Chartstops the work with an early return whenthis.FieldName.
Diagram
mermaidgraph LR Dashboard[Dashboard data] --> Chart[Chart] Chart --> FieldName[Field name] Chart --> Caption[Caption] Chart --> StoredName[Stored name] Chart --> ComparedFieldName[Compared field name] Chart --> Hidden[Hidden state]
Usage
tsimport { Chart } from "./models/dashboard/dashboard-data-fields";
const chart = new Chart();
chart.SetFieldName("Revenue");
chart.SetCaption("Monthly revenue");
chart.SetStoredName("revenue_monthly");
chart.SetComparedFieldName("PreviousMonthRevenue");
chart.setHidden();
if (!chart.isHidden()) {
console.log(chart.GetCaption(), chart.GetFieldName());
}
AI Coding Instructions
- Use the
Get...andSet...methods when reading or updating chart metadata instead of accessing backing fields directly. - Check
isHidden()before rendering a chart in dashboard UI code. - Call
setHidden()only when the chart should no longer be displayed; confirm whether hidden state can be reset elsewhere. - Keep
FieldName,StoredName, andComparedFieldNamealigned with the corresponding dashboard data source fields.
Used by
1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (1)
DashboardWidgetOperationsService—Pams/Web/Pams.Web/Client/app/services/dashboard/dashboard-widget-operations.service.ts:1
Was this page helpful?