IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Dotnet Discussion :

Utilisation Zedgraph dans VS C#


Sujet :

Dotnet

  1. #1
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Septembre 2012
    Messages
    79
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Niger

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Transports

    Informations forums :
    Inscription : Septembre 2012
    Messages : 79
    Points : 64
    Points
    64
    Par défaut Utilisation Zedgraph dans VS C#
    Bonjour à tous!

    je viens de découvrir la zedgraph dll ,j'aimerais l'utiliser pour créer un graph à partir d'une table par exemple

    tbl_Etudiant(Nom,Age) en Abscisse Nom et en ordonnée Age

    Quelqu'un peut-il me guider avec un petit bout de code en visual C#

    Merci d'avance!

  2. #2
    Membre averti Avatar de megamario
    Homme Profil pro
    VB6/VB.net/C/C++/C#
    Inscrit en
    Septembre 2008
    Messages
    928
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Indre et Loire (Centre)

    Informations professionnelles :
    Activité : VB6/VB.net/C/C++/C#
    Secteur : Industrie

    Informations forums :
    Inscription : Septembre 2008
    Messages : 928
    Points : 312
    Points
    312
    Par défaut
    Bonjour, J'ai utilisé zedgraph dans mon projet BTS en C# je l'avais adapté en VB.net pour mon taf.

    Zedgraph a malheureusement été abandonné. Mais j'ai récupéré, je pense, tous les Tuto et exemple.

    Ci dessous un début d'aide en C# pour l'affichage de texte sur l'axe des X:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
     
    //============================================================================
    //ZedGraph Class Library - A Flexible Charting Library for .Net
    //Copyright (C) 2005 John Champion and Jerry Vos
    //
    //This library is free software; you can redistribute it and/or
    //modify it under the terms of the GNU Lesser General Public
    //License as published by the Free Software Foundation; either
    //version 2.1 of the License, or (at your option) any later version.
    //
    //This library is distributed in the hope that it will be useful,
    //but WITHOUT ANY WARRANTY; without even the implied warranty of
    //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    //Lesser General Public License for more details.
    //
    //You should have received a copy of the GNU Lesser General Public
    //License along with this library; if not, write to the Free Software
    //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    //=============================================================================
    using System;
    using System.Drawing;
    using System.Collections;
     
    using ZedGraph;
     
    namespace ZedGraph.Demo
    {
    	/// <summary>
    	/// Summary description for SimpleDemo.
    	/// </summary>
    	public class TextAxisSampleDemo : DemoBase
    	{
     
    		public TextAxisSampleDemo() : base( "Code Project Text Axis Sample",
    			"Text Axis Sample", DemoType.Tutorial )
    		{
    			GraphPane myPane = base.GraphPane;
     
    			// Set the title and axis labels
    			myPane.Title.Text = "My Test Date Graph";
    			myPane.XAxis.Title.Text = "Label";
    			myPane.YAxis.Title.Text = "My Y Axis";
     
    			// Make up some data points
    			string[] labels = { "USA", "Spain\nMadrid", "Qatar", "Morocco", "UK", "Uganda",
    								  "Cambodia", "Malaysia", "Australia", "Ecuador" };
    			double[] y = new double[10];
    			for ( int i=0; i<10; i++ )
    				y[i] = Math.Sin( (double) i * Math.PI / 2.0 );
     
    			// Generate a red curve with diamond
    			// symbols, and "My Curve" in the legend
    			LineItem myCurve = myPane.AddCurve( "My Curve",
    				null, y, Color.Red, SymbolType.Diamond );
     
    			//Make the curve smooth
    			myCurve.Line.IsSmooth = true;
     
    			// Set the XAxis to Text type
    			myPane.XAxis.Type = AxisType.Text;
    			// Set the XAxis labels
    			myPane.XAxis.Scale.TextLabels = labels;
    			// Set the labels at an angle so they don't overlap
    			myPane.XAxis.Scale.FontSpec.Angle = 40;
     
    			base.ZedGraphControl.AxisChange();
    		}
    	}
    }
    C'est dans le projet de demo. Moi j'utilise des dates en X

    Les sources, mais certain lien son cassés: ICI

Discussions similaires

  1. utiliser mysql++ dans une classe
    Par Yevetrovitch dans le forum Bibliothèques
    Réponses: 2
    Dernier message: 11/04/2005, 10h53
  2. Comment utiliser Opengl dans Visual Basic 6
    Par fun31 dans le forum OpenGL
    Réponses: 1
    Dernier message: 03/12/2004, 10h17
  3. [CR] Peut-on utiliser CR dans un programme en C
    Par mboucetta dans le forum SAP Crystal Reports
    Réponses: 1
    Dernier message: 11/10/2004, 10h56
  4. Réponses: 1
    Dernier message: 28/04/2004, 19h18
  5. [CR][VB6] comment utiliser CR dans VB ?
    Par kouassi_denis dans le forum SDK
    Réponses: 2
    Dernier message: 26/01/2004, 16h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo