2 * Copyright (C) 2009 - 2012 SC 4ViewSoft SRL
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 package org.achartengine.renderer;
\r
18 import org.achartengine.chart.PointStyle;
\r
20 import android.graphics.Color;
\r
23 * A renderer for the XY type series.
\r
25 public class XYSeriesRenderer extends SimpleSeriesRenderer {
\r
26 /** If the chart points should be filled. */
\r
27 private boolean mFillPoints = false;
\r
28 /** If the chart should be filled below its line. */
\r
29 private boolean mFillBelowLine = false;
\r
30 /** The fill below the chart line color. */
\r
31 private int mFillColor = Color.argb(125, 0, 0, 200);
\r
32 /** The point style. */
\r
33 private PointStyle mPointStyle = PointStyle.POINT;
\r
34 /** The chart line width. */
\r
35 private float mLineWidth = 1;
\r
38 * Returns if the chart should be filled below the line.
\r
40 * @return the fill below line status
\r
42 public boolean isFillBelowLine() {
\r
43 return mFillBelowLine;
\r
47 * Sets if the line chart should be filled below its line. Filling below the
\r
48 * line transforms a line chart into an area chart.
\r
50 * @param fill the fill below line flag value
\r
52 public void setFillBelowLine(boolean fill) {
\r
53 mFillBelowLine = fill;
\r
57 * Returns if the chart points should be filled.
\r
59 * @return the points fill status
\r
61 public boolean isFillPoints() {
\r
66 * Sets if the chart points should be filled.
\r
68 * @param fill the points fill flag value
\r
70 public void setFillPoints(boolean fill) {
\r
75 * Returns the fill below line color.
\r
77 * @return the fill below line color
\r
79 public int getFillBelowLineColor() {
\r
84 * Sets the fill below the line color.
\r
86 * @param color the fill below line color
\r
88 public void setFillBelowLineColor(int color) {
\r
93 * Returns the point style.
\r
95 * @return the point style
\r
97 public PointStyle getPointStyle() {
\r
102 * Sets the point style.
\r
104 * @param style the point style
\r
106 public void setPointStyle(PointStyle style) {
\r
107 mPointStyle = style;
\r
111 * Returns the chart line width.
\r
113 * @return the line width
\r
115 public float getLineWidth() {
\r
120 * Sets the chart line width.
\r
122 * @param lineWidth the line width
\r
124 public void setLineWidth(float lineWidth) {
\r
125 mLineWidth = lineWidth;
\r