Abdel Posted July 7, 2011 Report Share Posted July 7, 2011 Hi, I have a problem for displaying X axis labels whose step was customized. Here is my App Code Chart1.OpenData(COD.Values, NumSeries, COD.Unknown)Chart1.OpenData(COD.XValues, NumSeries, COD.Unknown) For i = 0 To NumSeries - 1 For j = 0 To NumPts - 1 'Assign values to series from dt1 If dt1.Rows(j)(i + 1) Is DBNull.Value Then Chart1.Value(i, j) = Chart1.Hidden Else Chart1.Value(i, j) = dt1.Rows(j)(i + 1) End If Next j Next (i) Dim myStep As Double() = New Double(NumPts - 1) {} ''''Just to test For i = 0 To NumSeries - 1 Chart1.XValue(i, 0) = 10 myStep(0) = 6 Chart1.XValue(i, 1) = 16 myStep(1) = 9 Chart1.XValue(i, 2) = 25 myStep(2) = 9 Chart1.XValue(i, 3) = 34 myStep(3) = 2 Chart1.XValue(i, 4) = 36 Next (i) Chart1.AxisX.CustomSteps = myStep Chart1.CloseData(COD.Values) Chart1.CloseData(COD.XValues) Dim t As Integer For t = 0 To dt1.Rows.Count - 1 Chart1.AxisX.Label(t) = dt1.Rows(t)(0) 'labeling AxisX Next 'Series Legend With Chart1 For i = 1 To dt1.Columns.Count - 1 .SerLeg(i - 1) = Format(CDate(dt1.Columns(i).ColumnName()), "dd/MM/yyyy") Next .SerLegBox = True .SerLegBoxObj.Docked = Docked.Bottom 'par defaut End With Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.