Package com.esprit.controllers.products
Class AnalyseOrder
java.lang.Object
com.esprit.controllers.products.AnalyseOrder
- All Implemented Interfaces:
javafx.fxml.Initializable
Is used to analyze the number of orders placed by date and categorize them
based on the products purchased. It updates two graphical representations:
TauxOrder (number of orders per date) and TauxCategorie (number of categories
purchased per date). The class retrieves data from various sources, including
a list of all orders, a list of all products, and a list of all categories.
It then processes the data to create the graphs and displays them on the
screen.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javafx.scene.chart.CategoryAxis
private javafx.scene.chart.CategoryAxis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(URL location, ResourceBundle resources) Is responsible for calling the initialization logic, which in turn updates the graphs.private void
Updates a bar graph and a stacked bar chart with the number of orders, payments, and categories purchased by date.
-
Field Details
-
TauxOrder
-
TauxCategorie
-
xAxis
private javafx.scene.chart.CategoryAxis xAxis -
xOrderAxis
private javafx.scene.chart.CategoryAxis xOrderAxis
-
-
Constructor Details
-
AnalyseOrder
public AnalyseOrder()
-
-
Method Details
-
initialize
Is responsible for calling the initialization logic, which in turn updates the graphs.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Parameters:
location
- URL of the initial graph layout, which is passed to the `updateGraphs()` method for initialization.resources
- resource bundle that provides localized strings and values for the application.
-
updateGraphs
private void updateGraphs()Updates a bar graph and a stacked bar chart with the number of orders, payments, and categories purchased by date. It retrieves data from a database and calculates the number of orders and payments for each category by date.
-