code: private static String[] getSeriesDataFromCSVRows(File csvFile) {
  
      String[] xAndYData = new String[3];
  
      BufferedReader bufferedReader = null;
      try {
        int counter = 0;
        String line;
        bufferedReader = new BufferedReader(new FileReader(csvFile));
        while ((line = bufferedReader.readLine()) != null) {
          xAndYData[counter++] = line;
        }
      } catch (Exception e) {
        System.out.println("Exception while reading csv file: " + e);
      } finally {
        if (bufferedReader != null) {
          try {
            bufferedReader.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
        }
      }
      return xAndYData;
    }
docs: Get the series's data from a file
  
  @param csvFile
  @return