Skip to content
Snippets Groups Projects
Commit 0efa79bb authored by Tim Molter's avatar Tim Molter
Browse files

cleaned up CSV import/export examples

parent 41349088
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,5 @@ target/
.classpath
.project
.settings/
*.png
\ No newline at end of file
*.png
CSV/
\ No newline at end of file
1,2,3
12,34,56
\ No newline at end of file
1,2,3
56,34,12
\ No newline at end of file
/**
* Copyright (c) 2013 Knowmtech <http://knowmtech.com>
*
* All rights reserved. No warranty, explicit or implicit, provided. In no event shall the author be liable for any claim or damages.
*
* IMPORTANT: THIS CODE IS PROPRIETARY!!! ABSOLUTELY NO DUPLICATION OR DISTRIBUTION IS PERMITTED WITHOUT EXPRESS WRITTEN PERMISSION FROM:
* M. ALEXANDER NUGENT CONSULTING 22B STACY RD, SANTA FE NM 87585 (505)-988-7016 i@alexnugent.name
*/
package com.xeiam.xchart.standalone;
import com.xeiam.xchart.CSVExporter;
import com.xeiam.xchart.CSVImporter;
import com.xeiam.xchart.CSVImporter.DataOrientation;
import com.xeiam.xchart.Chart;
import com.xeiam.xchart.SwingWrapper;
/**
* @author timmolter
*/
public class CSVChartColumns {
public static void main(String[] args) throws Exception {
// import chart from a folder containing CSV files
Chart chart = CSVImporter.getChartFromCSVDir("./CSV/CSVChartColumns/", DataOrientation.Columns, 600, 600);
CSVExporter.writeCSVColumns(chart.getSeriesMap().get(0), "./CSV/CSVChartColumnsExport/");
// Show it
new SwingWrapper(chart).displayChart();
}
}
......@@ -30,14 +30,14 @@ import com.xeiam.xchart.SwingWrapper;
/**
* @author timmolter
*/
public class CSVChart {
public class CSVChartRows {
public static void main(String[] args) throws Exception {
// import chart from a folder containing CSV files
Chart chart = CSVImporter.getChartFromCSVDir("./CSV/CSVChart/", DataOrientation.Rows, 600, 400);
Chart chart = CSVImporter.getChartFromCSVDir("./CSV/CSVChartRows/", DataOrientation.Rows, 600, 400);
CSVExporter.writeCSVRows(chart.getSeriesMap().get(0), "./CSV/CSVChartExport/");
CSVExporter.writeCSVRows(chart.getSeriesMap().get(0), "./CSV/CSVChartRowsExport/");
// Show it
new SwingWrapper(chart).displayChart();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment