diff --git a/docs/AREA_PLOT.md b/docs/AREA_PLOT.md new file mode 100644 index 0000000..f80e9a7 --- /dev/null +++ b/docs/AREA_PLOT.md @@ -0,0 +1,155 @@ +# Jplotlib.areaPlot() + +The `areaPlot()` method in the `Jplotlib.areaPlot()` allows you to create 2D area plots with ease. This method is designed to visualize datasets using y-coordinates and x-coordinates: + +## Method Signatures +`areaPlot(double[] xPoints, double[] yPoints)`: + - Description: Plots a 2D area chart using the given x-coordinates and y-coordinates. + - Example usage: + ```java + double[] xCoords = {1.0, 2.0, 3.0, 4.0}; + double[] yCoords = {2.5, 5.1, 3.9, 6.2}; + new Jplotlib.areaPlot(xCoords, yCoords); + ``` + + +## Area Color + +To customize the color of the area in the chart, you can use the `.color()` method available in the Jplotlib library. This method allows you to specify the color using either the `LibColor` enum from Jplotlib or the `java.awt.Color` class. + +### Using `LibColor` from Jplotlib: + +The `LibColor` enum provides a set of predefined colors that you can use to style the line in your plot. Here's an example of how to use it: + +```java +import io.github.manishdait.jplotlib.Jplotlib; +import io.github.manishdait.jplotlib.defaults.color.LibColor; + +public class App { + public static void main(String[] args) { + Jplotlib jplotlib = new Jplotlib(); + double[] y = {6, 2, 7, 11}; + double[] x = {1, 2, 3, 4}; + jplotlib.areaPlot(x, y) + .color(LibColor.LIME.getColor()); + jplotlib.show(); + } +} +``` + +In this example, we use the `.color(LibColor.LIME.getColor())` method to set the color of the line to lime. + +area_eg1.png + +For more information about the `LibColor` enum and the available colors, refer to the [LibColor Enum section](LIB_COLOR.md). + + +### Using `java.awt.Color`: + +If you prefer to use the `java.awt.Color` class, you can do so as follows: + +```java +import java.awt.Color; +import io.github.manishdait.jplotlib.Jplotlib; + +public class App { + public static void main(String[] args) { + Jplotlib jplotlib = new Jplotlib(); + double[] y = {6, 2, 7, 11}; + double[] x = {1, 2, 3, 4}; + jplotlib.areaPlot(x, y) + .color(Color.RED); + jplotlib.show(); + } +} +``` + +In this example, we use the `.color(Color.RED)` method to set the color of the line to red. + +area_eg2.png + +Whichever method you choose, the `.color()` method allows you to customize the appearance of your line plots with different colors according to your preferences. + + +## Alpha + +In Jplotlib, you can adjust the transparency of the area in area plots using the `.alpha()` method. This feature allows you to control the opacity of area, making the area plot visually more informative and expressive. + +### Example Usage: + +```java +import io.github.manishdait.jplotlib.Jplotlib; + +public class App { + public static void main(String[] args) { + double[] x = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; + double[] y = {99,86,87,88,111,86,103,87,94,78,77,85,86}; + + Jplotlib jplotlib = new Jplotlib(); + jplotlib.areaPlot(x, y) + .alpha(0.5F); + jplotlib.show(); + } +} +``` + +In this example, we use the `.alpha()` argument with the areaPlot() method to set the transparency (opacity) of the aarea in the area plot. The `alphaValue` is a float value between 0 and 1, where 0 means completely transparent (invisible) area, and 1 means completely opaque (fully visible) area. + +By adjusting the transparency of the area, you can reveal underlying patterns in the data, especially when data points overlap closely together. It helps in visualizing the density of data points and identifying areas with overlaping concentration. + +area_eg3.png + + + + +## Multiples Lines + +You can plot as many area chart as you like by simply adding more `Jplotlib.areaPlot()` method calls: + +### Example Usage: + +```java +import io.github.manishdait.jplotlib.Jplotlib; + +public class App { + public static void main(String[] args) { + Jplotlib jplotlib = new Jplotlib(); + double[] x1 = {0, 1, 2, 3}; + double[] x2 = {2, 3, 4, 5}; + double[] y1 = {6, 2, 7, 11}; + double[] y2 = {3, 8, 1, 10}; + jplotlib.areaPlot(x1, y1); + jplotlib.areaPlot(x2, y2); + jplotlib.show(); + } +} +``` + +In this example, we create two sets of y-coordinates (`y1` and `y2`) and two sets of x-coordinates (`x1` and `x2`) and plot them using two separate `Jplotlib.areaPlot()` method calls. + +area_eg4.png + +### Example Usage: + +```java +import io.github.manishdait.jplotlib.Jplotlib; + +public class App { + public static void main(String[] args) { + Jplotlib jplotlib = new Jplotlib(); + double[] x1 = {0, 1, 2, 3}; + double[] x2 = {2, 3, 4, 5}; + double[] y1 = {6, 2, 7, 11}; + double[] y2 = {3, 8, 1, 10}; + jplotlib.areaPlot(x1, y1); + jplotlib.areaPlot(x2, y2).alpha(0.3f); + jplotlib.show(); + } +} +``` + +In this example, we create two sets of y-coordinates (`y1` and `y2`) similar to above example but with alpha. + +area_eg5.png + + diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 2d4c9b3..93bd72d 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -9,6 +9,7 @@ Jplotlib is a Java library that allows you to create 2D line plots, scatter plot - [Creating a Scatter Plot](#creating-a-scatter-plot) - [Creating a Bar Graph](#creating-a-bar-graph) - [Creating a Pie Chart](#creating-a-pie-chart) +- [CReating a Area PLot](#creating-a-area-plot) ## Installation @@ -88,6 +89,19 @@ jplotlib.pie(dataPoints); More information about pie charts can be found in the [PIE.md](PIE.md) document. +## Creating a Area Plot + +To create a 2D area plot using Jplotlib, follow the same steps as above, by using the `areaPlot()` method. + +```java +double[] x = {1.0, 2.0, 3.0, 4.0}; +double[] y = {2.5, 5.1, 3.9, 6.2}; +jplotlib.areaPlot(x, y); +``` + +You can find more information about scatter plots in the [AREA_PLOT.md](AREA_PLOT.md) document. + + That's it! You now have the basic knowledge to create various types of visualizations using Jplotlib. Experiment with different data and customization options to create meaningful plots and charts. diff --git a/docs/assets/area/area_EG1.png b/docs/assets/area/area_EG1.png new file mode 100644 index 0000000..93a4332 Binary files /dev/null and b/docs/assets/area/area_EG1.png differ diff --git a/docs/assets/area/area_EG2.png b/docs/assets/area/area_EG2.png new file mode 100644 index 0000000..76bebb1 Binary files /dev/null and b/docs/assets/area/area_EG2.png differ diff --git a/docs/assets/area/area_EG3.png b/docs/assets/area/area_EG3.png new file mode 100644 index 0000000..8457f60 Binary files /dev/null and b/docs/assets/area/area_EG3.png differ diff --git a/docs/assets/area/area_EG4.png b/docs/assets/area/area_EG4.png new file mode 100644 index 0000000..f5ac2e8 Binary files /dev/null and b/docs/assets/area/area_EG4.png differ diff --git a/docs/assets/area/area_EG5.png b/docs/assets/area/area_EG5.png new file mode 100644 index 0000000..0fc6b4c Binary files /dev/null and b/docs/assets/area/area_EG5.png differ diff --git a/pom.xml b/pom.xml index c7b72db..8c7f55d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.github.manishdait jplotlib - 1.1.0 + 1.2.0 jplotlib https://github.com/ManishDait/jplotlib diff --git a/src/main/java/io/github/manishdait/jplotlib/Jplotlib.java b/src/main/java/io/github/manishdait/jplotlib/Jplotlib.java index fb503b3..99525b8 100755 --- a/src/main/java/io/github/manishdait/jplotlib/Jplotlib.java +++ b/src/main/java/io/github/manishdait/jplotlib/Jplotlib.java @@ -27,6 +27,8 @@ import java.util.ArrayList; import java.util.List; +import io.github.manishdait.jplotlib.charts.area.AreaChart; +import io.github.manishdait.jplotlib.charts.area.AreaChartOption; import io.github.manishdait.jplotlib.charts.bar.BarGraph; import io.github.manishdait.jplotlib.charts.bar.BarGraphOptions; import io.github.manishdait.jplotlib.charts.helper.Graph; @@ -74,7 +76,8 @@ public final class Jplotlib implements LineChartOptions, ScatterChartOptions, BarGraphOptions, - PieChartOptions { + PieChartOptions, + AreaChartOption { protected Window window; protected Config axisConfiguration; @@ -295,4 +298,16 @@ public PieChart pie(double[] dataPoints, String[] labels) { isPlotable = true; return pieChart; } + + // Area Chart + + @Override + public AreaChart areaPlot(double[] xPoints, double[] yPoints) { + setAxisType(AxisType.PLOT); + setAxisParameters(xPoints, yPoints); + AreaChart areaChart = new AreaChart(new CartesianData(xPoints, yPoints)); + graphs.add(areaChart); + isPlotable = true; + return areaChart; + } } diff --git a/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChart.java b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChart.java new file mode 100644 index 0000000..a139701 --- /dev/null +++ b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChart.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 Manish Dait + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package io.github.manishdait.jplotlib.charts.area; + +import java.awt.Color; + +import io.github.manishdait.jplotlib.charts.helper.Graph; +import io.github.manishdait.jplotlib.data.util.Data; +import io.github.manishdait.jplotlib.internals.util.ChartType; + +/** + * The AreaChart class implements the Graph interface and represents a area + * chart. + * It allows plotting area chart using polygon with customizable styles. + * + */ +public class AreaChart implements Graph { + + private Data data; + private AreaChartStyle style; + private static final ChartType CHART_TYPE = ChartType.AREA; + + /** + * Constructs a AreaChart with the provided data coordinates and initializes + * default style settings. + * + * @param data + * The data coordinates to be plotted on the area chart. + */ + public AreaChart(Data data) { + this.data = data; + this.style = new AreaChartStyle(); + } + + public Data getData() { + return data; + } + + public void setData(Data data) { + this.data = data; + } + + public AreaChartStyle getStyle() { + return style; + } + + public void setStyle(AreaChartStyle style) { + this.style = style; + } + + public static ChartType getChartType() { + return CHART_TYPE; + } + + public AreaChart color(Color color) { + style.setColor(color); + return this; + } + + public AreaChart alpha(float alpha) { + if (alpha > 1 || alpha < 0) { + alpha = 1; + } + style.setAlpha(alpha); + return this; + } + +} diff --git a/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartOption.java b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartOption.java new file mode 100644 index 0000000..3a34193 --- /dev/null +++ b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartOption.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2023 Manish Dait + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package io.github.manishdait.jplotlib.charts.area; + +/** + * The AreaChartOptions interface defines methods related to creating area + * charts. + * Implementations of this interface are expected to provide functionality for + * generating + * AreaChart objects based on given x and y data points. + * + */ +public interface AreaChartOption { + + /** + * Creates a AreaChart with the provided x and y data points. + * + * @param xPoints + * An array of double values representing the x-axis data points. + * @param yPoints + * An array of double values representing the y-axis data points. + * @return AreaChart An object representing a area chart constructed using + * the given data. + */ + AreaChart areaPlot(double[] xPoints, double[] yPoints); + +} diff --git a/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartPotter.java b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartPotter.java new file mode 100644 index 0000000..8bf5358 --- /dev/null +++ b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartPotter.java @@ -0,0 +1,159 @@ +/* + * MIT License + * + * Copyright (c) 2023 Manish Dait + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package io.github.manishdait.jplotlib.charts.area; + +import javax.swing.JPanel; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; + +import io.github.manishdait.jplotlib.charts.helper.Plotter; +import io.github.manishdait.jplotlib.data.CartesianData; +import io.github.manishdait.jplotlib.defaults.color.PlotColor; +import io.github.manishdait.jplotlib.internals.components.axis.Config; + +/** + * The AreaChartPlotter class is responsible for rendering AreaChart + * objects on a JPanel by drawing + * individual data polygon based on the provided axis configuration, coordinates + * and style information. + * + */ +public class AreaChartPotter implements Plotter { + + private Graphics2D g; + private AreaChart areaGraph; + private int indx; + + private int yValDiff; + private int xValDiff; + + private int xIncrement; + private int yIncrement; + + private int xLowerBound; + private int yLowerBound; + private double[] xPoints; + private double[] yPoints; + + private int heigth; + + /** + * Constructs a AreaChartPlotter with the necessary rendering context and + * chart data. + * + * @param g + * The Graphics object used for rendering. + * @param context + * The JPanel where the area chart will be drawn. + * @param axisConfiguration + * The configuration for rendering the axis. + * @param areaGraph + * The AreaChart object containing data to be plotted. + * @param indx + * The index used for styling multiple charts. + */ + public AreaChartPotter(Graphics g, + JPanel context, + Config axisConfiguration, + AreaChart areaGraph, + int indx) { + this.g = (Graphics2D) g; + this.areaGraph = areaGraph; + this.indx = indx; + this.heigth = context.getHeight(); + + this.yValDiff = axisConfiguration.getyValDiff(); + this.xValDiff = axisConfiguration.getxValDiff(); + + this.xIncrement = axisConfiguration.getxIncrement(); + this.yIncrement = axisConfiguration.getyIncrement(); + + this.xLowerBound = axisConfiguration.getxLowerBound(); + this.yLowerBound = axisConfiguration.getyLowerBound(); + } + + @Override + public void draw() { + xPoints = ((CartesianData) areaGraph.getData()).getxPoints(); + yPoints = ((CartesianData) areaGraph.getData()).getyPoints(); + + int[] xTemp = new int[xPoints.length + 2]; + int[] yTemp = new int[yPoints.length + 2]; + + this.g.setRenderingHint( + RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + + int extraSpace = (int) (Math.min(xIncrement, yIncrement) * 0.5); + + for (int i = 0; i < xPoints.length; i++) { + xTemp[i+1] = ((int)(xIncrement * (xPoints[i] - xLowerBound)) / xValDiff) + extraSpace; + } + + for (int i = 0; i < xPoints.length; i++) { + yTemp[i+1] = (heigth - (int)(yIncrement * (yPoints[i] - yLowerBound)) / yValDiff) - extraSpace; + } + + xTemp[0] = ((int)(xIncrement * (xPoints[0] - xLowerBound)) / xValDiff) + extraSpace; + yTemp[0] = (heigth - (yIncrement * (0 - yLowerBound)) / yValDiff) - extraSpace; + + xTemp[xTemp.length - 1] = ((int)(xIncrement * (xPoints[xPoints.length - 1] - xLowerBound)) / xValDiff) + extraSpace; + yTemp[yTemp.length - 1] = (heigth - (yIncrement * (0 - yLowerBound)) / yValDiff) - extraSpace; + Color color = areaGraph.getStyle().getColor(); + if (color == null) { + color = PlotColor.getColor(indx); + } + + g.setColor(color); + g.drawPolygon(xTemp, yTemp, xTemp.length); + + color = setAlpa(color); + g.setColor(color); + g.fillPolygon(xTemp, yTemp, xTemp.length); + + } + + /** + * Adjusts the alpha (transparency) level of the provided color based on style + * information + * to ensure proper rendering of the area chart. + * + * @param color + * The input color for which alpha will be adjusted. + * @return Color The adjusted color with alpha transparency applied. + */ + private Color setAlpa(Color color) { + Color currColor = color; + float alpha = areaGraph.getStyle().getAlpha(); + if (alpha < 0 || alpha > 1) { + alpha = 1; + } + return new Color(currColor.getRed(), currColor.getGreen(), currColor.getBlue(), (int) (alpha * 255)); + } + +} diff --git a/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartStyle.java b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartStyle.java new file mode 100644 index 0000000..3921334 --- /dev/null +++ b/src/main/java/io/github/manishdait/jplotlib/charts/area/AreaChartStyle.java @@ -0,0 +1,63 @@ +/* + * MIT License + * + * Copyright (c) 2023 Manish Dait + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package io.github.manishdait.jplotlib.charts.area; + +import java.awt.Color; + +/** + * The AreaChartStyle class holds style properties for configuring the + * appearance of a area chart. + * It includes settings for colors, and alpha. + * + */ +public class AreaChartStyle { + + private Color color; + private float alpha; + + /** + * Constructs a AreaChartStyle with default style settings. + */ + public AreaChartStyle () { + this.color = null; + this.alpha = 1F; + } + + public Color getColor() { + return color; + } + + public void setColor(Color color) { + this.color = color; + } + + public float getAlpha() { + return alpha; + } + + public void setAlpha(float alpha) { + this.alpha = alpha; + } + +} diff --git a/src/main/java/io/github/manishdait/jplotlib/charts/helper/GraphPlotter.java b/src/main/java/io/github/manishdait/jplotlib/charts/helper/GraphPlotter.java index a0f6e80..ce908ed 100755 --- a/src/main/java/io/github/manishdait/jplotlib/charts/helper/GraphPlotter.java +++ b/src/main/java/io/github/manishdait/jplotlib/charts/helper/GraphPlotter.java @@ -29,6 +29,8 @@ import javax.swing.JPanel; +import io.github.manishdait.jplotlib.charts.area.AreaChart; +import io.github.manishdait.jplotlib.charts.area.AreaChartPotter; import io.github.manishdait.jplotlib.charts.bar.BarGraph; import io.github.manishdait.jplotlib.charts.bar.BarGraphPlotter; import io.github.manishdait.jplotlib.charts.line.LineChart; @@ -81,6 +83,10 @@ else if (graphs.get(i) instanceof ScatterChart) { else if (graphs.get(i) instanceof BarGraph) { new BarGraphPlotter(g, this, axisConfiguration, (BarGraph) graphs.get(i), i).draw(); } + + else if (graphs.get(i) instanceof AreaChart) { + new AreaChartPotter(g, this, axisConfiguration, (AreaChart) graphs.get(i), i).draw(); + } } } } diff --git a/src/main/java/io/github/manishdait/jplotlib/internals/util/ChartType.java b/src/main/java/io/github/manishdait/jplotlib/internals/util/ChartType.java index d5f5ce4..04d2242 100755 --- a/src/main/java/io/github/manishdait/jplotlib/internals/util/ChartType.java +++ b/src/main/java/io/github/manishdait/jplotlib/internals/util/ChartType.java @@ -56,6 +56,11 @@ public enum ChartType { /** * The PIE chart type represents a pie chart. */ - PIE; + PIE, + + /** + * The AREA chart type represents a area chart. + */ + AREA; }