Package org.odftoolkit.simple.chart

Examples of org.odftoolkit.simple.chart.Chart


      Rectangle rect = new Rectangle();
      rect.x = 367;
      rect.y = 389;
      rect.width = 379;
      rect.height = 424;
      Chart spChart = spDocument.createChart(title, dataset, rect);
      Assert.assertNotNull(spChart);
      spChart.setChartType(ChartType.AREA);
      //save
      spDocument.save(ResourceUtilities.getAbsolutePath(TEST_FILE));
     
      Assert.assertEquals(dataset, spChart.getChartData());
      Assert.assertEquals("XXXTitle", spChart.getChartTitle());
      Assert.assertEquals(ChartType.AREA, spChart.getChartType());
     
      System.out.println("spChart--> " + spChart);
     
    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage(), e);
View Full Code Here


    String[] labels = {"hello", "hi","odf"};
    String[] legends = {"hello1", "hi1","odf1"};
    double[][] data = {{1.11, 43.23}, {3.22, 4.00, 5.43}, {121.99, 123.1, 423.00}};
    DataSet dataset = new DataSet(labels, legends, data);
    Rectangle rect = new Rectangle();
    Chart chart = tdoc.createChart(title, dataset, rect);
    chart.setChartType(ChartType.AREA);
    Assert.assertEquals(ChartType.AREA, chart.getChartType());
    Assert.assertEquals("title_name", chart.getChartTitle());
    Assert.assertEquals(dataset, chart.getChartData());
   
    //save
    tdoc.save(ResourceUtilities.getAbsolutePath("headerFooterHidden.odt"));
  }
View Full Code Here

    String[] labels = {"hello", "hi","odf"};
    String[] legends = {"hello1", "hi1","odf1"};
    double[][] data = {{1.11, 43.23}, {3.22, 4.00, 5.43}, {121.99, 123.1, 423.00}};
    DataSet dataset = new DataSet(labels, legends, data);
    Rectangle rect = new Rectangle();
    Chart chart = tdoc.createChart(title, dataset, rect);
    List chartA = tdoc.getChartByTitle("title_name");
    chart.setChartType(ChartType.AREA);
    Assert.assertEquals(ChartType.AREA, chart.getChartType());
    Assert.assertEquals("title_name", chart.getChartTitle());
    Assert.assertEquals(dataset, chart.getChartData());
   
    int count = tdoc.getChartCount();
    Assert.assertEquals(chartA.size(), count);
   
    //save
View Full Code Here

      Rectangle rect = new Rectangle();
      rect.x = 2000;
      rect.y = 3300;
      rect.width = 21000;
      rect.height = 12000;
      Chart newChart = slidepre.createChart(title, lables, legends, data, rect);

      doc.save(ResourceUtilities.newTestOutputFile("slidetitlelayout.odp"));
     
      //load
      doc = PresentationDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("slidetitlelayout.odp"));
View Full Code Here

      Rectangle rect1 = new Rectangle();
      rect1.x = 2000;
      rect1.y = 11300;
      rect1.width = 22000;
      rect1.height = 8000;
      Chart newChart = slidepre.createChart(title, lables, legends, data, rect);
      Chart newChart1 = slidepre.createChart(title1, lables1, legends1, data1, rect1);

      doc.save(ResourceUtilities.newTestOutputFile("slidetitlelayout.odp"));
     
      //load
      doc = PresentationDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("slidetitlelayout.odp"));
View Full Code Here

      Rectangle rect1 = new Rectangle();
      rect1.x = 2000;
      rect1.y = 11300;
      rect1.width = 10000;
      rect1.height = 8000;
      Chart newChart = slidepre.createChart(title, lables, legends, data, rect);
     
      Textbox outline = slidepre.getTextboxByUsage(PresentationClass.OUTLINE).get(0);
        List txtList = outline.addList();
        txtList.addItem("List Item1");
        txtList.addItem("List Item2");
     
      Chart newChart1 = slidepre.createChart(title1, lables1, legends1, data1, rect1);

      doc.save(ResourceUtilities.newTestOutputFile("slidetitlelayout.odp"));
     
      //load
      doc = PresentationDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("slidetitlelayout.odp"));
View Full Code Here

      rect2.x = 2000;
      rect2.y = 16300;
      rect2.width = 5000;
      rect2.height = 6000;
     
      Chart newChart = slidepre.createChart(title, lables, legends, data, rect);
      Chart newChart1 = slidepre.createChart(title1, lables1, legends1, data1, rect1);
      Textbox outline = slidepre.getTextboxByUsage(PresentationClass.OUTLINE).get(0);
        List txtList = outline.addList();
        txtList.addItem("List Item1");
        txtList.addItem("List Item2");
        Chart newChart2 = slidepre.createChart(title2, lables2, legends2, data2, rect2);
     
      doc.save(ResourceUtilities.newTestOutputFile("slidetitlelayout.odp"));
     
      //load
      doc = PresentationDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("slidetitlelayout.odp"));
View Full Code Here

      Rectangle rect = new Rectangle();
      rect.x = 367;
      rect.y = 389;
      rect.width = 379;
      rect.height = 424;
      Chart spChart = spDocument.createChart(title, dataset, rect);
      Assert.assertNotNull(spChart);
      spChart.setChartType(ChartType.AREA);
      //save
      spDocument.save(ResourceUtilities.getTestOutput("Chart_"+TEST_FILE));
     
      Assert.assertEquals(dataset, spChart.getChartData());
      Assert.assertEquals("XXXTitle", spChart.getChartTitle());
      Assert.assertEquals(ChartType.AREA, spChart.getChartType());
     
      LOG.log(Level.INFO,"spChart--> " + spChart);
     
    } catch (Exception e) {
      LOG.log(Level.SEVERE, e.getMessage(), e);
View Full Code Here

    String[] labels = {"hello", "hi","odf"};
    String[] legends = {"hello1", "hi1","odf1"};
    double[][] data = {{1.11, 43.23}, {3.22, 4.00, 5.43}, {121.99, 123.1, 423.00}};
    DataSet dataset = new DataSet(labels, legends, data);
    Rectangle rect = new Rectangle();
    Chart chart = tdoc.createChart(title, dataset, rect);
    chart.setChartType(ChartType.AREA);
    Assert.assertEquals(ChartType.AREA, chart.getChartType());
    Assert.assertEquals("title_name", chart.getChartTitle());
    Assert.assertEquals(dataset, chart.getChartData());
   
    //save
    tdoc.save(ResourceUtilities.getAbsolutePath("headerFooterHidden.odt"));
  }
View Full Code Here

    String[] labels = {"hello", "hi","odf"};
    String[] legends = {"hello1", "hi1","odf1"};
    double[][] data = {{1.11, 43.23}, {3.22, 4.00, 5.43}, {121.99, 123.1, 423.00}};
    DataSet dataset = new DataSet(labels, legends, data);
    Rectangle rect = new Rectangle();
    Chart chart = tdoc.createChart(title, dataset, rect);
    List chartA = tdoc.getChartByTitle("title_name");
    chart.setChartType(ChartType.AREA);
    Assert.assertEquals(ChartType.AREA, chart.getChartType());
    Assert.assertEquals("title_name", chart.getChartTitle());
    Assert.assertEquals(dataset, chart.getChartData());
   
    int count = tdoc.getChartCount();
    Assert.assertEquals(chartA.size(), count);
   
    //save
View Full Code Here

TOP

Related Classes of org.odftoolkit.simple.chart.Chart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.