double[,] ChartZData = new double[600, 600];
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Random random = new Random(200);
for (int i = 0; i < 600; i++)
{
for (int j = 0; j < 600; j++)
{
ChartZData[i, j] = random.NextDouble();
}
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
chart3d.Children.Add(new GridDataSeries() { ZData = ChartZData});
}
<c1:C1Chart3D Name="chart3d" XScale ="3" YScale="3" Background="Transparent" RenderMode="Direct3D"
Azimuth="-220" Elevation="155" ElevationAction="LeftMouseDrag" AzimuthAction="LeftMouseDrag"
SurfaceMeshAppearance="None" ChartType="SurfaceZoneGradient" >
</c1:C1Chart3D>
<Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="82" Margin="10,10,0,0" Height="36" Click="Button_Click"/>
版本4.0 |