DatatypeDictionary

DatatypeDictionary

Class graphomate.ui.DatatypeDictionary


extends sap.ui.core.Element

 

Quick Start

The datatype dictionary is an element that stores graphomate.ui.Datatypes which define the appearance of diagram elements. The dictionary provides these datatypes to all graphomate diagrams which are sharing the same window object. Therefor only one instance of the DatatypeDictionary is needed. After intantiation the DatatypeDictionary has created four default datatypes in its aggregation "datatypes".

Default Datatypes of graphomate.ui.DatatypeDictionary:

name

semantic

color

shape

thickness

fillType

barWidth

pinWidth

fontWeight

name

semantic

color

shape

thickness

fillType

barWidth

pinWidth

fontWeight

AC

Actual

#222222

rect

1

filled

0.4

0.25

normal

PP

Planned

#808080

rhomb

1

filled

0.4

0.25

normal

BU

Budget

#000000

circle

1

empty

0.4

0.25

normal

FC

Forecast

#000000

rhomb

1

hatchedUp

0.4

0.25

normal

 

Usage Example
var datatypeDictionary = new graphomate.ui.DatatypeDictionary(); var chart = new graphomate.ui.charts.Chart({ chartType: graphomate.ui.charts.enums.ChartType.Bar, series1: [10, 12, 14, 12], datatypes1: ["AC","PP","BU","FC"] });

 

 

 

 

 

 

 

 

 

 

Constructor Details

new graphomate.ui.DatatypeDictionary(id?:string, settings?:object)

Accepts an id and a settings object or one or none of them. The settings object defines aggregation values. A datatype can also be added by using the related aggregation methods. The supported settings are:

Aggregations:

 

 

 

Aggregation Details

Items of an aggregation named "sampleThings" that has a cardinality of 0...n (and a multiplicity of 1:n) can be accessed by using one of the following methods:

  • indexOfSampeThing(object) - Searches for the provided object in the aggregation and returns its 0-based index if found, or -1 otherwise.

  • getSampleThings() - Returns an array with the objects contained in the aggregation or an empty array.

  • addSampleThing(object) - Adds the provided object as last element in the aggregation. Returns this for method chaining.

  • insertSampleThing(object, index) - Inserts the provided object into the aggregation at position i. Returns this for method chaining.

  • removeSampleThing(object) - Removes the provided object from the aggregation. Returns the removed object.

  • removeAllSampleThings() - Removes all objects from the aggregation. Returns an array of all removed objects.

  • destroySampleThings() - Destroys all currently aggregated objects and clears the aggregation. Returns this for method chaining.

 

The following aggregations are available:

Aggregation Name

Aggregated Object Type

Cardinality

Description

Aggregation Name

Aggregated Object Type

Cardinality

Description

datatypes

graphomate.ui.Datatype

0...n

The aggregated datatypes will be provided to every graphomate diagram in the same Document Object Model (they have to share the same window object). The datatypes can be referred to by using their names in the related property value of a graphomate diagram.