Class ChartHelper


  • public class ChartHelper
    extends java.lang.Object
    워드 파일에 룰 결과 차트를 작성하는 데 도와주는 객체
    Version:
    1.0
    Author:
    Yeonhee Kim, Wooyoung Lee
    • Constructor Summary

      Constructors 
      Constructor Description
      ChartHelper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.poi.xwpf.usermodel.XWPFDocument checkChartForm​(org.apache.poi.xwpf.usermodel.XWPFDocument doc, Rule rule, java.lang.String path)
      데이터를 체크하여 알맞은 형태의 차트를 작성하게끔 함
      org.apache.poi.xwpf.usermodel.XWPFDocument drawBarChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
      막대그래프를 작성함
      org.apache.poi.xwpf.usermodel.XWPFDocument drawBoxChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
      상자그림 그래프를 작성함
      org.apache.poi.xwpf.usermodel.XWPFDocument drawPieChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
      원그래프를 작성함
      int getChartCount()
      그릴 차트의 개수를 반환함(데이터의 양이 지나치게 많을 경우 차트를 나눠서 그림)
      void setXYData()
      차트에 들어갈 x축, y축 데이터를 정리하여 담음
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChartHelper

        public ChartHelper()
    • Method Detail

      • checkChartForm

        public org.apache.poi.xwpf.usermodel.XWPFDocument checkChartForm​(org.apache.poi.xwpf.usermodel.XWPFDocument doc,
                                                                         Rule rule,
                                                                         java.lang.String path)
        데이터를 체크하여 알맞은 형태의 차트를 작성하게끔 함
        Parameters:
        doc - 워드 문서 객체
        rule - 전사 규칙 객체
        path - 임시 차트 이미지 파일을 저장할 경로
        Returns:
        차트 이미지가 추가된 워드 문서 객체
      • drawBarChart

        public org.apache.poi.xwpf.usermodel.XWPFDocument drawBarChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
        막대그래프를 작성함
        Parameters:
        doc - 워드 문서 객체
        Returns:
        막대그래프가 추가된 워드 문서 객체
      • drawPieChart

        public org.apache.poi.xwpf.usermodel.XWPFDocument drawPieChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
        원그래프를 작성함
        Parameters:
        doc - 워드 문서 객체
        Returns:
        원그래프가 추가된 워드 문서 객체
      • drawBoxChart

        public org.apache.poi.xwpf.usermodel.XWPFDocument drawBoxChart​(org.apache.poi.xwpf.usermodel.XWPFDocument doc)
        상자그림 그래프를 작성함
        Parameters:
        doc - 워드 문서 객체
        Returns:
        상자그림 그래프가 추가된 워드 문서 객체
      • getChartCount

        public int getChartCount()
        그릴 차트의 개수를 반환함(데이터의 양이 지나치게 많을 경우 차트를 나눠서 그림)
        Returns:
        그릴 차트의 개수
      • setXYData

        public void setXYData()
        차트에 들어갈 x축, y축 데이터를 정리하여 담음