Works for a simple example, but I got sigsegv with a more complicated one.

#mono -V
Mono JIT compiler version 1.1.13, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com
       TLS:           normal
       GC:            Included Boehm (with typed GC)
       SIGSEGV      : normal

#uname -a
linux 2.6.15-default #3 SMP Fri Jan 13 19:09:35 CET 2006 i686 i686 i386 GNU/Linux

mono installed from go-mono rpms, Suse 10.1 beta4

zedgraph v4.2.4

# rpm -qa | grep -i gdiplus
libgdiplus-1.1.13.2-2


Steps to reproduce :

1) download mentionned version of zedgraph, and put it in your current folder.
2) Compile the attached sample code with:
gmcs -t:exe sample_console.cs -r:System.Drawing -r:ZedGraph.dll

3) run compiled assembly...

Below is what I obtained.

Regards, matt


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Stacktrace:

in <0x4> (wrapper managed-to-native) System.Drawing.GDIPlus:GdipFillRectangle (intptr,intptr,single,single,single,single) in <0xffffffa9> (wrapper managed-to-native) System.Drawing.GDIPlus:GdipFillRectangle (intptr,intptr,single,single,single,single) in <0x59> System.Drawing.Graphics:FillRectangle (System.Drawing.Brush,single,single,single,single) in <0x78> System.Drawing.Graphics:FillRectangle (System.Drawing.Brush,System.Drawing.RectangleF) in <0x5e68> (wrapper remoting-invoke-with-check) System.Drawing.Graphics:FillRectangle (System.Drawing.Brush,System.Drawing.RectangleF) in <0x98> ZedGraph.PieItem:DrawLegendKey (System.Drawing.Graphics,ZedGraph.GraphPane,System.Drawing.RectangleF,single) in <0x3cd> ZedGraph.Legend:Draw (System.Drawing.Graphics,ZedGraph.PaneBase,single)
in <0x9bf> ZedGraph.GraphPane:Draw (System.Drawing.Graphics)
in <0x102> ZedGraph.PaneBase:get_Image ()
in <0xb45> ConsoleApplication1.Program:CreateGraph (ZedGraph.GraphPane)
in <0x96> ConsoleApplication1.Program:Main (string[])
in <0xc7656ac7> (wrapper runtime-invoke) System.Object:runtime_invoke_void_string[] (object,intptr,intptr,intptr)

Native stacktrace:

       mono(mono_handle_native_sigsegv+0xba) [0x814c1da]
       mono [0x81386af]
       [0xffffe440]
       /usr/lib/libgdiplus.so(create_tile_linear+0x204) [0x40ced044]
       /usr/lib/libgdiplus.so [0x40ced5cc]
       /usr/lib/libgdiplus.so(gdip_brush_setup+0x23) [0x40cd2c93]
       /usr/lib/libgdiplus.so(GdipFillRectangle+0xa4) [0x40cd7914]
       [0x40cad64a]
       [0x40cad5a2]
       [0x40cad4f9]
       [0x40cad43f]
       [0x40cb31d9]
       [0x40cb2b66]
       [0x40cab9c0]
       [0x40caa40b]
       [0x40ae9c36]
       [0x40ae1c7f]
       [0x40ae1ac3]
       mono [0x8138560]
       mono(mono_runtime_invoke+0x27) [0x80d4d37]
       mono(mono_runtime_exec_main+0x5c) [0x80d5e4c]
       mono(mono_runtime_run_main+0x171) [0x80d5a71]
       mono(strftime+0x1b52) [0x805ce52]
       mono(mono_main+0x786) [0x805d766]
       mono(__fxstat64+0x12b) [0x805c21b]
       /lib/libc.so.6(__libc_start_main+0xd8) [0x4013e748]
       mono(sinh+0x41) [0x805c171]
Aborted



matthieu barthélemy wrote:
Hi Joe,

I have been looking for a long time for such a library, and never found it...
This one looks promising.
So, many thanks.

Matt


Joe Audette wrote:
I haven't tried it yet but this one looks promising. I think its all managed code so it should work in mono but again I havan't tried it yet.

http://zedgraph.org/wiki/index.php?title=Main_Page

Hope it helps, let us know if it does work.

Cheers,

