Profile Picture

Zoom on a 3D surface

Posted By Dan Overton 10 Years Ago
Author
Message
Dan Overton
Question Posted 10 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 4, Visits: 14
When using one of the 3d surfaces (mesh, triangulated), is there a way to zoom in on a certain part of the surface?


Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hello,

You can use the Data Zoom tool in order to zoom-in on a portion of a chart interactively (with the mouse). You can take a look at the following example in our demo application:

   All Examples > Interactivity > Tools > Data Zoom Tool

By default the chart in the example is 2D, but there is a setting to switch it to a 3D point chart. In general this method applies for all Cartesian series, including surface series.

The same thing can be achieved programmatically. The code below demonstrates how to zoom-in on a portion of a mesh surface:


nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NTrackballTool());

NChart chart = nChartControl1.Charts[0];
chart.Enable3D = true;
chart.Width = 50;
chart.Depth = 50;
chart.Height = 40;

NMeshSurfaceSeries surface = new NMeshSurfaceSeries();
surface.Data.SetGridSize(10, 10);
chart.Series.Add(surface);

for (int i = 0; i < 10; i++)
{
    for (int j = 0; j < 10; j++)
    {
        double y = Math.Sin(i * 0.3);
        double x = i;
        double z = j;
        surface.Data.SetValue(i, j, y, x, z);
    }
}

NAxis axisX = chart.Axis(StandardAxis.PrimaryX);
axisX.ScaleConfigurator = new NLinearScaleConfigurator();

NNumericAxisPagingView pagingViewX = (NNumericAxisPagingView)axisX.PagingView;
pagingViewX.Enabled = true;
pagingViewX.Begin = 1;
pagingViewX.Length = 2;

NAxis axisZ = chart.Axis(StandardAxis.Depth);
axisZ.ScaleConfigurator = new NLinearScaleConfigurator();
axisZ.Visible = true;

NNumericAxisPagingView pagingViewZ = (NNumericAxisPagingView)axisZ.PagingView;
pagingViewZ.Enabled = true;
pagingViewZ.Begin = 1;
pagingViewZ.Length = 2;



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic