[Gtk-sharp-list] MedSphere.Graph2D & LabelAxis

Adam Tauno Williams awilliam at whitemice.org
Fri Nov 21 11:08:20 EST 2008


I have a working Histogram plot using Medpshere.Graph2D where the
horizonal axis is a DateTime sequence and the vertical axis is a double.

However my graph where the horizontal axis is a LabelAxis (username) and
the vertical axis is a double, it doesn't plot anything.  Although it
does display the label "User" along the horzizontal axis and the range
of the vertical axis seems correct.

<code>
 store = new TreeStore (typeof (string), typeof (double));
 foreach(UserStat stat in userStats.Values)
 {
   Console.WriteLine("User:{0} Size:{1} Count:{2}",
     stat.User, stat.Size, stat.Count);
   store.AppendValues(stat.User, 
                      Math.Round((stat.Size / 1024576.0), 1));
 }     
 userUsageGraph.AppendAxis (new LabelAxis (0, 
                                           AxisLocation.Bottom,
                                           "User"));
 userUsageGraph.AppendAxis (new LinearAxis (1,
                                            AxisLocation.Left));        
 linePlot  = new LinePlot (store, 
                           PlotColor.Orange, 
                           PointShape.Triangle);
 linePlot.Name = "HistogramPlot";
 linePlot.ShowValues = true;
 linePlot.SetValueDataColumn (0, 0);
 linePlot.SetValueDataColumn (1, 1);
 userUsageGraph.AddPlot(linePlot, userUsageGraph.Axes); 
</code>
-- 
          Consonance: an Open Source .NET OpenGroupware client.
 Contact:awilliam at whitemiceconsulting.com   http://freshmeat.net/projects/consonance/



More information about the Gtk-sharp-list mailing list