
Hi, we are developing a product which supposed to have 3D Stacked Bar Series. But I haven't found any documents for this type of chart in both of your documents and examples. I'm not sure your products supporting for this Chart.
Please tell me if you have any suggestions.
Thanks and best regards.
Harry
10 Answers, 1 is accepted
The RadChartView3D suite doesn't provide stacking mechanism for its series visualizations. However, there is a feature request for introducing such feature. You can find it logged in our feedback portal where you can track its status.
Regards,
Martin Ivanov
Progress Telerik
I've prepared a small example showing a possible approach to achieve stacked bars visualization using the BarSeries3D with MaterialSelector and MeshGeometry3D. I hope this helps.
Regards,
Martin Ivanov
Progress Telerik

Hi Martin Ivanov,
Thank you very much for your support. I used your example and it worked.

Hi Martin Ivanov,
There is one more problem. Does your library support MouseClickEvent() on column of BarSeries3D? Concretely, we need to show more information by clicking on particular column. (Ex: Opening new ImageWindow).
Do you have any suggestions?
Thank for your helps.
RadChartView3D doesn't expose an API that allows you to subscribe directly to a mouse click event of the bars (columns) but you can use the WPF native API to get the clicked element. For example:
this.chart.AddHandler(RadCartesianChart3D.MouseLeftButtonDownEvent, new MouseButtonEventHandler(Chart_MouseLeftButtonDown), true);
//-----------------
private void Chart_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Viewport3D viewport = ChildrenOfTypeExtensions.FindChildByType<
Viewport3D
>(this.chart);
Point position = e.GetPosition(this.chart);
Visual3D visualHit = HitTest(viewport, position);
if (visualHit != null)
{
RadRect3D radLayoutSlot = GetLayoutSlot(visualHit);
foreach (BarSeries3D series in this.chart.Series)
{
foreach (XyzDataPoint3D dp in series.DataPoints)
{
if (dp.LayoutSlot.Equals(radLayoutSlot))
{
var dataItem = (MyPlotInfo)dp.DataItem;
return;
}
}
}
}
}
private Visual3D HitTest(Viewport3D viewport, Point position)
{
Visual3D visualHit = null;
HitTestResultCallback callback = result =>
{
RayMeshGeometry3DHitTestResult rayMeshResult = result as RayMeshGeometry3DHitTestResult;
visualHit = rayMeshResult.VisualHit;
return HitTestResultBehavior.Stop;
};
VisualTreeHelper.HitTest(viewport, null, callback, new PointHitTestParameters(position));
return visualHit;
}
Regards,
Martin Ivanov
Progress Telerik

Hi Martin Ivanov,
Thanks for your helps. I used your example and it worked for us.
Could you help me with one more issue. We need to make the grid line inside the 3D chart. You will be more clear with the picture I attached.
Is that possible to make it like that?
Thanks and best regards,
Harry

Thank for your help.
The 3D chart doesn't support grid lines inside of the plot area. You can get a similar effect by adding a new BarSeries3D with custom geometry that shows a wireframe. Here is a blog post on how to create a 3D wireframe in WPF. Maybe you can use this information to create a custom geometry and apply it to the DefaultVisualGeometry of the series.
About the curved bars, this effect appears because of the custom geometry applied. It is quite simple compared to the default geometry of the series and the light is reflected differently from the surface. In order to alter this and get an effect similar to the one in the default bars you will need to alter the custom MeshGeometry3D. You can read how the geometry works in the MSDN article related to 3D in WPF. For example you can use the Normals or the Positions collections of the mesh object.
Regards,
Martin Ivanov
Progress Telerik

Hi Martin Ivanov,
I've get into this trouble. Sometimes the axes of 3D Bar Chart somehow is stuck (the picture I've attached). Do you have any ideas for this problem.
Thanks for your helps.
This is curious. We haven't seen this issue. May I ask you to open a new support ticket from your telerik.com account and send a runnable project showing the issue? This way someone can test it and investigate what happens. Alternatively, you can try reproducing this in the project I've attached few replies back and let me know what was modified in order to reproduce the issue.
Regards,
Martin Ivanov
Progress Telerik