Public Shared Function ChartToLayout(ByVal theChart As UltraChart) As ChartLayout Dim theLayout As New ChartLayout() theChart.Data.DataBind() theLayout.ChartType = theChart.ChartType theLayout.DataSource = theChart.Data.DataSource theLayout.X = theChart.Transform3D.XRotation theLayout.Y = theChart.Transform3D.YRotation theLayout.Z = theChart.Transform3D.ZRotation theLayout.Scale = theChart.Transform3D.Scale theLayout.TitleTop = theChart.TitleTop.Text Dim m As New MemoryStream() theChart.SaveTo(m, ImageFormat.Png) theLayout.Image = Image.FromStream(m) Return theLayout End Function