Hi,
I’m trying to add Data Point Selection in 3D Surface. I followed this example (https://www.scichart.com/example/wpf-chart/wpf-3d-chart-example-simple-select-scatter-point-3d-chart/) but it didn’t work.
Point MetaData is added for each point:
_model = new ScatterRenderableSeries3DViewModel()
{
DataSeries = _dataSeries,
StyleKey = "ScatterSeries",
PaletteProvider = new PointCloudPaletteProvider(),
PointMarker = marker
};
RenderableSeries = new ObservableCollection<IRenderableSeries3DViewModel>()
{
_model
};
public void AppendPositionData(double x, double y, double z)
{
var vertex = new PointMetadata3D(Colors.Coral, 10);
_dataSeries.Append(x, y, z, vertex);
}
Vertex Selection Modifier is added to group
<s3D:SciChart3DSurface.ChartModifier>
<s3D:ModifierGroup3D>
<s3D:FreeLookModifier3D ExecuteOn="MouseLeftButton" ExecuteWhen="Shift" />
<s3D:OrbitModifier3D ExecuteOn="MouseLeftButton" />
<s3D:VertexSelectionModifier3D ExecuteOn="MouseLeftButton" ExecuteWhen="None" />
<s3D:MouseWheelZoomModifier3D />
<s3D:ZoomExtentsModifier3D AnimateDurationMs="500"
ResetPosition="300,300,200"
ResetTarget="0,0,0" />
</s3D:ModifierGroup3D>
</s3D:SciChart3DSurface.ChartModifier>
</s3D:SciChart3DSurface>
Now, when click to a point on the surface, IsSelected property seems not be set.
Please suggest a way to fix this issue! Thanks.
- Nguyen Bao Trung asked 11 months ago
- last edited 11 months ago
- You must login to post comments
Hi Nguyen,
I am sorry for the late reply.
I’m glad to inform you that we have published a new SciChart nightly build v7.0.2.27208 containing a fix to the reported issue.
Please try it out and let us know your feedback.
Here is how to get our nightly builds:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget
With best regards,
Lex
SciChart Technical Support Engineer
- Lex answered 9 months ago
- You must login to post comments
Hi Nguyen Bao Trung,
Thanks for your inquiry.
We have logged this in our tracking system for further investigation and will get back to you as soon as we have an update.
With best regards,
Lex,
SciChart Technical Support Engineer
- Lex answered 11 months ago
- You must login to post comments
Hi Lex,
Any updates here?
Please notice me when you have information.
- Nguyen Bao Trung answered 10 months ago
-
Hi there, we usually do task prioritization once a week. This issue has been picked up for this week for investigation. We will update you after it.
-
Hi Joeri, Any update here? Thanks
- You must login to post comments
Our example works, so look at the differences between your code and our example. What do you notice?
Something I think you might want to check. The order of modifiers.
When a modifier consumes a mouse event, modifiers further down the list don’t get the mouse event. Try moving the VertexSelectionModifier3D first before FreeLookModifier3D?
- Andrew Burnett-Thompson answered 11 months ago
- You must login to post comments
Thank Andrew,
I tried to place VertexSelectionModifier3D on the top of modifier group, but it didn’t help.
After testing several cases, I noticed that if you add data to series before application showup (like in the constructor of viewmodel, right-after instaintiate DataSeries) , I can select a point on the surface.
But after application showup, if I add data to series, I can’t do that.
In this example (https://www.scichart.com/example/wpf-chart/wpf-3d-chart-example-simple-select-scatter-point-3d-chart/), the behaviour looks same. Could you do the test like this:
In source code behind, don’t add data to DataSeries in constructor
public SelectScatterPoint3DChart()
{
InitializeComponent();
XAx.VisibleRange = new DoubleRange(0, 10);
YAx.VisibleRange = new DoubleRange(-10, 10);
ZAx.VisibleRange = new DoubleRange(1000, 10000);
_xyzDataSeries3D = new XyzDataSeries3D();
_xyzDataSeries3D.DataSeriesChanged += OnScatterDataChanged;
renderableSeries3D.DataSeries = _xyzDataSeries3D;
sciChartSurface.ZoomExtents();
}
In click-event handler, add data
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
for (int i = 0; i < 300; i++)
{
double x = DataManager.Instance.GetGaussianRandomNumber(5, 1.5);
double y = DataManager.Instance.GetGaussianRandomNumber(0.0, 5.0);
double z = DataManager.Instance.GetGaussianRandomNumber(5500, 1500);
PointMetadata3D vertex = new PointMetadata3D(Colors.Coral, 10);
_xyzDataSeries3D.Append(x, y, z, vertex);
}
}
After data is rendered, user can’t select a point on the surface.
Please kindly help to check this circumstance! Many thanks.
- Nguyen Bao Trung answered 11 months ago
- last edited 11 months ago
- You must login to post comments
Thank Andrew,
I tried to place VertexSelectionModifier3D on the top of modifier group, but it didn’t help.
After testing several cases, I noticed that if you add data to series before application showup (like in the constructor of viewmodel, right-after instaintiate DataSeries) , I can select a point on the surface.
But after application showup, if I add data to series, I can’t do that.
In this example (https://www.scichart.com/example/wpf-chart/wpf-3d-chart-example-simple-select-scatter-point-3d-chart/), the behaviour looks same. Could you do the test like:
Replace Toolbar icon by a button
<!—->
In source code behind,
Not add data to DataSeries in constructor
public SelectScatterPoint3DChart()
{
InitializeComponent();
XAx.VisibleRange = new DoubleRange(0, 10);
YAx.VisibleRange = new DoubleRange(-10, 10);
ZAx.VisibleRange = new DoubleRange(1000, 10000);
_xyzDataSeries3D = new XyzDataSeries3D();
_xyzDataSeries3D.DataSeriesChanged += OnScatterDataChanged;
renderableSeries3D.DataSeries = _xyzDataSeries3D;
sciChartSurface.ZoomExtents();
}
In click-event handler, add data
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
for (int i = 0; i < 300; i++)
{
double x = DataManager.Instance.GetGaussianRandomNumber(5, 1.5);
double y = DataManager.Instance.GetGaussianRandomNumber(0.0, 5.0);
double z = DataManager.Instance.GetGaussianRandomNumber(5500, 1500);
PointMetadata3D vertex = new PointMetadata3D(Colors.Coral, 10);
_xyzDataSeries3D.Append(x, y, z, vertex);
}
}
After data is rendered, user can’t select a point on the surface.
Please kindly help to check this circumstance! Many thanks.
- Nguyen Bao Trung answered 11 months ago
- last edited 10 months ago
- You must login to post comments
Please login first to submit.