par , 10/02/2016 à 13h56 (719 Affichages)
Pour amélioré les statistiques il existe un composant qui s'appel ZEDGRAPH :
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
|
PointPairList listPointsOne = new PointPairList();
PointPairList listPointsTwo = new PointPairList();
// line item
LineItem myCurveOne;
LineItem myCurveTwo;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
GraphPane myPane;
// set your pane
myPane = zedGraphControl1.GraphPane;
// set a title
myPane.Title = "This is an example!";
// set X and Y axis titles
myPane.XAxis.Title = "X Axis";
myPane.YAxis.Title = "Y Axis";
// ---- CURVE ONE ----
// draw a sin curve
for (int i = 0; i < 100; i++)
{
listPointsOne.Add(i, Math.Sin(i));
}
// set lineitem to list of points
myCurveOne = myPane.AddCurve(null, listPointsOne, Color.Black, SymbolType.Circle);
// ---------------------
// ---- CURVE TWO ----
listPointsTwo.Add(10, 50);
listPointsTwo.Add(50, 50);
// set lineitem to list of points
myCurveTwo = myPane.AddCurve(null, listPointsTwo, Color.Blue, SymbolType.None);
myCurveTwo.Line.Width = 5;
// ---------------------
// draw
zedGraphControl1.AxisChange();
} |