Class CSVExporter

java.lang.Object
org.knowm.xchart.CSVExporter

public class CSVExporter extends Object
This class is used to export Chart data to a folder containing one or more CSV files. The parent folder's name is the title of the chart. Each series becomes a CSV file in the folder. The series' name becomes the CSV files' name.
  • Constructor Details

    • CSVExporter

      public CSVExporter()
  • Method Details

    • writeCSVRows

      public static void writeCSVRows(XYChart chart, String path2Dir)
      Export all XYChart series as rows in separate CSV files.
      Parameters:
      chart -
      path2Dir -
    • writeCSVRows

      public static void writeCSVRows(XYSeries series, String path2Dir)
      Export a XYChart series into rows in a CSV file.
      Parameters:
      series -
      path2Dir - - ex. "./path/to/directory/" *make sure you have the '/' on the end
    • writeCSVColumns

      public static void writeCSVColumns(XYChart chart, String path2Dir)
      Export all XYChart series as columns in separate CSV files.
      Parameters:
      chart -
      path2Dir -
    • writeCSVColumns

      public static void writeCSVColumns(XYSeries series, String path2Dir)
      Export a Chart series in columns in a CSV file.
      Parameters:
      series -
      path2Dir - - ex. "./path/to/directory/" *make sure you have the '/' on the end