Tables and Graphs

One of the most interesting features of DX is its ability to present information in tables and graph format. A wide variety of 2D and 3D widgets are available to help users visually explore and analyze data.

You create tables and graphs the same way you create other application windows: by dragging and dropping data-aware widgets. First you drag and drop the data column which defines the X-axis. Then you drag and drop the Y-axis column. DX even lets you drag multiple Y axes, so you can, for example, display a bar plot and line graph simultaneously.

When creating graphs, you will usually want to group the data by some common value. If you think about graphs you've seen, they seldom display actual data. They usually display sums or totals compared to each other. This grouping is accomplished with the XmNgroupBy resource on queries and widgets with query attributes.

In this example, we've already grouped data for you.. (In Tutorial 5: Graphs Applications, you can practice grouping data on your own.)

  • From the Schema Browser, select the OrderEntry database, then the SalesByTerritory table. Choose the Bar Plot Object Typefrom the pull-down menu.


Selecting fields from the SalesByTerritory table

  • Drag and drop the Territory and Total_Sales fields from the Schema Browser to the Browser.

  • From the Browser menu, select Play Mode. Click the "Search" button. The Bar Plot graph appears!

Simple Graph Application

  • Now select Show Compound Children from the Browser View menu. You see the instance hierarchy of the graphs application, with one dbPlotter widget and one child widget.
     


Instance hierarchy of Simple Graph Application

The dbPlotter widget is a special-purpose container widget that defines the labels and axes of your graph. Every graph or table application requires a dbPlotter widget.

Below the dbPlotter widget you see the child widget, defining...

Additional Resources:

Documentation: