Customizing the Graph
To fully understand this chapter it is important that you are familiar with the graph implementation of yFiles for HTML as introduced in the graph model chapter.
In this chapter we describe several customizations of the graph and its elements. It contains stand-alone sections that do not depend on each other. We recommend that you just read the parts that are currently interesting to you, and come back later if you need more information.
You should not implement the IGraph interface or any of the IModelItems. Instead, we recommend to use the customization options described in this chapter.
This chapter contains the following sections.
- Decorating Graph Elements
- Describes how you can decorate graph elements with custom user interaction behavior and with specific visualizations for the selection, focus, and custom highlight.
- Associating Data with Graph Elements
- Shows how you can store custom data for the graph elements.
- Reacting to Graph Changes
- Explains how you can run custom code by listening for graph changes. Lists all events that are dispatched by the graph.
- Copying Elements of a Graph
- Explains how graph elements can be copied from one graph to another.