Options
All
  • Public
  • Public/Protected
  • All
Menu



Alignment Sheet

Alignment sheets are composed of a container, that contains bands. Bands in turn contain charts.

The data in the charts is meant to be linearly referenced to a range or station. A range is made up of a route, a start station and an end station.

The alignment sheets are laid out as follows:

alt text

Modules

The following module is configurable in GVH.

AlignmentSheetModule

This is the main module for Alignment Sheets in Inline.

ViewModel Configuration

The view model for the AlignmentSheet has the following configuration:

Property Description
appTitle The title that will be shown in the header bar of the alignment sheet window.
showDisabledActions true or false. Indicates if actions that are disabled in the alignment sheet, should be shown disabled (when true) or hidden (when false).

Index

Modules

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

valueFunction

valueFunction: function

A function that will be passed the data from a feature and will return a result of the specified type.

In a json template, the JavaScript function is represented by string that is converted to an actual function at runtime. It is important to remember to escape double-quotes in a json template.

For example, a string function might look like this: "return \"POI: \" + (Math.round(d[\"station\"]*100)/100)" As you can see in the example, the attribute station is retrieved from the d parameter.

Type declaration

    • (d: any): T
    • The provided function.

      Parameters

      • d: any

        The attributes of the feature. An object with the properties being the attribute names with associated values.

      Returns T

      A result of type T

valueFunctionWithContext

valueFunctionWithContext: function

A function that will be passed the data from a feature as well as a context and will return a result of the specified type.

In a json template, the JavaScript function is represented by string that is converted to an actual function at runtime. It is important to remember to escape double-quotes in a json template.

For example, a string function might look like this: "return context.toTitleCase(d[\"HCA_Type\"])" As you can see in the example, the attribute HCA_Type is retrieved from the d parameter and the toTitleCase is called on the context.

Type declaration

    • (d: any, context: Context): T
    • The provided function.

      Parameters

      • d: any

        The attributes of the feature. An object with the properties being the attribute names with associated values.

      • context: Context

        The context of the element calling this. FunctionContext

      Returns T

      A result of type T

Variables

EXTENSION_NAME

EXTENSION_NAME: "alignmentSheet" = "alignmentSheet"

Name of this extension.

bandNewTitle

bandNewTitle: "New Title" = "New Title"

customFunctions

customFunctions: any

Static variable that contains all the custom functions that are made available through Chart/Band context.

Functions

Export assignment JUnit

  • JUnit(config: any): void
  • Parameters

    • config: any

    Returns void

XmlNode

  • XmlNode(nodeName: any, attributes?: any): void
  • Simple XML generator.

    constructor

    Parameters

    • nodeName: any

      The node name.

    • Optional attributes: any

      Optional attributes.

    Returns void

addSuites

  • addSuites(suite: any, listOfSuites: any): void
  • Parameters

    • suite: any
    • listOfSuites: any

    Returns void

createSuiteNode

  • createSuiteNode(suite: any): any
  • Parameters

    • suite: any

    Returns any

createTestNode

  • createTestNode(test: any, suiteName: any): any
  • Parameters

    • test: any
    • suiteName: any

    Returns any

getBasicBand

  • getBasicBand(bandId?: string): Band
  • Parameters

    • Default value bandId: string = "band1"

    Returns Band

getBasicBandsContainer

  • Returns BandsContainer

getBasicChart

  • Parameters

    • Default value chartId: string = "chart1"

    Returns ChartBase

getBasicLabel

  • Returns Label

getBasicLineChart

  • getBasicLineChart(chartId?: string): LineChart
  • Parameters

    • Default value chartId: string = "chart1"

    Returns LineChart

getBasicLinearChart

  • Parameters

    • Default value chartId: string = "chart1"

    Returns LinearChart

getBasicScaleBand

  • getBasicScaleBand(bandId?: string): ScaleBand
  • Parameters

    • Default value bandId: string = "band1"

    Returns ScaleBand

getBasicScatterChart

  • Parameters

    • Default value chartId: string = "chart1"

    Returns ScatterChart

getBasicStationBand

  • Parameters

    • Default value bandId: string = "band1"

    Returns StationBand

getChartLinearDataSourceAndData

  • getChartLinearDataSourceAndData(): object
  • Returns object

    • data: any
    • dataSource: any
    • domain: any

getChartPointDataSourceAndData

  • getChartPointDataSourceAndData(): object
  • Returns object

    • data: any
    • dataSource: any
    • domain: any

getEnergyValve

  • getEnergyValve(): SymbolType
  • Get a valve symbol.

    Returns SymbolType

getErrorMessage

  • getErrorMessage(error: any): string
  • Parameters

    • error: any

    Returns string

getFunctionContext

  • Return a FunctionContext.

    Returns FunctionContext

getSymbol

  • getSymbol(name: string): SymbolType
  • Get the symbol that matches the name.

    Parameters

    • name: string

    Returns SymbolType

processAlignmentSheetTemplate

  • Takes the definition of a band and generates the actual object including the charts it contains.

    Parameters

    Returns BandsContainer

processBandDefinition

  • Takes the definition of a band and generates the actual object including the charts it contains.

    Parameters

    Returns Band

