ChartDirector 7.0 (Java Edition)

PieChart


The PieChart class represents pie charts. It is a subclass of BaseChart. In ChartDirector, pie charts includes donut charts.

MethodInheritedDescription
PieChart(Self)Creates a new PieChart object.
setPieSize(Self)Sets the position and size of the pie in the pie chart.
setDonutSize(Self)Sets the position and size of the donut in the donut chart.
set3D(Self)Adds 3D effects to the pie.
set3D2(Self)Adds 3D effects to the pie, where each sector can have a different 3D depth.
setStartAngle(Self)Sets the angle of the first sector in the pie and the layout direction for the sectors.
setExplode(Self)Explode a sector from the pie.
setExplodeGroup(Self)Explode a group of sectors from the pie.
setLabelStyle(Self)Sets the style used to draw all sector labels.
setLabelFormat(Self)Sets the format of the all sector labels.
setLabelLayout(Self)Sets the layout method and location of the sector labels.
setLabelPos(Self)Sets the circular label layout method, and configure the join lines used to connect the sector labels to the sector perimeter.
setJoinLine(Self)Sets the color and width of the join lines used to connect the sector labels to the sector perimeter.
setLineColor(Self)Sets the sector edge color and join line color.
setSectorStyle(Self)Sets the sector shading style, edge color and edge width.
setData(Self)Sets the data used to draw the pie chart.
getSector(Self)Retrieves the Sector object representing a single sector in the pie chart.
setSizeBaseChartSets the size of the chart, exclusive of the drop shadow (if any).
getWidthBaseChartGets the width of the chart.
getHeightBaseChartGets the height of the chart.
getAbsOffsetXBaseChartGets the x offset of the chart relative to the outermost MultiChart container.
getAbsOffsetYBaseChartGets the y offset of the chart relative to the outermost MultiChart container.
setBackgroundBaseChartSets the background color, border color and 3D border effect of the chart.
setRoundedFrameBaseChartSets the border style of the chart to rounded corners.
setThickFrameBaseChartSets a thick frame around the chart.
setDropShadowBaseChartAdds a drop shadow to the chart.
setBorderBaseChartSets the border color of the chart.
setWallpaperBaseChartUses the image from the specified file or resource as the wallpaper to fill the background of the chart.
setBgImageBaseChartUses the image from the specified file or resource as the background image of the chart.
setSearchPathBaseChartSets the search path for loading image files.
setSearchPath2BaseChartSets the ClassLoader for loading images.
setSearchPath3BaseChartSearch for image files using the ServletContext and ServletRequest.
setSearchPath4BaseChartSearch for image files using a URL as the base path.
setResourceBaseChartAssigns a resource ID to a memory block to allow it to be referenced using a resource path.
setResource2BaseChartAssigns a resource ID to a DrawArea object to allow it to be referenced using a resource path.
setTransparentColorBaseChartSpecifies a certain color to mean transparent when creating a raster image output.
setAntiAliasBaseChartControls whether anti-alias is used when drawing lines, shapes and text.
addTitleBaseChartAdds a title at the top center of the chart.
addTitle2BaseChartAdds a title to the chart.
addLegendBaseChartAdds a legend box to the chart.
addLegend2BaseChartAdds a legend box to the chart with grid layout.
getLegendBaseChartGets the LegendBox object representing the legend box in the chart.
layoutLegendBaseChartLays out and gets the LegendBox object representing the legend box in the chart.
getDrawAreaBaseChartRetrieves the internal DrawArea object that is used to draw the chart.
addTextBaseChartAdds a text box to the chart.
addTableBaseChartAdds a CDML table to the chart.
addLineBaseChartAdds a line to the chart.
addExtraFieldBaseChartAdds an array of text to be used as an extra field in various places.
addExtraField2BaseChartAdds an array of numbers/dates to be used as an extra field in various places.
setColorBaseChartChange the color at the specified position in the palette.
setColorsBaseChartChange the colors in the palette.
setColors2BaseChartChange the colors in the palette, starting from the specified position in the palette.
getColorBaseChartGets the color at the specified position of the palette.
adjustBrightnessBaseChartCreates a color that is a darkened or brightened version of the given color.
halfColorBaseChartCreates a color that is half the intensity of the given color.
dashLineColorBaseChartCreates a dash line color.
patternColorBaseChartCreates a pattern color using an array of colors as the bitmap pattern.
patternColor2BaseChartCreates a pattern color by using the image from the specified file or resource as the pattern.
linearGradientColorBaseChartCreates a two-point linear gradient color.
linearGradientColor2BaseChartCreates a multi-point linear gradient color.
radialGradientColorBaseChartCreates a two-point radial gradient color.
radialGradientColor2BaseChartCreates a multi-point radial gradient color.
gradientColorBaseChartCreates a two-point linear gradient color.
gradientColor2BaseChartCreates a multi-point linear gradient color.
setDefaultFontsBaseChartSets the defaults for normal, bold, italic and bold-italic fonts.
setFontTableBaseChartSets an entry in the font table to the specified font name.
formatValueBaseChartFormats a number/date using the ChartDirector formatting syntax as is in Parameter Substitution and Formatting.
setNumberFormatBaseChartSets the characters used for thousand separator, decimal point, and negative sign.
setMonthNamesBaseChartSets the names of the months for date/time formatting purposes.
setWeekDayNamesBaseChartSets the names of the week days for date/time formatting purposes.
setAMPMBaseChartSets the names to be used to denote morning and afternoon.
layoutBaseChartPerform auto-scaling of the axes (if any) and compute the positions of the various objects in the chart.
makeImageBaseChartGenerates the chart as a java.awt.Image object.
enableVectorOutputBaseChartThis method is deprecated. It has no effect and may be removed in future versions of ChartDirector.
setOutputOptionsBaseChartSets output format options for the next chart output.
makeChartBaseChartGenerates the chart image and save it into a file.
makeChart2BaseChartGenerates the chart as an image in memory.
makeChart3BaseChartGenerates the chart in internal format and return a DrawArea object to allow adding custom drawings on top of the chart.
makeSessionBaseChartGenerates the chart as an image, saves it to a session variable and returns query parameters for loading the image.
makeTmpFileBaseChartGenerates the chart as an image and save it to a temporary file, and automatically remove old files.
initDynamicLayerBaseChartInitializes a dynamic layer for drawing text and shapes.
removeDynamicLayerBaseChartRemoves the dynamic layer if any.
getHTMLImageMapBaseChartGenerates an HTML image map to define hot spots and tooltips for the chart.
getJsChartModelBaseChartGets the Javascript Chart Model for passing to WebChartViewer.setChartModel for the purpose of supporting track cursors in a web application.
getChartMetricsBaseChartGets the chart metrics for passing to WebChartViewer.setChartMetrics to support viewports for web applications.