| Name | Type | Default | Access |
|---|---|---|---|
| XmNaxisSpacing | int | 10 | CSG |
| XmNchartFooter | String | NULL | CSG |
| XmNchartMargins | XintChartMargins * | {10., 10., 10., 10.} | CSG |
| XmNchartTitle | char * | NULL | CSG |
| XmNchartType | int | XintCHART_TYPE_BAR | CSG |
| XmNcolorList | String * | {"red", "green", "blue", "yellow", "violet", "cyan", "salmon", "PaleGreen2", NULL} | CSG |
| XmNdoubleBuffer | Boolean | True | CSG |
| XmNgeometry | XintGeometry * | { 15, 15, 85, 85} | CSG |
| XmNpropagate | Boolean | False | CSG |
| XmNshowLegend | Boolean | False | CSG |
| XmNsymbolCount | int | dynamic | CSG |
| XmNsymbolList | int * | dynamic | CSG |
| XmNtranspose | Boolean | False | CSG |
| XmNzValueColorRecord | XintColorRec * | NULL | CSG |
This resource is specified as a pointer to a data structure of type XintChartMargins, which takes the following form:
typedef struct {
int left;
int right;
int top;
int bottom;
} XintChartMargins;
where:
| Member | Description |
|---|---|
| left | Left margin as a percentage between 0 and 100. |
| right | Right margin as a percentage between 0 and 100. |
| top | Top margin as a pecentage between 0 and 100. |
| bottom | Bottom margin as a pecentage between 0 and 100. |
| Constant | Description |
|---|---|
| XintCHART_TYPE_AREA | Area plot. |
| XintCHART_TYPE_BAR | 2D Bar plot. |
| XintCHART_TYPE_BAR_3D | 3D bars plot. |
| XintCHART_TYPE_CELL_ARRAY | 2D array of colored cells. |
| XintCHART_TYPE_COMBINATION | Combination plot. |
| XintCHART_TYPE_HIGH_LOW | High-Low plot. |
| XintCHART_TYPE_HISTOGRAM | Histogram plot. |
| XintCHART_TYPE_LINE | Line plot. |
| XintCHART_TYPE_PIE | 2D Pie plot. |
| XintCHART_TYPE_SCATTERED | Scattered plot. |
| XintCHART_TYPE_SURFACE_3D | 3D Surface plot. |
This resource is specified as a pointer to a data structure of type XintGeometry, which takes the following form:
typedef struct {
float x1;
float y1;
float x2;
float y2;
} XintGeometry;
where:
| Member | Description |
|---|---|
| x1,y1 | Coordinates of the upper left corner of the chart. |
| x2,y2 | Coordinates of the lower right corner of the chart. |
| Symbol Constant | Description |
|---|---|
| XintSYMBOL_X | X symbol. |
| XintSYMBOL_PLUS | + symbol. |
| XintSYMBOL_SQUARE | Square symbol. |
| XintSYMBOL_CIRCLE | Circle symbol. |
| XintSYMBOL_TRIANGLE | Triangle symbol. |
| XintSYMBOL_DIAMOND | Diamond symbol. |
| XintSYMBOL_FILLED_SQUARE | Filled square symbol. |
| XintSYMBOL_FILLED_CIRCLE | Filled circle symbol. |
| XintSYMBOL_FILLED_TRIANGLE | Filled triangle symbol. |
| XintSYMBOL_FILLED_DIAMOND | Filled diamond symbol. |
typedef union {
struct {
int type;
int anchor;
} placement;
} XintConstraint;
Member type should always be set to XintCONSTRAIN_PLACEMENT. For member anchor, use one of the following constants:
| Defined Constants | Description |
|---|---|
| XintANCHOR_NORTH | Object placed above the Plot. |
| XintANCHOR_NORTH_EAST | Object placed next to the upper right corner of the Plot. |
| XintANCHOR_NORTH_WEST | Object placed next to the upper left corner of the Plot. |
| XintANCHOR_SOUTH | Object placed below the Plot. |
| XintANCHOR_SOUTH_EAST | Object placed next to the lower right corner of the Plot. |
| XintANCHOR_SOUTH_WEST | Object placed next to the lower left corner of the Plot. |
| XintANCHOR_EAST | Object placed right of the Plot. |
| XintANCHOR_WEST | Object placed left of the Plot. |
| XintANCHOR_CENTER | Object placed at the center inside the Plot. |
The following code sample shows how to position the title at the bottom of the plot.
Object chart; Object title; XintConstraint constraint; ... title = XintChartGetComponent(chart, XintCHART_COMPONENT_TITLE); constraint.placement.type = XintCONSTRAIN_PLACEMENT; constraint.placement.anchor = XintANCHOR_SOUTH; XtVaSetValues((Object) title, XmNconstraint, &constraint, NULL);
You can also use resource XmNconstraint to specify the placement of objects created by the application and inserted into the Chart using function XintChartInsertObject. If XmNconstraint is left NULL, the object will be positioned based on its own geometry resource, using the Chart coordinate system (0 to 100 in both directions with the origin located in the upper left corner).
| Data Type | Member | Description |
|---|---|---|
| int | reason | Indicates why the callback was invoked (XintCR_NEW_CHART_TYPE, XintCR_OBJECT_MOVE or XintCR_OBJECT_SHAPE). |
| XEvent * | event | Points to the XEvent that triggered the callback. |
| XintGeometry * | proposed | Proposed geometry for move or shape operations. |
| int | old_chart_type | Old chart type (for reason XintCR_NEW_CHART_TYPE). |
| int | new_chart_type | New chart type (for reason XintCR_NEW_CHART_TYPE) |
| Boolean | doit | Set to False to cancel the operation. |
| Function Name | Description |
|---|---|
| XintCreateChart | Creates a Chart object. |
| XintChartAssociateData | Associates data with a chart. |
| XintChartCreateColorRecord | Creates a color record. |
| XintChartDisassociateAllData | Disassociates all data associated to a chart. |
| XintChartDisassociateData | Disassociates data from a chart. |
| XintChartFreezeUpdates | To freeze (or unfreeze) the chart while doing a series of changes. |
| XintChartGetComponent | Returns a particular component of the Chart. |
| XintChartGetDataList | Returns the list of all the data groups that are connected to the specified Chart. |
| XintChartGetDataOfSeries | Returns the data object associated to the specifed series in a Chart. |
| XintChartGetSelectedComponent | Returns the selected component inside a chart. |
| XintChartGetSeriesOfData | Returns the object series of a Chart associated with the specified data element. |
| XintChartInitializeClassConverter | Initializes the ChartObject class converter. |
| XintChartInsertObject | To insert a user defined object inside a chart or a plot. |
| XintChartIsTransposed | To tell if a Chart is transposed or not. |
| XintChartPick | To implement picking or data selection. |
| XintChartReadTemplate | Reads a list of Chart templates from a disk file. |
| XintChartSaveTemplate | Saves a list of Chart templates in a disk file. |
| XintChartZoom | To zoom a Chart object. |
Object XintCreateChart (...)
| Widget | parent | Parent of new chart object. |
| char * | name | Name of new chart object. |
| ArgList | arglist | List of resource settings for th e new chart. |
| Cardinal | argcount | Number of resources set by arglist. |
void XintChartAssociateData (...)
| Object | chart | ID of the chart object. |
| Object | data | ID of the data group or data object to associate with the chart. |
XintColorRec *XintChartCreateColorRecord (...)
| Pixel * | pixels | Array of pixels that has been allocated by the application. |
| int | pixel_count | Number of pixels in array pixels. |
void XintChartDisassociateAllData (Object chart)
void XintChartDisassociateData (...)
| Object | chart | ID of the chart object. |
| Object | data | ID of the data object or data group to disassociate from the chart. |
Boolean XintChartFreezeUpdates (...)
| Object | object | Object ID of the chart to be frozen. |
| int | toggle | Set to 1 to freeze; 0 to unfreeze. |
If toggle is set to freeze chart and the chart is already frozen th en it returns False. If toggle is set to unfreeze chart and the ch art is not frozen then it returns False. Otherwise, it returns True.
Object XintChartGetComponent (...)
| Object | chart | ID of the chart object. |
| int | code | Code of the component to return. |
The argument code can be one of the following constants:
| Constant | Description |
|---|---|
| XintCHART_COMPONENT_PLOT | The code for the plot object. |
| XintCHART_COMPONENT_VERTICAL_AXIS | The code for the vertical axis object. |
| XintCHART_COMPONENT_HORIZONTAL_AXIS | The code for the horizontal axis object. |
| XintCHART_COMPONENT_LEGEND | The code for the legend object. |
| XintCHART_COMPONENT_TITLE | The code for the title object. |
| XintCHART_COMPONENT_FOOTER | The code for the footer object. |
Object *XintChartGetDataList (...)
| Object | chart | Chart object ID. |
| int * | count | Returns the data group count. |
If the list returned is not NULL, you should free it after it is no longer needed.
Object *XintChartGetDataOfSeries (...)
| Object | chart_or_plot | Chart or Plot object ID. |
| Object | series | ID of the series element. |
| int * | count | Returns the number of data objects associated with series. |
You will need to free the object list returned after it is no longer needed.
Object XintChartGetSelectedComponent (...)
| Object | chart | ID of the chart object. |
| int | *code | Code for the returned component. |
The argument code will be one of the following constants:
| Constant | Description |
|---|---|
| XintCHART_COMPONENT_CHART | Selected object is the chart. |
| XintCHART_COMPONENT_PLOT | Selected object is the plot. |
| XintCHART_COMPONENT_VERTICAL_AXIS | Selected objet is the vertical axis. |
| XintCHART_COMPONENT_HORIZONTAL_AXIS | Selected object is the horizontal axis. |
| XintCHART_COMPONENT_LEGEND | Selected object is the legend object. |
| XintCHART_COMPONENT_TITLE | Selected object is the title object. |
| XintCHART_COMPONENT_FOOTER | Selected object is the footer object. |
| XintCHART_COMPONENT_SERIES | Selected object is a series. |
| XintCHART_COMPONENT_USER_OBJECT | Selected object is an object that was inserted using XintChartInsertObject. |
Object *XintChartGetSeriesOfData (...)
| Object | chart_or_plot | Chart or Plot object ID. |
| Object | data | ID of the data element. |
| int * | count | Returns the number of series elements associated with data. |
You will need to free the object list returned after it is no longer needed.
void XintChartInitializeClassConverter (void)
void XintChartInsertObject(...)
| Object | chart_or_plot | ID of the Chart or the Plot in which to insert the object. |
| Object | object | ID of the object to be inserted. |
Object *XintChartReadTemplate (...)
| Widget | parent | Widget ID of the parent of this Chart object. |
| char * | filename | Name of the file that contains the Chart templates. |
| Object * | data_group_list | List of data groups, one per Chart from the template file. |
| int | data_group_count | Number of data groups in the list. |
| int * | count | Returns the number of Chart objects read from disk and restored. |
Boolean XintChartSaveTemplate (...)
| char * | filename | Name of the file where the Chart object templates will be stored. |
| Object * | object_list | List of Chart and non-Chart objects to be saved on disk in template format. |
| int | count | Number of objects in the list. |
The function will return False if it cannot write to the specified file; otherwise it will return True.
Boolean XintChartIsTransposed (Object chart)
Object XintChartPick (...)
| Widget | edit_object | ID of the EditObject Widget. |
| XEvent * | event | Event to process (must be a button event of type ButtonPress or ButtonRelease). |
| int | *index | Returns the index of the data point selected. |
Boolean XintChartZoom (...)
| Object | chart | ID of the Chart object to Zoom. |
| int | x,y | Pixel coordinates of the upper left corner of the area to zoom. |
| int | width, height | Size in pixels of the area to zoom. |
Boolean XintIsChart (Object object)