help with date axis implementation / How are discrete axes supposed to work?



Dear gnumeric list,

I'm trying to implement axis that are auto-labeled with dates, where the
user can pick a start date and a base interval, corresponding to 1 axis
unit.

I've added a discrete GogAxisMapDesc mapping for dates, which adds
different labels, and also hacked the gog-axis-pref widgetry to allow to
pick map types for discrete axes.

I'm not sure whether using discrete axes is correct, but for line plots
the discrete axis seems to be the X-axis, and the non-discrete one the
Y-axis, so in this case it is an equivalent term for "abscissa", which
is also suggested by the way gog-boxplot (gog_box_plot_axis_get_bounds
()) uses it.

Unfortunately, is_discrete is not always true for the X axis, and
depends on the axis bounds. While the final plot on the spreadsheet has
a correct date axis with my code, this is not true for the preview image
in the axis prefs dialog.

Maybe somebody could explain me the concept of discrete axis?

The gog_axis_is_discrete() docs state "TRUE if (an axis) enumerates a
set of discrete items, rather than a continuous value", but this seems
to imply many untraceable code paths in various locations.

Thanks in advance for your help!


Anybody willing to see my code can of course contact me, I don't want to
publish it yet since it's not yet in a releasable state, has some
printf() debugging etc..

-- 
Christian Neumair <cneumair gnome org>




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