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
...@@ -3,3 +3,4 @@ target/ ...@@ -3,3 +3,4 @@ target/
.project .project
.settings/ .settings/
*.png *.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; ...@@ -30,14 +30,14 @@ import com.xeiam.xchart.SwingWrapper;
/** /**
* @author timmolter * @author timmolter
*/ */
public class CSVChart { public class CSVChartRows {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// import chart from a folder containing CSV files // 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 // Show it
new SwingWrapper(chart).displayChart(); new SwingWrapper(chart).displayChart();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment