Class AnalyseOrder

java.lang.Object
com.esprit.controllers.products.AnalyseOrder
All Implemented Interfaces:
javafx.fxml.Initializable

public class AnalyseOrder extends Object implements 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 Details

    • TauxOrder

      private javafx.scene.chart.LineChart<String,Number> TauxOrder
    • TauxCategorie

      private javafx.scene.chart.StackedBarChart<String,Number> TauxCategorie
    • xAxis

      private javafx.scene.chart.CategoryAxis xAxis
    • xOrderAxis

      private javafx.scene.chart.CategoryAxis xOrderAxis
  • Constructor Details

    • AnalyseOrder

      public AnalyseOrder()
  • Method Details

    • initialize

      public void initialize(URL location, ResourceBundle resources)
      Is responsible for calling the initialization logic, which in turn updates the graphs.
      Specified by:
      initialize in interface javafx.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.