Deviation

Class graphomate.ui.charts.Deviation


extends sap.ui.core.Element


Quick Start

Creates a deviation chart that can be used in the aggregation "deviations" of a graphomate.ui.charts.Chart. For each Deviation in that aggregation the graphomate chart renders an additional axis that displays the percentage or absolute deviations between two data series. 

Usage Example
var chart = new graphomate.ui.charts.Chart({
    chartType: graphomate.ui.charts.enums.ChartType.Bar,
    series1: [5, 16, 17, 20],
    series2: [-2, 12, 15, 19],
    deviations:[
    	new graphomate.ui.charts.Deviation({
			baseSeriesIndex: 1,
	        measureSeriesIndex: 0
		})
    ]
});






Constructor Details

new graphomate.ui.charts.Deviation(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
labelstringThis string will be used to label the deviation chart, if one of the following chart properties is enabled: "showAxisLabelsLeft", "showAxisLabelsRight", "showSeriesLabelsLeft", "showSeriesLabelsRight".
typegraphomate.ui.enums.DeviationTypeSpecifies whether the deviation chart should display an absolute or relative deviation.
baseSeriesIndexgraphomate.ui.types.UnsignedIntegerSets the index of the chart's data series that should be used as a base value for calculating the deviation. Use 0 for series1, 1 for series2 and so on. The base of the deviation is the value that gets subtracted from the measure to calculate the deviation value.
measureSeriesIndexgraphomate.ui.types.UnsignedIntegerSets the index of the chart's data series that should be used as a measure value for calculating the deviation. Use 0 for series1, 1 for series2 and so on. The measure of the deviation is the value from which the base gets subtracted to calculate the deviation value.