Hello there. At the beginning of the program, I define the workspace as w=10 and h=10 units. I set the new workspace to 5×5 in a button event. The new workspace is created but the old 10×10 volume remains on the screen. When I create the new workspace I want the old one to disappear. Thank you in advance for your help. Good work.
My button event.
btnSetNewWH.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
w = 5;
h = 5;
ds3d = new UniformGridDataSeries3D<>(Double.class, Double.class, Double.class, w, h);
rs1 = sciChart3DBuilder.newSurfaceMeshSeries3D()
.withDataSeries(ds3d)
.withDrawMeshAs(DrawMeshAs.SolidWireframe)
.withStroke(0xFFE0E0E0)
.withStrokeThicknes(1f)
.withMaximum(5000)
.withDrawSkirt(false)
.withMeshColorPalette(new GradientColorPalette(colors, stops))
.withOpacity(1.0f)
.build();
surface3d.setTheme(R.style.SciChart_ElectricStyle);
surface3d.setCamera(camera);
surface3d.setXAxis(xAxis);
surface3d.setYAxis(yAxis);
surface3d.setIsFpsCounterVisible(false);
surface3d.setZAxis(zAxis);
surface3d.getRenderableSeries().add(rs1);
surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroupWithDefaultModifiers().build());
}
});
- MUSTAFA KELSAKA asked 3 years ago
- You must login to post comments
Hello Yura. My problem was due to another error in my program. My problem was solved with the piece of code you provided. Thank you so much.
Best regards…
- MUSTAFA KELSAKA answered 3 years ago
- You must login to post comments
Hi Yura. Thank you for your answer. I have tried this method before. Unfortunately the problem persists.
surface3d.getRenderableSeries().remove(rs1);
surface3d.setTheme(R.style.SciChart_ElectricStyle);
surface3d.setCamera(camera);
surface3d.setXAxis(xAxis);
surface3d.setYAxis(yAxis);
surface3d.setIsFpsCounterVisible(false);
surface3d.setZAxis(zAxis);
surface3d.getRenderableSeries().add(rs1);
surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroupWithDefaultModifiers().build());
- MUSTAFA KELSAKA answered 3 years ago
- last edited 3 years ago
-
I don’t understand the code that you posted – you removed series, but then you add it one more time. Or you remove rs1 series before adding new series in button event listener? It’s unclear from your response. Can you provide a full project which reproduces this issue so I can debug it?
- You must login to post comments
Hi Mustafa,
Can you try to remove existing RenderableSeries from RenderableSeries collection of chart? This should remove it from screen:
surface3d.getRenderableSeries().remove(rs1);
Is this suitable for your needs?
Best regards,
Yura
- Yura Khariton answered 3 years ago
- You must login to post comments
Please login first to submit.