Re: Goffice Graph Bounds Change

If the data change, everything should be updated. It's strange that it
might not be the case when only y data change. I need to investigate.

Le jeudi 10 septembre 2009 à 10:27 -0400, David Brigada a écrit :
I found something interesting.  When I change the code to change the 
number of data points between 500 and 501 randomly, it seems that the 
graph will rescale properly.  Maybe something doesn't trigger the bounds 
change unless one of the two things happens:

- The number of data points changes
- The x values / limits of x values change (my program only uses a 
single set of data for x values)

Any ideas on what might be causing this?


Jean Bréfort wrote:
I'd say that this should work. You might try to use
gog_object_request_update for the series. There is some similar code in
gchemutils ( file libs/gcu/

Le vendredi 04 septembre 2009 à 13:06 -0400, David Brigada a écrit :

The relevant part on new data looks something like this (simplified a bit):

void new_data(GogSeries *series, gdouble *x, gdouble *y)
   GOData *dat;
   GError *error;

   dat = go_data_vector_val_new(x, 501, NULL);
   gog_series_set_dim(series, 0, dat, &error);
   dat = go_data_vector_val_new(y, 501, NULL);
   gog_series_set_dim(series, 1, dat, &error);


Jean Brefort wrote:
What's your code? Do you call gog_series_set_dim when you change the
data? or anything else?


Le vendredi 04 septembre 2009 à 12:47 -0400, David Brigada a écrit :

I'm using the goffice library to plot some graphs in a custom 
application.  The first time I plot data on a graph, the bounds of the 
graph automatically adjust to fit the data.  However, subsequent times, 
when I update the series with new data, sometimes it doesn't redo the 
bounds of the graph, so data is lost off the sides (especially the top 
and bottom).  Am I missing some way to tell it to update the bounds when 
it gets new data?  The same behavior appears in goffice 0.7.8 and 0.7.11.


David Brigada
gnumeric-list mailing list
gnumeric-list gnome org

gnumeric-list mailing list
gnumeric-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]