processChartDefinition

  • Takes the definition of a chart and generates the actual chart object.

    Parameters

    Returns ChartBase

registerCustomFunction

  • registerCustomFunction(name: string, func: any): void
  • Register a custom function that will be available through the context of a Chart or Band. i.e.: context.custom.name

    Parameters

    • name: string
    • func: any

    Returns void

Object literals

action_AddPoiAction

action_AddPoiAction: object

command

command: string = "AddPoiCommand"

displayName

displayName: string = "Add Point of Interest"

id

id: string = "AddPoiAction"

commandParameter

commandParameter: object

poi

poi: object

pointLocation

pointLocation: object

offset

offset: number = 0

offsetSide

offsetSide: number = 0

stationInfo

stationInfo: object

contextProperty

contextProperty: string = "stationInfo"

action_ChartAction

action_ChartAction: object

command

command: string = "SomeCommand"

displayName

displayName: string = "Something"

id

id: string = "ChartAction"

commandParameter

commandParameter: object

test

test: string = "yes"

action_EditBandAction

action_EditBandAction: object

command

command: string = "EditBand"

displayName

displayName: string = "Edit Band Properties"

id

id: string = "EditBandAction"

commandParameter

commandParameter: object

band

band: object

contextProperty

contextProperty: string = "band"

action_RemovePoiAction

action_RemovePoiAction: object

command

command: string = "RemovePoiCommand"

displayName

displayName: string = "Remove Point of Interest"

id

id: string = "RemovePoiAction"

commandParameter

commandParameter: object

poi

poi: object

id

id: object

contextProperty

contextProperty: string = "featureData"

subProperties

subProperties: string[] = ["id"]

alignmentSheetTemplate1

alignmentSheetTemplate1: object

bands

bands: (ScaleBandTemplate | StationBandTemplate)[] = [scaleBandTemplate_POI,stationBandTemplate_MedianType,stationBandTemplate_Profile]

containerProperties

containerProperties: BandsContainerTemplate = bandsContainerTemplate1

bandsContainerTemplate1

bandsContainerTemplate1: object

actionIds

actionIds: string[] = [action_AddPoiAction.id]

bandSpacing

bandSpacing: number = 5

padding

padding: number = 7

title

title: string = "Physical Characteristics"

zoomFactor

zoomFactor: number = 1.25

bandsSharedProperties

bandsSharedProperties: object

marginLeft

marginLeft: number = 20

marginRight

marginRight: number = 20

lineChartDefinition_Profile

lineChartDefinition_Profile: object

actions

actions: object[] = [{ id: "action2" }]

colors

colors: string[] = ["#FFFFFF", "#000000"]

colorsTypeDomain

colorsTypeDomain: string[] = ["A", "B"]

curveType

curveType: string = "curveLinear"

dataSourceId

dataSourceId: string = templateDataSource_Profile.id

dataSourceReplacementTokens

dataSourceReplacementTokens: object[] = [{ token: "bob", value: 122, displayName: "bob value" }]

featureActions

featureActions: object[] = [{ id: "action1" }]

id

id: string = "chart6"

strokeColor

strokeColor: string = "#FFFFFF"

strokeColorFunction

strokeColorFunction: string = `return "${"#FFFFFF"}"`

strokeWidth

strokeWidth: number = 1

tooltipLabel

tooltipLabel: object

Type declaration

type

type: string = "LinearChart"

typeFieldName

typeFieldName: string = "BOB"

yValue

yValue: number = 5

yValueFieldName

yValueFieldName: string = "YFIELD"

linearChartDefinition_Median_Type

linearChartDefinition_Median_Type: object

actionIds

actionIds: string[] = [action_ChartAction.id]

colors

colors: string[] = ["#6D9180", "#5BA380", "#48B680", "#36C880", "#24DA80", "#00FF80", "#00EB89", "#00D793"]

colorsTypeDomain

colorsTypeDomain: number[] = [1, 2, 3, 4, 5, 6, 7, 8]

dataSourceId

dataSourceId: string = templateDataSource_medianType.id

id

id: string = "chart8"

strokeWidth

strokeWidth: number = 3

type

type: string = "LinearChart"

typeFieldName

typeFieldName: string = "median_type"

label

label: object

textFunction

textFunction: string = "switch(d["median_type"]) { case 1: return "No Median"; case 2: return "Unprotected"; case 3: return "Curbed-Raised"; case 4: return "Positive Barrier - unspecified"; case 5: return "Positive Barrier - flexible"; case 6: return "Positive Barrier - semi-rigid"; case 7: return "Positive Barrier - rigid"; case 8: return "Continuous Center Turn Lane";}"

tooltipLabel

tooltipLabel: object

textFunction

textFunction: string = "switch(d["median_type"]) { case 1: return "No Median"; case 2: return "Unprotected"; case 3: return "Curbed-Raised"; case 4: return "Positive Barrier - unspecified"; case 5: return "Positive Barrier - flexible"; case 6: return "Positive Barrier - semi-rigid"; case 7: return "Positive Barrier - rigid"; case 8: return "Continuous Center Turn Lane";}"

