[Gnucash-changes] Get stacked-column plots from looking funky by "overlapping" the

Joshua Sled jsled at cvs.gnucash.org
Sat Feb 12 22:50:11 EST 2005


Log Message:
-----------
Get stacked-column plots from looking funky by "overlapping" the segments on top of each other.

Tags:
----
g2-gog-integ

Modified Files:
--------------
    gnucash/src/gnome-utils:
        gnc-html-graph-gog.c

Revision Data
-------------
Index: gnc-html-graph-gog.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-html-graph-gog.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome-utils/gnc-html-graph-gog.c -Lsrc/gnome-utils/gnc-html-graph-gog.c -u -r1.1.2.3 -r1.1.2.4
--- src/gnome-utils/gnc-html-graph-gog.c
+++ src/gnome-utils/gnc-html-graph-gog.c
@@ -265,7 +265,8 @@
   //char *x_axis_label, *y_axis_label;
   //gboolean rotate_row_labels;
   gboolean stacked = FALSE;
-  char *barType;
+  char *barType = "normal";
+  int barOverlap = 0 /*percent*/; // seperate bars; no overlap.
 
   // First, parse data from the text-ized params.
   {
@@ -310,16 +311,16 @@
     printf( "plugin not loaded" );
     return FALSE;
   }
-  barType = "normal";
   if ( stacked )
   {
-    // this is still behaving very strangely, but we'll deal with that later.
     barType = "stacked";
+    barOverlap = 100 /*percent*/;
+    // when stacked, we want the bars on _top_ of eachother.
   }
-  PINFO( "barType=[%s]", barType );
   g_object_set (G_OBJECT (plot),
                 "vary_style_by_element",	TRUE,
                 "type",                         barType,
+                "overlap_percentage",           barOverlap, 
 		NULL);
   gog_object_add_by_name( chart, "Plot", GOG_OBJECT(plot) );
 


More information about the gnucash-changes mailing list