Add data to a GogBarColPlot with stacked columns
- From: Antonio Álvarez Feijoo <aalvarez igalia com>
- To: gnumeric-list gnome org
- Subject: Add data to a GogBarColPlot with stacked columns
- Date: Fri, 25 Apr 2008 09:34:56 +0200 (CEST)
Hello,
I have been all week trying to make a GogBarColPlot with stacked columns,
but I have not been able to.
For example, I want 4 columns with two different values in each one.
With the values of X axis I don't have any problem:
gchar ** t_legends;
t_legends = g_new (gchar*, n_max_datetimes);
/* ... */
data = go_data_vector_str_new (t_legends, 4, g_free);
gog_series_set_dim (series, 0, data, &error);
The two attempts for the columns that I have made (memory crashes...) were:
1. gdouble *t_values_1;
t_values_1 = g_new (gdouble, 4);
t_values_1[0] = 20;
t_values_1[1] = 20;
t_values_1[2] = 20;
t_values_1[3] = 0;
data = go_data_vector_val_new (t_values_1, 4, g_free);
gog_series_set_dim (series, 1, data, &error);
gdouble *t_values_2;
t_values_2 = g_new (gdouble, 4);
t_values_2[0] = 50;
t_values_2[1] = 50;
t_values_2[2] = 0;
t_values_2[3] = 30;
data = go_data_vector_val_new (t_values_2, 4, g_free);
gog_series_set_dim (series, 2, data, &error);
2. gdouble *t_values_1;
t_values_1 = g_new (gdouble, 4);
t_values_1[0] = 20;
t_values_1[1] = 20;
t_values_1[2] = 20;
t_values_1[3] = 0;
t_values_1[4] = 50;
t_values_1[5] = 50;
t_values_1[6] = 0;
t_values_1[7] = 30;
data = go_data_vector_val_new (t_values_1, 4, g_free);
gog_series_set_dim (series, 1, data, &error);
Sorry, but I am learning to use libgoffice and I am a little lost...
Thanks.
--
Antonio Álvarez Feijoo
Computer Science Engineer
mailto:aalvarez igalia com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]