To write the code in C

• Click on the Detail section for rptChart to select the section. Click on the events icon in the Properties window to display available events for the Detail section. Double-click Format. This creates an event-handling method for the Detail_Format event.

The following example shows what the code for the method looks like:

[Visual Basic]

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Del Dim r As New System.Random() Dim Chart1 As SoftwareFX.ChartFX.Chart 'Cast customControl as ChartFX chart

Chart1 = CType(Me.CustomControl1.Control, SoftwareFX.ChartFX.Chart)

Dim i As Integer Dim j As Integer

'Open the communication channel

Chart1.OpenData(SoftwareFX.ChartFX.COD.Values, 3, 3) For i = 0 To 2

'Assign the values to the series selected Chart1.Value(i, j) = r.NextDouble() * 100 Next j Next i

'Close the communication channel

Chart1.CloseData(SoftwareFX.ChartFX.COD.Values) End Sub

private void Detail_Format(object sender, System.EventArgs eArgs) {

System.Random r = new System.Random();

Chart Chartl = new Chart();

//Cast customControl as ChartFX chart

Chartl = ((SoftwareFX.ChartFX.Chart)this.CustomControll.Control); //Open the communication channel

Chart1.OpenData(SoftwareFX.ChartFX.COD.Values, 3, 3);

//Assign the values to the series selected Chart1.Value[i, j] = r.NextDouble() * 100;

//Close the communication channel

Chartl.CloseData(SoftwareFX.ChartFX.COD.Values);

0 0

Post a comment