
This example demonstrates using cylinder shading effect for bars and gradient color for plot area background. It also demonstrates putting axis labels on both sides of the plot area.
The cylinder shading effect is the result of using the cylinder bar shape in 2D.
- The gradient plot area background is configured by using BaseChart.linearGradientColor to define the gradient color, then use XYChart.setPlotArea to apply it to the plot area.
- The XYChart.setPlotArea also sets the plot area border and grid line colors to white.
- The cylinder shading effect is configured by using BarLayer.setBarShape with CircleShape. In 2D, the circle shape is represented as cylinder shading.
- In the example, the chart is configured using XYChart.syncYAxis to show two synchronized y-axes on both sides of the plot area.
- The axes are invisible in this chart. Only the axis labels are visible. This is by using Axis.setColors to set the axes to Transparent.
- The axis label fonts are set to Arial bold using Axis.setLabelStyle.