4.2.1 Bar3D Series

Bar3D chart uses ChartDataModel as its data model. Bar3D chart extracts (x, y, z) value sets from the data model, maps and plots them. KEYS specify position on X-axis, VALUES - on Y-axis and EXTENT - on Z-axis.

Bar3D Series

This Series uses ChartDataModel as its data model. KEYS specify where bars should stand, VALUES specify height and EXTENTS specify where bars should stand on Z-axis. Bar width can be set using setBarWidth() method and depth - setBarDepth() methods.

 3D Bar Series Demonstration

Figure 4.2.2.1 3D Bar Demonstration

View Source

FloatingBar3D Series

This Series uses ChartDataModel as its data model. KEYS specify where bars should stand, VALUES specify height and EXTENTS specify height of bar.

Floating Bar 3D Demonstration

Figure 4.2.3.1 Floating Bar 3D Demonstration

View Source

Other Bar3D Series Properties

Bar Width

For this series, there is a possibility to set bar width, using setBarWidth() method.

 
series1.setBarWidth(0.08f);
series2.setBarWidth(0.08f);
series3.setBarWidth(0.08f);

All Bars Width set to 0.08 Demonstration

Figure 4.2.4.1 All Bars Width set to 0.08 Demonstration

Bar Depth

Bar depth can be altered using setBarDepth() method.

 
series1.setBarDepth(0.01f);
series2.setBarDepth(0.01f);
series3.setBarDepth(0.04f);

Bars Depth Demonstration

Bar shape

Cylinder Bar shape can be set using getStrategy().setShape(new Pole3D()).

 
Pole3D cylinder = new Pole3D(); // create polygon object
cylinder.setPointsCount(20); // sets points of polygon
Bar3DSeries.getStrategy().setShape(cylinder); //sets bar shape - cylinder

Bar3DSeries Cylinder Shape Demonstration

Figure 4.2.4.3 Bar3DSeries Shape Cylinder Demonstration

Spacing

Bar and Series spacing can be set using static methods setBarSpacing() and setSeriesSpacing().

 
Bar3DSeries.setBarSpacing(xMapper, 0.8f); //sets bar spacing for x-mapper 
Bar3DSeries.setSeriesSpacing(zMapper, 0.9f); //sets series spacing for z-mapper

Bar3DSeries Spacing Demonstration

Figure 4.2.4.4 Bar3DSeries Spacing Demonstration