ZedGraph X achse Datum
-
Hi Leute
Ich hab mir mit ZedGraph einen Graphen gebastelt und möchte jetzt die X achse mit nem Datum versehen.Ich hab es so gemacht wie es im Tutorial steht.Leider t das nicht.Kann mir einer von euch weiterhelfen?Irgendwas stimmt da mit dieser Zeile nicht: x = (double) gcnew XDate( 1995, 5, i+11 );
Hier der Code für den Graphen:/// ZedGraph Kurve ////////// private: void CreateGraph( ZedGraphControl ^zgc ) { GraphPane ^myPane = zgc->GraphPane; // Set the titles and axis labels myPane->Title->Text = "Gewichtskurve"; myPane->XAxis->Title->Text = "Tag"; myPane->YAxis->Title->Text = "Gewicht in Kg"; // Make up some data points from the Sine function double x,y; PointPairList ^list = gcnew PointPairList(); for ( int i=0; i<36; i++ ) { x = (double) gcnew XDate( 1995, 5, i+11 ); y = Math::Sin( (double) i * Math::PI / 15.0 ); list->Add( x, y ); } // Generate a blue curve with circle symbols, and "My Curve 2" in the legend LineItem ^myCurve = myPane->AddCurve( "Trainingskurve", list, Color::Blue, SymbolType::Circle ); XDate ^xdatum = gcnew XDate ( 1995, 1, 1); xdatum->AddDays ( 1 ); myPane->XAxis->Type = AxisType::Date;