The data for bar charts is modelled on a 2d table with "rows" and "columns". Bars are grouped by row, and are color-coded according to their column. For example, this bar chart consists of a simple data set consisting of five rows and two columns.
The row names are labelled along the bottom axis, while the columns are color coded and named in the plot's legend.Object Arguments for Bar Charts (type="barchart")
Name: title
Type: gchar *
Description: The text that appears above the bar chart.
Name: data_rows
Type: gint
Description: The number of rows in the data table for our chart. This value must be set before setting the data or row_labels arguments.
Name: data_columns
Type: gint
Description: The number of columns in the data table for our chart. This value must be set before setting the data, column_labels, column_colors or column_colors_rgb arguments.
Name: data
Type: double *
Description: A 2-d array of doubles constituting the data table for our chart,in row-major format. So for example, the three-row, two-column data table with rows {1, 2}, {3, 4}, and {5, 6} would be represented by the array { 1, 3, 5, 2, 4, 6 }.
Name: row_labels
Type: gchar **
Description: An array of pointers to strings containing labels for the rows of our data table.
Name: column_labels
Type: gchar **
Description: An array of pointers to strings containing labels for the columns of our data table.
Name: column_colors
Type: gchar **
Description: An array of pointers to strings containing the names of the colors to use to represent the columns of our data table. These should be the standard X11 names for colors. (See the colors entry of the pie chart object argument table above.)
Name: column_colors_rgb
Type: guint32 *
Description: An array of integers containing the colors to be used to represent the columns of our data table. (See the colors_rgb entry of the pue chart object argument table above.)
Name: title_font
Type: GnomeFont *
Description: Specifies the font to use for the plot's title.
Name: legend_font
Type: GnomeFont *
Description: Specifies the font to use for the text labels in the plot's legend.
Name: axis_font
Type: GnomeFont *
Description: Specifies the font to use for the text labels in the plot's axes.
Name: bar_callback1, bar_callback2, bar_callback3
Type: void (*)(gint r, gint c, gpointer user_data)
Description: The function to execute when the user double-clicks on a bar in the bar chart with mouse button 1, 2 or 3. The first two arguments are the row and column number of the data represented by that bar.
Name: bar_callback_data1, bar_callback_data2, bar_callback_data3
Type: gpointer
Description: This pointer is passed as the third argument to the apporpriate bar callback function.
Name: bar_callback_name1, bar_callback_name2, bar_callback_name3
Type: gchar *
Description: A short description of the bar double-click callback function, currently unused. (See the slice_callback_name in the pie chart section.)
Name: legend_callback1, legend_callback2, legend_callback3
Type: void (*)(gint c, gpointer user_data)
Description: The function to execute when a user double-clicks on the "color swatch" in the bar chart's legend with mouse button 1, 2 or 3. The first argument corresponds to the associated column number.
Name: legend_callback_data1, legend_callback_data2, legend_callback_data3
Type: gpointer
Description: This pointer is passed as the second argument to the legend double-click callback function.
Name: legend_callback_name1, legend_callback_name2, legend_callback_name3
Type: gchar *
Description: A short description of the legend double-click callback function, currently unused. (See slice_callback_name under pie charts).