scaleBandTemplate_POI

scaleBandTemplate_POI: object

charts

charts: ScatterChartDefinition[] = [scatterChartDefinition_POI]

id

id: string = "band1"

title

title: string = "Points of Interest"

type

type: string = "ScaleBand"

unit

unit: string = "mi"

specificDimensions

specificDimensions: object

height

height: number = 0

marginBottom

marginBottom: number = 20

marginTop

marginTop: number = 5

scatterChartDefinition_POI

scatterChartDefinition_POI: object

dataSourceId

dataSourceId: string = templateDataSource_POI_DataSource.id

featureActionIds

featureActionIds: string[] = [action_RemovePoiAction.id]

id

id: string = "chart1"

strokeColor

strokeColor: string = "#000"

symbolColor

symbolColor: string = "#e74c3c"

symbolType

symbolType: string = "star"

type

type: string = "ScatterChart"

yValue

yValue: number = 1.4

tooltipLabel

tooltipLabel: object

textFunction

textFunction: string = "return "POI: " + (Math.round(d["station"]*100)/100)"

yAxis

yAxis: object

showAxis

showAxis: boolean = false

stationBandTemplate_MedianType

stationBandTemplate_MedianType: object

actionIds

actionIds: string[] = [action_EditBandAction.id]

charts

charts: LinearChartDefinition[] = [linearChartDefinition_Median_Type]

id

id: string = "band8"

showTooltip

showTooltip: boolean = true

title

title: string = "Median Type"

type

type: string = "StationBand"

unit

unit: string = "mi"

specificDimensions

specificDimensions: object

height

height: number = 20

marginBottom

marginBottom: number = 15

marginTop

marginTop: number = 5

xAxis

xAxis: object

tickFormatFunction

tickFormatFunction: string = "return (Math.round(d*100)/100) + "";"

stationBandTemplate_Profile

stationBandTemplate_Profile: object

charts

charts: LineChartDefinition[] = [lineChartDefinition_Profile]

id

id: string = "band5"

showTooltip

showTooltip: boolean = true

title

title: string = "Profile"

type

type: string = "StationBand"

useStationNotation

useStationNotation: boolean = true

specificDimensions

specificDimensions: object

height

height: number = 60

marginBottom

marginBottom: number = 20

marginTop

marginTop: number = 10

template1

template1: object

actions

actions: Action[] = [action_AddPoiAction, action_RemovePoiAction, action_EditBandAction, action_ChartAction]

dataSources

dataSources: TemplateDataSource[] = [templateDataSource_medianType, templateDataSource_POI_DataSource]

extensions

extensions: object

alignmentSheet

alignmentSheet: AlignmentSheetTemplate = alignmentSheetTemplate1

templateDataSource_POI_DataSource

templateDataSource_POI_DataSource: object

displayName

displayName: string = "Points of Interest"

eventType

eventType: string = "point"

handlerId

handlerId: string = "poi"

id

id: string = "POI_DataSource"

keyFieldName

keyFieldName: string = "id"

stationFieldName

stationFieldName: string = "station"

templateDataSource_Profile

templateDataSource_Profile: object

dataQueryWhere

dataQueryWhere: string = "LineId={routeId}&BeginStation={beginStation}&EndStation={endStation}"

dataSourceUri

dataSourceUri: string = "{ViewerConfigUri}../../../../../../searchtables/Profile"

eventType

eventType: string = "point"

handlerId

handlerId: string = "query"

id

id: string = "Profile"

keyFieldName

keyFieldName: string = "ST"

stationFieldName

stationFieldName: string = "ST"

templateDataSource_medianType

templateDataSource_medianType: object

dataQueryOutFields

dataQueryOutFields: string = "objectid, route_id, from_measure, to_measure, median_type"

dataQueryWhere

dataQueryWhere: string = "route_id = '{routeId}' AND ((from_measure >= {beginStation} AND from_measure <= {endStation}) OR (to_measure >= {beginStation} AND to_measure <= {endStation}) OR (from_measure < {beginStation} AND to_measure > {endStation}))"

dataSourceUri

dataSourceUri: string = "http://roadsandhighwayssample.esri.com/arcgis/rest/services/RoadsHighways/NewYorkRoads/MapServer/5"

displayName

displayName: string = "Median Type"

endRangeFieldName

endRangeFieldName: string = "to_measure"

eventType

eventType: string = "linear"

featuresEqualityFieldName

featuresEqualityFieldName: string = "median_type"

handlerId

handlerId: string = "query"

id

id: string = "medianType"

keyFieldName

keyFieldName: string = "OBJECTID"

startRangeFieldName

startRangeFieldName: string = "from_measure"

templateState1

templateState1: object

containerState

containerState: object

bandsState

bandsState: (object | object)[] = [{id: scaleBandTemplate_POI.id,collapsed: true,order: 2,chartDataSources: [{chartId: scatterChartDefinition_POI.id,dataSource: Utils.clone(templateDataSource_POI_DataSource)}]},{id: stationBandTemplate_MedianType.id,collapsed: false,order: 1}]

zoomFactor

zoomFactor: number = 3