001 package railo.runtime.tag; 002 003 import railo.runtime.exp.ExpressionException; 004 import railo.runtime.ext.tag.TagImpl; 005 006 /** 007 * Specifies a data point to be displayed by a cfgraph tag. 008 * 009 * 010 * 011 **/ 012 public final class GraphData extends TagImpl { 013 014 /** The item label for the data point. The item labels appear on the horizontal axis of Line and 015 ** Bar charts, the vertical axis of Horizontal Bar charts, and in the legend of Pie charts. */ 016 private String item; 017 018 /** The color to use when graphing the data point. The default is to use the values from the cfgraph 019 ** tag colorlist attribute or the built-in default list of colors. Line graphs ignore this attribute. */ 020 private String color; 021 022 /** Value to be represented by the data point. */ 023 private String value; 024 025 /** A URL to load when the user clicks the data point. This attribute works with Pie, Bar, and 026 ** HorizontalBar charts. This attribute has an effect only if the graph is in Flash file format. */ 027 private String url; 028 029 030 /** 031 * constructor for the tag class 032 **/ 033 public GraphData() throws ExpressionException { 034 throw new ExpressionException("tag cfgraphdata is deprecated"); 035 } 036 037 /** set the value item 038 * The item label for the data point. The item labels appear on the horizontal axis of Line and 039 * Bar charts, the vertical axis of Horizontal Bar charts, and in the legend of Pie charts. 040 * @param item value to set 041 **/ 042 public void setItem(String item) { 043 this.item=item; 044 } 045 046 /** set the value color 047 * The color to use when graphing the data point. The default is to use the values from the cfgraph 048 * tag colorlist attribute or the built-in default list of colors. Line graphs ignore this attribute. 049 * @param color value to set 050 **/ 051 public void setColor(String color) { 052 this.color=color; 053 } 054 055 /** set the value value 056 * Value to be represented by the data point. 057 * @param value value to set 058 **/ 059 public void setValue(String value) { 060 this.value=value; 061 } 062 063 /** set the value url 064 * A URL to load when the user clicks the data point. This attribute works with Pie, Bar, and 065 * HorizontalBar charts. This attribute has an effect only if the graph is in Flash file format. 066 * @param url value to set 067 **/ 068 public void setUrl(String url) { 069 this.url=url; 070 } 071 072 073 /** 074 * @see javax.servlet.jsp.tagext.Tag#doStartTag() 075 */ 076 public int doStartTag() { 077 return SKIP_BODY; 078 } 079 080 /** 081 * @see javax.servlet.jsp.tagext.Tag#doEndTag() 082 */ 083 public int doEndTag() { 084 return EVAL_PAGE; 085 } 086 087 /** 088 * @see javax.servlet.jsp.tagext.Tag#release() 089 */ 090 public void release() { 091 super.release(); 092 item=""; 093 color=""; 094 value=""; 095 url=""; 096 } 097 }