This example demonstrates using soft lighting effect for bars and gradient color for plot area background. It also demonstrates putting axis ticks in between axis labels, as opposed to at the axis labels.
Soft lighting is a special shading effect that look like gradient coloring. In this example, soft lighting effect is applied to the bars with the light coming from the left direction.
- 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 soft lighting effect of the bars is defined using softLighting, then applied to the bars using Layer.setBorderColor.
- The ticks in this example is offsetted by 0.5 units using Axis.setTickOffset. As a result, they are not center aligned with the axis labels, but are in between the labels.