Datatype

Class graphomate.ui.Datatype


extends sap.ui.core.Element


Quick Start

Creates a datatype definition used to specify the appearance of diagram elements. Datatypes can be added directly to some diagram aggregations or to the aggregation "datatypes" of the graphomate.ui.DatatypeDictionary which provides them to any diagram on the page.

Usage Example
var datatypeDictionary = new graphomate.ui.DatatypeDictionary({
    datatypes: [
        new graphomate.ui.Datatype({
            name: "sample",
            color: "#FF0000",
            fillType: graphomate.ui.enums.FillType.HatchedUp
        })
    ]
});
var chart = new graphomate.ui.charts.Chart({
    chartType: graphomate.ui.charts.enums.ChartType.Bar,
    series1: [10, 12, 15],
    datatypes1: ["sample","sample","sample"]
});








Constructor Details

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

Accepts an id and a settings object or one or none of them. The settings object defines initial property values. Every setting can also be set using the related setter method. The supported settings are:

Properties:




Property Details

Each property "sampleProperty" can be set using the related setter "setSampleProperty". Each setter expects a valid value for the related property as input parameter and throws an exception for invalid values. It returns the "this context" for method chaining. Each property "sampleProperty" can also be gotten using the related getter method "getSampleProperty". It expects no input parameters and returns the current value of the related property. Each property that represents or partially contains indices excepts a 0 based index.

The following properties are available:


Property NameTypeDescription
namestringSets the name of the datatype that can be used to reference it in diagram properties.
colorgraphomate.ui.types.HexColorColor of the element the datatype gets applied to.
shapegraphomate.ui.enums.ShapeShape of special markers like pin heads or line chart dots.
thicknessgraphomate.ui.types.UnsignedIntegerBorder thickness of elements the datatype gets applied to.
fillTypegraphomate.ui.enums.FillTypeFill pattern of elements the datatype gets applied to.
barWidthgraphomate.ui.types.PositiveFloatWidth of a diagram's bars. If the value is greater than 1, it will be interpreted as px. Floating point numbers between 0 and 1 will be interpreted as relative values. The resulting width will then be a share of the category width.
pinWidthgraphomate.ui.types.PositiveFloatWidth of a diagram's pin lines. If the value is greater than 1, it will be interpreted as px. Floating point numbers between 0 and 1 will be interpreted as relative values. The resulting width will then be a share of the category width.
fontWeightgraphomate.ui.enums.FontWeightEmphasis of the labels of elements the datatype gets applied to.