1.将View3D定义为活动视图并定义Z轴范围。
// Set View3D as active view and set Z-axis range.
chart.ActiveView = ActiveView.View3D;
chart.View3D.ZAxisPrimary3D.SetRange(0, 80);
2.创建一个新的PointLineSeries3D对象以显示数据。
// Create a new PointLineSeries3D for displaying data and set axis bindings to primary axes.
var series = new PointLineSeries3D(chart.View3D, Axis3DBinding.Primary, Axis3DBinding.Primary, Axis3DBinding.Primary)
{
// Set this to true to set a color for individual points.
IndividualPointColors = true,
// Set this to true in order for mouse tracking to work.
MouseInteraction = true
};
3.将样式应用于新创建的系列。
// Set a title to the series.
series.Title.Text = “Series 0”;
// Set point shape to a sphere.
series.PointStyle.Shape3D = PointShape3D.Sphere;
// Set individual point size.
series.PointStyle.Size3D.SetValues(3, 3, 3);
// Set the width of the line between points.
series.LineStyle.Width = 0.4f;

本文介绍了如何使用Arction的LightningChart.NET控件创建具有鼠标点跟踪和注释的3D图表。步骤包括设置View3D为活动视图,创建PointLineSeries3D对象,应用样式,添加数据点,创建注释,以及添加MouseMove事件处理程序以实现点跟踪功能。
最低0.47元/天 解锁文章
720

被折叠的 条评论
为什么被折叠?



