Skip to content

Spark

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/models/dashboard/dashboard-data-fields.ts (line 508)

Part of: Pams

Spark represents metadata for a dashboard data field, including its stored name, field name, caption, Measure type, and hidden state. Dashboard code reads and updates these values through the class getter and setter methods.

Methods

MethodSignatureReturns
isHiddenisHidden()boolean
setHiddensetHidden(flag: boolean)void
GetStoredNameGetStoredName()string
SetStoredNameSetStoredName(name: string)void
GetFieldNameGetFieldName()string
SetFieldNameSetFieldName(name: string)void
GetTypeGetType()Measure
SetTypeSetType(ty: Measure)void
GetCaptionGetCaption()string
SetCaptionSetCaption(input: string)void
SetDataTypeSetDataType(ty: DataTypeEnum)void
GetDataTypeGetDataType()DataTypeEnum
GetFieldNameAgruGetFieldNameAgru()string
SetFieldNameAgruSetFieldNameAgru(name: string)void
GetStoredNameAgruGetStoredNameAgru()string
SetStoredNameAgruSetStoredNameAgru(name: string)void
GetTypeAgruGetTypeAgru()DateGroupEnum
SetTypeAgruSetTypeAgru(dt: DateGroupEnum)void

Diagram

mermaid
graph LR
  Spark[Spark]
  Spark --> Hidden[isHidden / setHidden]
  Spark --> StoredName[GetStoredName / SetStoredName]
  Spark --> FieldName[GetFieldName / SetFieldName]
  Spark --> Type[GetType / SetType: Measure]
  Spark --> Caption[GetCaption / SetCaption]

Usage

ts
const spark = new Spark();

spark.SetStoredName("total_sales");
spark.SetFieldName("TotalSales");
spark.SetCaption("Total Sales");
spark.SetType(measure);

if (!spark.isHidden()) {
  console.log(spark.GetCaption());
}

spark.setHidden();

AI Coding Instructions

  • Use GetStoredName, GetFieldName, GetType, and GetCaption when reading dashboard field metadata.
  • Update field metadata through the matching Set... methods rather than changing internal properties directly.
  • Pass a Measure value to SetType().
  • Treat setHidden() as a state-changing call with no argument; check the result through isHidden().
  • Preserve the existing method casing, including setHidden() and the PascalCase getter and setter methods.

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)

  • DashboardWidgetOperationsServicePams/Web/Pams.Web/Client/app/services/dashboard/dashboard-widget-operations.service.ts:1

Was this page helpful?

Download as PDF