XY Chart NET 3 Control Reference > Events > ExportDataButtonSelected Event |
[Visual Basic] Event ExportDataButtonSelected() |
[C#] ExportDataButtonSelected() |
[C++] ExportDataButtonSelected() |
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form. Private Sub XYChartNETCtl1_ExportDataButtonSelected() Handles XYChartNETCtl1.ExportDataButtonSelected Dim Row As Integer, Col As Integer Dim LineString As String, EntireArrayString As String Dim ChartData As Object 'Do not execute XY Chart NET's internal ExportData method XYChartNETCtl1.OverrideExportDataButton = True 'Copy ChartData array to Clipboard (Tab de-limited) ChartData = XYChartNETCtl1.ChartData For Row = 0 To UBound(ChartData) LineString = "" For Col = 0 To (XYChartNETCtl1.NumProfiles * 2 - 1) If Col = 0 Then LineString = CStr(ChartData(Row, Col)) Else LineString = LineString + CStr(vbTab) + CStr(ChartData(Row, Col)) End If Next Col EntireArrayString = EntireArrayString + vbCrLf + LineString Next Row Clipboard.SetDataObject(EntireArrayString) 'Copy all to Clipboard End Sub