JavaFX StackedBarChartIn stacked bar charts, the values of the different groups are displayed on a rectangular bar in the form of a stack. This is mainly used to compare the values of the different groups according to its length plotted on the bar. In the following image, the population of men and women in the different states, is compared. On the x-axis, the states plotted while, on the y-axis the population is plotted. In JavaFX, the class javafx.scene.chart.StackedBarChart represents the stacked bar chart. We need to instantiate this class to generate a StackedBarChart node. PropertiesThe class contains only one property which is described in the following table along with its setter method.
ConstructorsThere are the three constructors in the class.
ExampleIn the following example, we have shown the comparison between the popularity of two programming languages in each month of a year. The x-axis is a category axis while the y-axis is a number axis. On X-axis, we have plotted the months of a year while on the y-axis we have plotted the number of readers. Next Topicjavafx CSS |