001 package railo.runtime.tag; 002 003 import railo.runtime.exp.ExpressionException; 004 import railo.runtime.ext.tag.TagImpl; 005 006 /** 007 * Displays a graphical representation of data. 008 * 009 * 010 * 011 **/ 012 public final class Graph extends TagImpl { 013 014 /** The font used for the item labels. */ 015 private String itemlabelfont; 016 017 /** The placement of the legend that identifies colors with the data labels. */ 018 private String showlegend; 019 020 /** Title to display centered above the chart, or below the chart if the legend is above the chart. */ 021 private String title; 022 023 /** The size the value text, in points. */ 024 private double valuelabelsize; 025 026 /** The size of the item labels, in points. */ 027 private double itemlabelsize; 028 029 /** Width of the graph line, in pixels. */ 030 private double fill; 031 032 /** Border color. */ 033 private String bordercolor; 034 035 /** Name of the query containing the data to graph. Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values. */ 036 private String query; 037 038 /** The font used to display data values. */ 039 private String valuelabelfont; 040 041 /** The font used to display the title. */ 042 private String titlefont; 043 044 /** An integer that specifies the number of grid lines to display on the chart between the top and bottom lines. */ 045 private double gridlines; 046 047 /** A URL to load when the user clicks any data point on the chart. */ 048 private String url; 049 050 /** Query column that contains the data values. 051 ** Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values. */ 052 private String valuecolumn; 053 054 /** Spacing between bars in the chart, in pixels. */ 055 private double barspacing; 056 057 /** Specifies whether to fill the area below the line with the line color to create an area graph. */ 058 private double linewidth; 059 060 /** Border thickness, in pixels. */ 061 private String borderwidth; 062 063 /** Specifies whether values are displayed for the data points. */ 064 private boolean showvaluelabel; 065 066 /** The minimum value of the graph value axis (the vertical axis for Bar charts, the horizontal axis for HorizontalBar charts). */ 067 private double scalefrom; 068 069 /** Specifies whether to put item labels on the horizontal axis of bar charts and the vertical axis of HorizontalBar charts. */ 070 private boolean showitemlabel; 071 072 /** Type of chart to display. */ 073 private String type; 074 075 /** Depth of 3D chart appearance, in pixels. */ 076 private double depth; 077 078 /** Query column containing URL information to load when the user clicks the corresponding data point. */ 079 private String urlcolumn; 080 081 /** The font used to display the legend. */ 082 private String legendfont; 083 084 /** Color of the chart background. */ 085 private String backgroundcolor; 086 087 /** Comma delimited list of colors to use for each data point. */ 088 private String colorlist; 089 090 /** The maximum value of the graph value axis. */ 091 private double scaleto; 092 093 /** Width of the graph, in pixels. Default is 320. */ 094 private double graphwidth; 095 096 /** Where value labels are placed. */ 097 private String valuelocation; 098 099 /** Query column that contains the item label for the corresponding data point. The item labels appear in the chart legend. */ 100 private String itemcolumn; 101 102 /** Orientation of item labels. */ 103 private String itemlabelorientation; 104 105 /** The color used to draw the data line. */ 106 private String linecolor; 107 108 /** Height of the graph, in pixels. Default is 240. */ 109 private double graphheight; 110 111 /** File type to be used for the output displayed in the browser. */ 112 private String fileformat; 113 114 115 /** 116 * constructor for the tag class 117 **/ 118 public Graph() throws ExpressionException { 119 throw new ExpressionException("tag cfgraph is deprecated"); 120 } 121 122 /** set the value itemlabelfont 123 * The font used for the item labels. 124 * @param itemlabelfont value to set 125 **/ 126 public void setItemlabelfont(String itemlabelfont) { 127 this.itemlabelfont=itemlabelfont; 128 } 129 130 /** set the value showlegend 131 * The placement of the legend that identifies colors with the data labels. 132 * @param showlegend value to set 133 **/ 134 public void setShowlegend(String showlegend) { 135 this.showlegend=showlegend; 136 } 137 138 /** set the value title 139 * Title to display centered above the chart, or below the chart if the legend is above the chart. 140 * @param title value to set 141 **/ 142 public void setTitle(String title) { 143 this.title=title; 144 } 145 146 /** set the value valuelabelsize 147 * The size the value text, in points. 148 * @param valuelabelsize value to set 149 **/ 150 public void setValuelabelsize(double valuelabelsize) { 151 this.valuelabelsize=valuelabelsize; 152 } 153 154 /** set the value itemlabelsize 155 * The size of the item labels, in points. 156 * @param itemlabelsize value to set 157 **/ 158 public void setItemlabelsize(double itemlabelsize) { 159 this.itemlabelsize=itemlabelsize; 160 } 161 162 /** set the value fill 163 * Width of the graph line, in pixels. 164 * @param fill value to set 165 **/ 166 public void setFill(double fill) { 167 this.fill=fill; 168 } 169 170 /** set the value bordercolor 171 * Border color. 172 * @param bordercolor value to set 173 **/ 174 public void setBordercolor(String bordercolor) { 175 this.bordercolor=bordercolor; 176 } 177 178 /** set the value query 179 * Name of the query containing the data to graph. Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values. 180 * @param query value to set 181 **/ 182 public void setQuery(String query) { 183 this.query=query; 184 } 185 186 /** set the value valuelabelfont 187 * The font used to display data values. 188 * @param valuelabelfont value to set 189 **/ 190 public void setValuelabelfont(String valuelabelfont) { 191 this.valuelabelfont=valuelabelfont; 192 } 193 194 /** set the value titlefont 195 * The font used to display the title. 196 * @param titlefont value to set 197 **/ 198 public void setTitlefont(String titlefont) { 199 this.titlefont=titlefont; 200 } 201 202 /** set the value gridlines 203 * An integer that specifies the number of grid lines to display on the chart between the top and bottom lines. 204 * @param gridlines value to set 205 **/ 206 public void setGridlines(double gridlines) { 207 this.gridlines=gridlines; 208 } 209 210 /** set the value url 211 * A URL to load when the user clicks any data point on the chart. 212 * @param url value to set 213 **/ 214 public void setUrl(String url) { 215 this.url=url; 216 } 217 218 /** set the value valuecolumn 219 * Query column that contains the data values. 220 * Required if you do not use cfgraphdata tags in the cfgraph tag body to specify the data values. 221 * @param valuecolumn value to set 222 **/ 223 public void setValuecolumn(String valuecolumn) { 224 this.valuecolumn=valuecolumn; 225 } 226 227 /** set the value barspacing 228 * Spacing between bars in the chart, in pixels. 229 * @param barspacing value to set 230 **/ 231 public void setBarspacing(double barspacing) { 232 this.barspacing=barspacing; 233 } 234 235 /** set the value linewidth 236 * Specifies whether to fill the area below the line with the line color to create an area graph. 237 * @param linewidth value to set 238 **/ 239 public void setLinewidth(double linewidth) { 240 this.linewidth=linewidth; 241 } 242 243 /** set the value borderwidth 244 * Border thickness, in pixels. 245 * @param borderwidth value to set 246 **/ 247 public void setBorderwidth(String borderwidth) { 248 this.borderwidth=borderwidth; 249 } 250 251 /** set the value showvaluelabel 252 * Specifies whether values are displayed for the data points. 253 * @param showvaluelabel value to set 254 **/ 255 public void setShowvaluelabel(boolean showvaluelabel) { 256 this.showvaluelabel=showvaluelabel; 257 } 258 259 /** set the value scalefrom 260 * The minimum value of the graph value axis (the vertical axis for Bar charts, the horizontal axis for HorizontalBar charts). 261 * @param scalefrom value to set 262 **/ 263 public void setScalefrom(double scalefrom) { 264 this.scalefrom=scalefrom; 265 } 266 267 /** set the value showitemlabel 268 * Specifies whether to put item labels on the horizontal axis of bar charts and the vertical axis of HorizontalBar charts. 269 * @param showitemlabel value to set 270 **/ 271 public void setShowitemlabel(boolean showitemlabel) { 272 this.showitemlabel=showitemlabel; 273 } 274 275 /** set the value type 276 * Type of chart to display. 277 * @param type value to set 278 **/ 279 public void setType(String type) { 280 this.type=type; 281 } 282 283 /** set the value depth 284 * Depth of 3D chart appearance, in pixels. 285 * @param depth value to set 286 **/ 287 public void setDepth(double depth) { 288 this.depth=depth; 289 } 290 291 /** set the value urlcolumn 292 * Query column containing URL information to load when the user clicks the corresponding data point. 293 * @param urlcolumn value to set 294 **/ 295 public void setUrlcolumn(String urlcolumn) { 296 this.urlcolumn=urlcolumn; 297 } 298 299 /** set the value legendfont 300 * The font used to display the legend. 301 * @param legendfont value to set 302 **/ 303 public void setLegendfont(String legendfont) { 304 this.legendfont=legendfont; 305 } 306 307 /** set the value backgroundcolor 308 * Color of the chart background. 309 * @param backgroundcolor value to set 310 **/ 311 public void setBackgroundcolor(String backgroundcolor) { 312 this.backgroundcolor=backgroundcolor; 313 } 314 315 /** set the value colorlist 316 * Comma delimited list of colors to use for each data point. 317 * @param colorlist value to set 318 **/ 319 public void setColorlist(String colorlist) { 320 this.colorlist=colorlist; 321 } 322 323 /** set the value scaleto 324 * The maximum value of the graph value axis. 325 * @param scaleto value to set 326 **/ 327 public void setScaleto(double scaleto) { 328 this.scaleto=scaleto; 329 } 330 331 /** set the value graphwidth 332 * Width of the graph, in pixels. Default is 320. 333 * @param graphwidth value to set 334 **/ 335 public void setGraphwidth(double graphwidth) { 336 this.graphwidth=graphwidth; 337 } 338 339 /** set the value valuelocation 340 * Where value labels are placed. 341 * @param valuelocation value to set 342 **/ 343 public void setValuelocation(String valuelocation) { 344 this.valuelocation=valuelocation; 345 } 346 347 /** set the value itemcolumn 348 * Query column that contains the item label for the corresponding data point. The item labels appear in the chart legend. 349 * @param itemcolumn value to set 350 **/ 351 public void setItemcolumn(String itemcolumn) { 352 this.itemcolumn=itemcolumn; 353 } 354 355 /** set the value itemlabelorientation 356 * Orientation of item labels. 357 * @param itemlabelorientation value to set 358 **/ 359 public void setItemlabelorientation(String itemlabelorientation) { 360 this.itemlabelorientation=itemlabelorientation; 361 } 362 363 /** set the value linecolor 364 * The color used to draw the data line. 365 * @param linecolor value to set 366 **/ 367 public void setLinecolor(String linecolor) { 368 this.linecolor=linecolor; 369 } 370 371 /** set the value graphheight 372 * Height of the graph, in pixels. Default is 240. 373 * @param graphheight value to set 374 **/ 375 public void setGraphheight(double graphheight) { 376 this.graphheight=graphheight; 377 } 378 379 /** set the value fileformat 380 * File type to be used for the output displayed in the browser. 381 * @param fileformat value to set 382 **/ 383 public void setFileformat(String fileformat) { 384 this.fileformat=fileformat; 385 } 386 387 388 /** 389 * @see javax.servlet.jsp.tagext.Tag#doStartTag() 390 */ 391 public int doStartTag() { 392 return SKIP_BODY; 393 } 394 395 /** 396 * @see javax.servlet.jsp.tagext.Tag#doEndTag() 397 */ 398 public int doEndTag() { 399 return EVAL_PAGE; 400 } 401 402 /** 403 * @see javax.servlet.jsp.tagext.Tag#release() 404 */ 405 public void release() { 406 super.release(); 407 itemlabelfont=""; 408 showlegend=""; 409 title=""; 410 valuelabelsize=0d; 411 itemlabelsize=0d; 412 fill=0d; 413 bordercolor=""; 414 query=""; 415 valuelabelfont=""; 416 titlefont=""; 417 gridlines=0d; 418 url=""; 419 valuecolumn=""; 420 barspacing=0d; 421 linewidth=0d; 422 borderwidth=""; 423 showvaluelabel=false; 424 scalefrom=0d; 425 showitemlabel=false; 426 type=""; 427 depth=0d; 428 urlcolumn=""; 429 legendfont=""; 430 backgroundcolor=""; 431 colorlist=""; 432 scaleto=0d; 433 graphwidth=0d; 434 valuelocation=""; 435 itemcolumn=""; 436 itemlabelorientation=""; 437 linecolor=""; 438 graphheight=0d; 439 fileformat=""; 440 } 441 }