Maintaining a Graphics Control for an Agency View

The Agency View Graphic Summary enables you to create graphics to be displayed within an agency view. You can create a graphic as either a static image or as a dynamic image, such as a chart or a graph, based on system data. Dynamic images are regenerated using current system data every time the agency view is saved or refreshed.

Graphics are created in an agency view by exposing the standard Microsoft libraries System.Windows.Forms.DataVisulaization and System.Drawing to be referenced in the agency view graphics code. Supported graphic file types include .png, .jpeg, or .gif. Attached image files and dynamically generated images are retrieved by writing or copying the image to the ImageMemoryStream variable.

To access the component, navigate to the Agency View Summary, locate the graphic control row and select Open from the row Actions menu.

To create a graphic for the agency view, you must enter information in the Code field. Text in the Code field must be entered for either static or dynamic images using IronPython functions and syntax. For a list of supported functions, see Supported Utility Functions in Python Code Fields. For information about using the code editor text box, see Using the Code Editor Text Box.

It is not required, but you can also enter information in the Tooltip field.

For a static image, the graphics file must also be saved as an attachment to the Agency View by selecting Attachments from the Actions menu on the component header. For more information, see Working with Attachments.

Dynamic images can be generated by using the Drawing and Charting namespaces. Supporting documentation is available in the .NET Framework Class Library on the MSDN website:

https://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting

https://msdn.microsoft.com/en-us/library/system.drawing

For more information and example graphic code, see the AASHTOWare Project Agency View Training Guide, available on Cloverleaf.

When you have finished entering information for the agency view graphic, click Save.

Related topics:

Working with Agency Views

Maintaining an Agency View

 

Blue bar indicating the end of the topic