Tool Customization

The Chart FX active chart tools provide an easy way for users to access the supported commands. Providing this functionality to charting applications can dramatically improve the usability and appeal of charts. However if you plan to restrict access to any of the commands it is important to keep in mind that there are many ways to access any one command. For example, an end user may select the gallery command via the ToolBar, MenuBar or right-click context sensitive menus.

This introduces an additional level of complexity as customizing only the ToolBar does not mean that other tools are not exposing the same command. For example, if you do not want end users to select an area chart, you may end up changing the ToolBar, ManuBar, the right-click menus, or any other tool where the Area button may appear.

To increase control over these commands, Chart FX introduces the Commands object. The Commands object contains all the Chart FX commands available and their definitions (picture, text, etc). This allows the developer to remove or disable a command one time that will effect all the tools used to create and display the user interface for Chart FX.

Other important properties supported by the Chart FX API are the chart class ToolBarObj and MenuBarObj properties which allow a programmer to control ToolBar and ManuBar positioning, visual attributes and command customization.

Relationship between the Commands & ToolBar Classes

When customizing the ToolBar, it is imperative that you understand the relationship between the Commands and ToolBar classes.

When it comes to changing general settings, such as position and visibility, the supported members of the ToolBar class should be used. The chart ToolBarObj or MenuBarObj properties expose the members that are used to change the general visual attributes of the selected ToolBar.

On the other hand, if you want to customize items (buttons) in the ToolBar, many of the features you may want to change (ToolTips, Picture, etc) are configured using the members of the Commands class. Items accessed using the Commands class is usually available to any of the Chart FX Tools.

In the following figure, you'll see that for a particular button in the ToolBar many of the important visible attributes like text, picture (icon), and style are controlled by the Commands class and not by the ToolBar class.