Customizing the Graph
Note
|
To fully understand this chapter, familiarity with the graph implementation of yFiles for HTML as introduced in the graph model chapter, is important. |
In this chapter, we describe several ways to customize the graph and its elements. The sections are stand-alone and do not depend on each other. We recommend reading the sections that are currently of interest and returning later for more information.
Important
|
You should not implement the IGraph interface or any of the IModelItem interfaces. Instead, we recommend using the customization options described in this chapter. |
This chapter contains the following sections:
- Decorating Graph Elements
-
Describes how to decorate graph elements with custom user interaction behavior and specific visualizations for selection, focus, and custom highlighting.
- Associating Data with Graph Elements
-
Shows how to store custom data for graph elements.
- Reacting to Graph Changes
-
Explains how to run custom code by listening for graph changes and 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.