Joe
joe_audette [at] yahoo dotcom http://www.joeaudette.com http://www.mojoportal.com

----- Original Message ----
From: Colin JN Breame <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, March 8, 2006 1:23:21 PM
Subject: [Mono-list] mono charting

Could anyone recommend a (FLOSS) general chart library that works with mono?

Thanks
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list




_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list



_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list


using System;
using System.Collections.Generic;
using System.Text;
using ZedGraph;
using System.Drawing;
using System.Drawing.Imaging;

namespace ConsoleApplication1
{
   class Program
   {
	static void Main( string[] args )
	{
		GraphPane myPane = new GraphPane( new RectangleF( 0, 0, 640, 480 ), "Availability status ", "X Title", "Y Title" );
		CreateGraph(myPane);
	}

	private static void CreateGraph( GraphPane myPane )
	{  
	// Set the GraphPane title
	myPane.Title = "2004 ZedGraph Sales by Region\n($M)";
	myPane.FontSpec.IsItalic = true;
	myPane.FontSpec.Size = 24f;
	myPane.FontSpec.Family = "Times";
	
	// Fill the pane background with a color gradient
	myPane.PaneFill = new Fill( Color.White, Color.Goldenrod, 45.0f );
	// No fill for the axis background
	myPane.AxisFill.Type = FillType.None;
	
	// Set the legend to an arbitrary location
	myPane.Legend.Position = LegendPos.Float ;
	myPane.Legend.Location = new Location( 0.95f, 0.15f, CoordType.PaneFraction,
			AlignH.Right, AlignV.Top );
	myPane.Legend.FontSpec.Size = 10f;
	myPane.Legend.IsHStack = false;
	
	// Add some pie slices
	PieItem segment1 = myPane.AddPieSlice( 20, Color.Navy, Color.White, 45f, 0, "North" );
	PieItem segment3 = myPane.AddPieSlice( 30, Color.Purple, Color.White, 45f, .0, "East" );
	PieItem segment4 = myPane.AddPieSlice( 10.21, Color.LimeGreen, Color.White, 45f, 0, "West" );
	PieItem segment2 = myPane.AddPieSlice( 40, Color.SandyBrown, Color.White, 45f, 0.2, "South" );
	PieItem segment6 = myPane.AddPieSlice( 250, Color.Red, Color.White, 45f, 0, "Europe" );
	PieItem segment7 = myPane.AddPieSlice( 50, Color.Blue, Color.White, 45f, 0.2, "Pac Rim" );
	PieItem segment8 = myPane.AddPieSlice( 400, Color.Green, Color.White, 45f, 0, "South America" );
	PieItem segment9 = myPane.AddPieSlice( 50, Color.Yellow, Color.White, 45f, 0.2, "Africa" );
	
	segment2.LabelDetail.FontSpec.FontColor = Color.Red;
				
	// Sum up the pie values                                                               
	CurveList curves = myPane.CurveList ;
	double total = 0 ;
	for ( int x = 0 ; x <  curves.Count ; x++ )
	total += ((PieItem)curves[x]).Value ;
	
	// Make a text label to highlight the total value
	TextItem text = new TextItem( "Total 2004 Sales\n" + "$" + total.ToString () + "M",
			0.18F, 0.40F, CoordType.PaneFraction );
	text.Location.AlignH = AlignH.Center;
	text.Location.AlignV = AlignV.Bottom;
	text.FontSpec.Border.IsVisible = false ;
	text.FontSpec.Fill = new Fill( Color.White, Color.FromArgb( 255, 100, 100 ), 45F );
	text.FontSpec.StringAlignment = StringAlignment.Center ;
	myPane.GraphItemList.Add( text );
	
	// Create a drop shadow for the total value text item
	TextItem text2 = new TextItem( text );
	text2.FontSpec.Fill = new Fill( Color.Black );
	text2.Location.X += 0.008f;
	text2.Location.Y += 0.01f;
	myPane.GraphItemList.Add( text2 );
	
	// Calculate the Axis Scale Ranges
	Bitmap bm = new Bitmap( 1, 1 );
	Graphics g = Graphics.FromImage( bm );
	myPane.AxisChange( g );
	myPane.Image.Save( @"zedgraph.png", ImageFormat.Png ); 
	
	
	}
   }
}
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to