hatek
Messages postés5Date d'inscriptionsamedi 31 mars 2012StatutMembreDernière intervention30 avril 2012
-
7 avril 2012 à 10:46
hatek
Messages postés5Date d'inscriptionsamedi 31 mars 2012StatutMembreDernière intervention30 avril 2012
-
8 avril 2012 à 20:55
slt
je suis débutant en c# je voudrais afficher un courbe avec 3 axes en utilisant librairie ZedGraph et voila un exemple avec 2 axes (X,Y) si qlq'un à une idée je le remercie d'avance.je suis vraiment bloqué
using System;
using ZedGraph;
using ZedGraph.Web;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Resize(object sender, EventArgs e)
{
SetSize();
}
private void SetSize()
{
// permet de laisser une marge de 10 pixels tout autour du graphique
zedGraphControl1.Location = new Point(10, 10);
zedGraphControl1.Size = new Size(ClientRectangle.Width - 20, ClientRectangle.Height - 20);
}
// Build the Chart
private void CreateGraph(ZedGraphControl zgc)
{
// Get a reference to the GraphPane
GraphPane myPane = zedGraphControl1.GraphPane;
// Set the titles
myPane.Title.Text = "My Test Date Graph";
myPane.XAxis.Title.Text = "Date";
myPane.XAxis.Title.Text = "My Y Axis";
// myPane.XAxis.GetCrossAxis;
// Make up some random data points
double x, y;
PointPairList list = new PointPairList();
for ( int i=0; i<36; i++ )
{
x = (double) new XDate( 1995, 5, i+11 );
y = Math.Sin( (double) i * Math.PI / 15.0 );
list.Add( x, y );
}
// Generate a red curve with diamond
// symbols, and "My Curve" in the legend
CurveItem myCurve = myPane.AddCurve( "My Curve",
list, Color.Red, SymbolType.Diamond );
// Set the XAxis to date type
myPane.XAxis.Type = AxisType.Date;
// Tell ZedGraph to refigure the axes since the data
// have changed
zedGraphControl1.AxisChange();
Tupad
Messages postés239Date d'inscriptionlundi 5 décembre 2005StatutMembreDernière intervention27 août 20125 7 avril 2012 à 19:29
En regardant la doc de la librairie, je n'ai vu aucune classe avec comme nom "ZAxis". J'en déduis que ce n'est pas possible de dessiner des graphiques en 3 dimensions avec cette librairie sauf si tu recodes un avec des Z à partir de (presque) rien et que tu redéfinis les méthodes de dessin des classes contenant les graphiques.
Whismeril
Messages postés19029Date d'inscriptionmardi 11 mars 2003StatutContributeurDernière intervention26 avril 2024656 7 avril 2012 à 20:43
Bonsoir, j'utilise Zedgraph depuis longtemps (pour du 2D il est vrai) mais avec tous les exemple qui étaient à disposition sur le site, je n'ai jamais vu de 3D.
Depuis il y a les windows Charts qui le font, il y a un tuto là. C'est disponible avec la framework 4.
hatek
Messages postés5Date d'inscriptionsamedi 31 mars 2012StatutMembreDernière intervention30 avril 2012 8 avril 2012 à 20:55
MERCI POUR votre réponse je veux le voire s'il existe une autre librairie pour résoudre cette problème et merci une autre fois :)
mais j'ai un petit problème comment je peut afficher les coordonnée d'une courbe avec un clique de sourie dans un zone de texte :)