001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.tag;
020
021import java.awt.Color;
022import java.io.Serializable;
023import java.util.ArrayList;
024
025public class ChartSeriesBean implements Serializable {
026
027        public static final int MARKER_STYLE_RECTANGLE = 0;
028        public static final int MARKER_STYLE_TRIANGLE = 1;
029        public static final int MARKER_STYLE_DIAMOND = 2;
030        public static final int MARKER_STYLE_CIRCLE = 3;
031        public static final int MARKER_STYLE_LETTER = 4;
032        public static final int MARKER_STYLE_MCROSS = 5;
033        public static final int MARKER_STYLE_SNOW = 6;
034        public static final int MARKER_STYLE_RCROSS = 7;
035
036        public static final int PAINT_STYLE_PLAIN = 0;
037        public static final int PAINT_STYLE_RAISE = 1;
038        public static final int PAINT_STYLE_SHADE = 2;
039        public static final int PAINT_STYLE_LIGHT = 3;
040        
041        public static final int TYPE_BAR = 0;
042        public static final int TYPE_LINE = 1;
043        public static final int TYPE_PYRAMID = 2;
044        public static final int TYPE_AREA = 3;
045        public static final int TYPE_HORIZONTALBAR = 4;
046        public static final int TYPE_CONE = 5;
047        public static final int TYPE_CURVE = 6;
048        public static final int TYPE_CYLINDER = 7;
049        public static final int TYPE_STEP = 8;
050        public static final int TYPE_SCATTER = 9;
051        public static final int TYPE_PIE = 10;
052        public static final int TYPE_TIME = 11;
053
054        public static final int DATA_LABEL_STYLE_NONE = 0;
055        public static final int DATA_LABEL_STYLE_VALUE = 1;
056        public static final int DATA_LABEL_STYLE_ROWLABEL = 2;
057        public static final int DATA_LABEL_STYLE_COLUMNLABEL = 3;
058        public static final int DATA_LABEL_STYLE_PATTERN = 4;
059
060        private Color[] colorlist=null;
061        private int markerStyle=MARKER_STYLE_RECTANGLE;
062        private int paintStyle=PAINT_STYLE_PLAIN;
063        private Color seriesColor;
064        private String seriesLabel;
065        private int type=TYPE_BAR;
066        private int dataLabelStyle=DATA_LABEL_STYLE_NONE;
067        private java.util.List datas=new ArrayList();
068        /**
069         * @return the colorlist
070         */
071        public Color[] getColorlist() {
072                if(colorlist==null) return new Color[0];
073                return colorlist;
074        }
075        /**
076         * @param colorlist the colorlist to set
077         */
078        public void setColorlist(Color[] colorlist) {
079                this.colorlist = colorlist;
080        }
081        /**
082         * @return the dataLabelStyle
083         */
084        public int getDataLabelStyle() {
085                return dataLabelStyle;
086        }
087        /**
088         * @param dataLabelStyle the dataLabelStyle to set
089         */
090        public void setDataLabelStyle(int dataLabelStyle) {
091                this.dataLabelStyle = dataLabelStyle;
092        }
093        
094
095        /**
096         * @return the markerStyle
097         */
098        public int getMarkerStyle() {
099                return markerStyle;
100        }
101        /**
102         * @param markerStyle the markerStyle to set
103         */
104        public void setMarkerStyle(int markerStyle) {
105                this.markerStyle = markerStyle;
106        }
107        /**
108         * @return the paintStyle
109         */
110        public int getPaintStyle() {
111                return paintStyle;
112        }
113        /**
114         * @param paintStyle the paintStyle to set
115         */
116        public void setPaintStyle(int paintStyle) {
117                this.paintStyle = paintStyle;
118        }
119        /**
120         * @return the seriesColor
121         */
122        public Color getSeriesColor() {
123                return seriesColor;
124        }
125        /**
126         * @param seriesColor the seriesColor to set
127         */
128        public void setSeriesColor(Color seriesColor) {
129                this.seriesColor = seriesColor;
130        }
131        /**
132         * @return the seriesLabel
133         */
134        public String getSeriesLabel() {
135                return seriesLabel;
136        }
137        /**
138         * @param seriesLabel the seriesLabel to set
139         */
140        public void setSeriesLabel(String seriesLabel) {
141                this.seriesLabel = seriesLabel;
142        }
143        /**
144         * @return the type
145         */
146        public int getType() {
147                return type;
148        }
149        /**
150         * @param type the type to set
151         */
152        public void setType(int type) {
153                this.type = type;
154        }
155        public void addChartData(ChartDataBean data) {
156                datas.add(data);
157        }
158        /**
159         * @return the datas
160         */
161        public java.util.List getDatas() {
162                return datas;
163        }
164        
165}