[Mono-dev] Mono, zedgraph and System.Drawing

Hubert FONGARNAND informatique.internet at fiducial.fr
Thu Oct 18 11:47:23 EDT 2007


Hi,

I thought that mono implementation of System.Drawing for .NET 1.1 was
enough complete... I was wrong... 

I need to generate some graph for our intranet and i've take a look on
ZedGraph which is referenced on the mono website :

I try a simple program :


private void ZedGraphWeb1_RenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane)
		{
		
			GraphPane myPane=masterPane[0];
			myPane.Title.Text = "Nombre d'accès total mensuel";
			myPane.XAxis.Title.Text = "";
			myPane.YAxis.Title.Text = "";

			// Make up some random data points
			double[] y = { 10, 20, 40,10, 10 };
			double[] y2 = { 70, 50, 85, 54, 63 };
			string[] str = { "Jan 2007", "Fev 2007", "Mar 2007", "Avr 2007", "Mai 2007" };

			// Add a bar to the graph
			
			BarItem myCurve = myPane.AddBar( "Curve 1", null, y, Color.White );// Access an image from a file (use your own filename here)
			// create a brush with the image
			myCurve.Bar.Fill = new Fill(new Color[]{Color.LightGray,Color.DarkGray});
			// turn off the bar border
			myCurve.Bar.Border.IsVisible = true;
			
			
			myPane.XAxis.Scale.TextLabels = str;
			
			myPane.XAxis.Type = AxisType.Text;

			myPane.Legend.IsVisible = false;

			// Calculate the Axis Scale Ranges
			//myPane.AxisChange();
		}
	}


First Problem i've to disable myPane.AxisChange() because it crash mono
with :

hubert at hublinux /tmp/TestZDGraph $ xsp --port 8090
xsp
Listening on port: 8090 (non-secure)
Listening on address: 0.0.0.0
Root directory: /tmp/TestZDGraph
Hit Return to stop the server.
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  14 (X_GetGeometry)
  Resource id in failed request:  0x0
  Serial number of failed request:  7
  Current serial number in output stream:  7


And with myPane.AxisChange(); commented out :

Here are the result of dotnet and mono output...

MS.NET 1.1




Mono 1.2.5 (and mono 1.2.5 svn)


PS : please note that the mono version is unusable because of the Y Axis...

Could someone help me!!!!

Thanks
_______________________________________________
Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.
Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071018/713f59e5/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.png
Type: image/png
Size: 4353 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071018/713f59e5/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dotnet.png
Type: image/png
Size: 6933 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071018/713f59e5/attachment-0001.png 


More information about the Mono-devel-list mailing list