类 WebChartData

java.lang.Object
com.sh.javax.util.WebChartData

public class WebChartData extends Object
WebChart类,主要功能是将Datastore数据转换为符合WebChart模型规范的xml

Title: 基础类库

Description: 适合Struts结构体系

Company:首亨软件(重庆)有限公司

  • 构造器详细资料

    • WebChartData

      public WebChartData()
      无参数的构造函数
    • WebChartData

      public WebChartData(Datastore ds)
      构造函数
      参数:
      ds - Datastore表示图表的数据集
    • WebChartData

      public WebChartData(Datastore ds, String xcol, String ycol, String scol, String sizecol)
      构造函数
      参数:
      ds - Datastore 表示图表的数据集
      xcol - String x轴对应Datastore中的列名
      ycol - String y轴对应Datastore中的列名
      scol - String series轴对应Datastore中的列名
      sizecol - String size轴对应Datastore中的列名
  • 方法详细资料

    • setDatastore

      public void setDatastore(Datastore ds)
      设置Datastore数据集
      参数:
      ds - Datastore 数据集对象
    • getDatastore

      public Datastore getDatastore()
      获取Datastore数据集
      返回:
      Datastore 数据集对象s
    • setXCol

      public void setXCol(String xcol)
      设置x轴对应到Datastore的列名
      参数:
      xcol - String
    • getXCol

      public String getXCol()
      获取x轴对应到Datastore的列名
      返回:
      String
    • setYCol

      public void setYCol(String ycol)
      设置y轴对应到Datastore的列名
      参数:
      ycol - String
    • getYCol

      public String getYCol()
      获取y轴对应到Datastore的列名
      返回:
      String
    • setSCol

      public void setSCol(String scol)
      设置series轴对应到Datastore的列名
      参数:
      scol - String
    • getSCol

      public String getSCol()
      获取series轴对应到Datastore的列名
      返回:
      String
    • setSizeCol

      public void setSizeCol(String sizecol)
      设置size轴对应到Datastore的列名
      参数:
      sizecol - String
    • getSizeCol

      public String getSizeCol()
      获取size轴对应到Datastore的列名
      返回:
      String
    • initMap

      public void initMap() throws Exception
      根据Datastore和各轴对应列名初始化各轴HashMap
      抛出:
      Exception - Exception
    • toXml

      public String toXml() throws Exception
      生成xml
      返回:
      String xml字符串
      抛出:
      Exception - Exception
    • setSort

      public void setSort(boolean sort)
      设置字段是否排序
      参数:
      sort - boolean true按照xcol排序;false保持原来的顺序
    • isSort

      public boolean isSort()
      获取是否按照xcol排序
      返回:
      boolean true按照xcol排序;false保持原来的顺序