In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what JFreeChart API in java, I believe most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
JFreeChart is currently the best java graphics solution, which can basically meet the current graphics needs, including the following aspects:
JFreeChart class:
Void setAntiAlias (boolean flag) fonts blur boundaries
Void setBackgroundImage (Image image) background picture
Void setBackgroundImageAlignment (int alignment) background picture alignment (parameter constant is defined in the org.jfree.ui.Align class)
Void setBackgroundImageAlpha (float alpha) background picture transparency (0.01mm 1.0)
Void setBackgroundPaint (Paint paint) background color
Void setBorderPaint (Paint paint) Boundary Line Color
Void setBorderStroke (Stroke stroke) boundary line strokes
Is the void setBorderVisible (boolean visible) boundary line visible?
TextTitle class:
Void setFont (Font font) title font
Void setPaint (Paint paint) title font color
Void setText (String text) title content
StandardLegend (Legend) class:
Void setBackgroundPaint (Paint paint) graphic background color
Void setTitle (String title) Icon title content
Void setTitleFont (Font font) Icon title font
Void setBoundingBoxArcWidth (int arcWidth) diagram shows the width of the boundary fillet
Void setBoundingBoxArcHeight (int arcHeight) diagram shows the height of the boundary fillet
Void setOutlinePaint (Paint paint) Illustrated Boundary Line Color
Void setOutlineStroke (Stroke stroke) Illustrated Boundary Line Stroke
Whether the void setDisplaySeriesLines (boolean flag) graphic item displays horizontal lines (line chart is valid)
Whether the void setDisplaySeriesShapes (boolean flag) graphic item displays the shape (line chart is valid)
Void setItemFont (Font font) icon font
Void setItemPaint (Paint paint) icon font color
The void setAnchor (int anchor) diagram shows where it appears in the chart (parameter constants are defined in the Legend class)
Axis class:
Whether the void setVisible (boolean flag) axis is visible
Void setAxisLinePaint (Paint paint) axis line color (invalid 3D axis)
Void setAxisLineStroke (Stroke stroke) axis line stroke (invalid 3D axis)
Whether the lines of the void setAxisLineVisible (boolean visible) axis are visible (invalid 3D axis)
Void setFixedDimension (double dimension) (for setting multiple axes in a composite table)
Void setLabel (String label) axis title
Void setLabelFont (Font font) axis title font
Void setLabelPaint (Paint paint) axis title color
Void setLabelAngle (double angle) `Axis title rotation angle (ordinates can be rotated)
Void setTickLabelFont (Font font) axis ruler value font
Void setTickLabelPaint (Paint paint) axis ruler value color
Whether the void setTickLabelsVisible (boolean flag) axis ruler value is displayed
Void setTickMarkPaint (Paint paint) axis ruler color
Void setTickMarkStroke (Stroke stroke) axis ruler stroke
Whether the void setTickMarksVisible (boolean flag) axis ruler is displayed
ValueAxis (Axis) class:
Void setAutoRange (boolean auto) automatically sets the data range of the data axis
Void setAutoRangeMinimumSize (double size) automatically sets the minimum span of the data range when the data axis data range
Whether the data label of the void setAutoTickUnitSelection (boolean flag) data axis is automatically determined (default is true)
Void setFixedAutoRange (double length) data axis fixed data range (set to 100that is to display the data range from MAXVALUE to MAXVALUE-100)
Whether the void setInverted (boolean flag) data axis is reversed (default is false)
Void setLowerMargin (double margin) lower (left) margin of the data axis
Void setUpperMargin (double margin) data axis (right) margin
Display minimum value on the void setLowerBound (double min) data axis
Display maximum value on the void setUpperBound (double max) data axis
Whether void setPositiveArrowVisible (boolean visible) displays forward arrow (invalid 3D axis)
Whether void setNegativeArrowVisible (boolean visible) displays the reverse arrow (invalid 3D axis)
Whether the void setVerticalTickLabels (boolean flag) data axis data label is rotated to vertical
Data label of void setStandardTickUnits (TickUnitSource source) data axis (only integer labels can be displayed, AutoTickUnitSelection needs to be set to false)
NumberAxis (ValueAxis) class:
Whether void setAutoRangeIncludesZero (boolean flag) forces the inclusion of 0 in the automatically selected data range
Whether void setAutoRangeStickyZero (boolean flag) forces 0 to be included in the entire data axis, even if 0 is not in the data range
Display format of void setNumberFormatOverride (NumberFormat formatter) data axis data label
Data label of void setTickUnit (NumberTickUnit unit) data axis (need to set AutoTickUnitSelection to false)
DateAxis (ValueAxis) class:
Minimum date on the void setMaximumDate (Date maximumDate) date axis
Maximum date on the void setMinimumDate (Date minimumDate) date axis
Void setRange (Date lower,Date upper) date axis range
Void setDateFormatOverride (DateFormat formatter) date axis date label display format
Date label of void setTickUnit (DateTickUnit unit) date axis (need to set AutoTickUnitSelection to false)
Void setTickMarkPosition (DateTickMarkPosition position) date label location (parameter constant is defined in the org.jfree.chart.axis.DateTickMarkPosition class)
CategoryAxis (Axis) class:
Void setCategoryMargin (double margin) Classification Shaft margin
Lower (left) margin of void setLowerMargin (double margin) classification axis
Void setUpperMargin (double margin) upper (right) margin of the classification axis
Whether the void setVerticalCategoryLabels (boolean flag) classification axis title is rotated to vertical
Maximum width of void setMaxCategoryLabelWidthRatio (float ratio) classification axis classification label
AbstractRenderer class:
Offset of void setItemLabelAnchorOffset (double offset) data label from data point
Whether the void setItemLabelsVisible (boolean visible) data label is visible
Font of void setItemLabelFont (Font font) data label
Font color of void setItemLabelPaint (Paint paint) data label
Void setItemLabelPosition (ItemLabelPosition position) data label location
Void setPositiveItemLabelPosition (ItemLabelPosition position) positive number label location
Void setNegativeItemLabelPosition (ItemLabelPosition position) negative label position
Line color of the border of void setOutLinePaint (Paint paint) graphics
Line strokes on the border of void setOutLineStroke (Stroke stroke) graphics
Void setPaint (Paint paint) colors of all classified graphics
Void setShape (Shape shape) the shape of all classified graphs (such as the points of a line chart)
Void setStroke (Stroke stroke) strokes of all classified graphics (such as the lines of a line chart)
Void setSeriesItemLabelsVisible (int series,boolean visible) specifies whether the classified data label is visible
Void setSeriesItemLabelFont (int series,Font font) specifies the font of the classified data label
Void setSeriesItemLabelPaint (int series,Paint paint) specifies the font color of the classified data label
Void setSeriesItemLabelPosition (int series,ItemLabelPosition position) data label location
Void setSeriesPositiveItemLabelPosition (int series,ItemLabelPosition position) positive number label location
Void setSeriesNegativeItemLabelPosition (int series,ItemLabelPosition position) negative label position
Void setSeriesOutLinePaint (int series,Paint paint) specifies the line color of the classified drawing border
Void setSeriesOutLineStroke (int series,Stroke stroke) specifies the line strokes of the classified drawing border
Void setSeriesPaint (int series,Paint paint) specifies the color of the classified graphic
Void setSeriesShape (int series,Shape shape) specifies the shape of the classification graph (such as the point of a line chart)
Void setSeriesStroke (int series,Stroke stroke) specifies the stroke of the classified graph (such as the line of a line chart)
AbstractCategoryItemRenderer (AbstractRenderer) class:
Format of void setLabelGenerator (CategoryLabelGenerator generator) data label
Display format over mouse movement in void setToolTipGenerator (CategoryToolTipGenerator generator) MAP
Drillthrough link format in void setItemURLGenerator (CategoryURLGenerator generator) MAP
Void setSeriesLabelGenerator (int series,CategoryLabelGenerator generator) specifies the format of the classified data label
Void setSeriesToolTipGenerator (int series,CategoryToolTipGenerator generator) specifies the display format over the mouse in the classified MAP
Void setSeriesItemURLGenerator (int series,CategoryURLGenerator generator) specifies the drillthrough link format in the classified MAP
BarRenderer (AbstractCategoryItemRenderer) class:
Does void setDrawBarOutline (boolean draw) draw a graphic border?
Void setItemMargin (double percent) the interval between each BAR
Void setMaxBarWidth (double percent) maximum width of each BAR
The shortest BAR length of void setMinimumBarLength (double min) to avoid the value being too small to be displayed
Void setPositiveItemLabelPositionFallback (ItemLabelPosition position) positive number label position that cannot be displayed in BAR
Negative label position where void setNegativeItemLabelPositionFallback (ItemLabelPosition position) cannot be displayed in BAR
BarRenderer3D (BarRenderer) class:
Wall color of void setWallPaint (Paint paint) 3D axes
StackedBarRenderer (BarRenderer) class:
No special settings
StackedBarRenderer3D (BarRenderer3D) class:
No special settings
GroupedStackedBarRenderer (StackedBarRenderer) class:
Void setSeriesToGroupMap (KeyToGroupMap map) maps classification freely to several groups (KeyToGroupMap.mapKeyToGroup (series,group)).
LayeredBarRenderer (BarRenderer) class:
Void setSeriesBarWidth (int series,double width) sets the width of each category (be careful not to overwrite a category)
WaterfallBarRenderer (BarRenderer) class:
The color of the first column chart of void setFirstBarPaint (Paint paint)
The color of the last bar chart of void setLastBarPaint (Paint paint)
The color of void setPositiveBarPaint (Paint paint) positive histogram
The color of void setNegativeBarPaint (Paint paint) negative histogram
IntervalBarRenderer (BarRenderer) class:
Need to pass IntervalCategoryDataset as the data source
GanttBarRenderer (IntervalBarRenderer) class:
Void setCompletePaint (Paint paint) completion progress color
Void setIncompletePaint (Paint paint) unfinished progress color
Void setStartPercent (double percent) sets the starting position of the progress bar in the entire bar (0.01mm 1.0)
Void setEndPercent (double percent) sets the end position of the progress bar in the whole bar (0.01mm 1.0)
StatisticBarRenderer (BarRenderer) class:
Need to pass StatisticCategoryDataset as the data source
LineAndShapeRenderer (AbstractCategoryItemRenderer) class:
Whether void setDrawLines (boolean draw) is connected by lines between the data points of the broken line.
Void setDrawShapes (boolean draw) whether the data points of broken lines use different shapes according to classification.
Void setShapesFilled (boolean filled) whether all classifications populate the data point graph
Void setSeriesShapesFilled (int series,boolean filled) specifies whether the classification populates the data point graph
Void setUseFillPaintForShapeOutline (boolean use) Paint, which specifies whether to fill data points, is also used to draw borders for data point shapes.
LevelRenderer (AbstractCategoryItemRenderer) class:
Void setItemMargin (double percent) the interval between each category
Void setMaxItemWidth (double percent) the maximum width of each category
CategoryStepRenderer (AbstractCategoryItemRenderer) class:
Void setStagger (boolean shouldStagger) whether the graphs of different classifications are interlaced
MinMaxCategoryRenderer (AbstractCategoryItemRenderer) class:
Does void setDrawLines (boolean drawLines) draw a connecting line between each classification line?
Void setGroupPaint (Paint groupPaint) the color of a set of graphic connection lines
Void setGroupStroke (Stroke groupStroke) the strokes of a set of graphic connecting lines
ICON of the maximum value of void setMaxIcon (Icon maxIcon)
ICON with minimum value of void setMinIcon (Icon minIcon)
ICON of all values of void setObjectIcon (Icon objectIcon)
AreaRender (AbstractCategoryItemRenderer) class:
No special settings
StackedAreaRender (AreaRender) class:
No special settings
The key is to make good use of the Renderer class, and post another example:
String sFont = "Song style"; chart.setBorderVisible (true); chart.setBorderPaint (new Color (0xFF _ 0x6)); chart.setBackgroundPaint (new Color (0xFF _ 0xF3) 0xDE)); chart.getTitle (). SetPaint (Color.red); chart.getTitle (). SetFont (new Font (sFont,Font.BOLD,14)); / / set Plot, do not show all grids (CategoryPlot) chart.getPlot () .setOutlinePaint (null); (CategoryPlot) chart.getPlot () .setDomainGridlinesVisible (false) ((CategoryPlot) chart.getPlot ()) .setRangeGridlinesVisible (false); / / sets horizontal font, sets horizontal axis invisible, hides vertical axis ((CategoryPlot) chart.getPlot ()) .getDomainAxis () .setTickLabelFont (new Font (sFont,Font.PLAIN,12)); ((CategoryPlot) chart.getPlot ()) .getDomainAxis () .setAxisLineVisible (false); ((CategoryPlot) chart.getPlot ()) .getRangeAxis () .setVisible (false) / use BarRenderer as the indicator BarRenderer renderer = new BarRenderer (); renderer.setPaint (new GradientPaint); renderer.setOutlinePaint (Color.orange); renderer.setDrawBarOutline (true); / / display the voting value renderer.setItemLabelAnchorOffset (- 20.0f) in the center of the bar; renderer.setLabelGenerator (new StandardCategoryLabelGenerator ("{2}", new DecimalFormat ()); renderer.setPositiveItemLabelPosition (new ItemLabelPosition ()) Renderer.setItemLabelsVisible (true)
Pie charts (2D and 3D): pie chart (planar and stereoscopic)
Bar charts (regular and stacked, with an optional 3D effect): bar chart
Line and area charts: graphs
Scatter plots and bubble charts
Time series, high/low/open/close charts and candle stick charts: sequence diagram
Combination charts: composite diagram
Pareto charts
Gantt charts: Gantt Chart
Wind plots, meter charts and symbol charts
Wafer map charts
(state chart, pie chart (2D and 3D), bar chart (horizontal, vertical), line chart, dot chart, time change chart, Gantt chart, stock market chart, mixed chart, thermometer chart, scale chart and other common commercial charts)
Drawings can be exported to PNG and JPEG formats, and can also be associated with PDF and EXCEL
Introduction to the JFreeChart core class library:
Study of jfreechart source code found that the source code is mainly composed of two large packages: org.jfree.chart,org.jfree.data. The former is mainly related to the graphics itself, while the latter is related to the data displayed by the graphics.
The main core classes are:
Org.jfree.chart.JFreeChart: chart object, the final representation of any type of chart is to customize some properties in this object. The JFreeChart engine itself provides a factory class for creating different types of chart objects
Org.jfree.data.category.XXXDataSet: a dataset object that provides the data used to display the chart. According to different types of charts, there are many types of dataset object classes.
Org.jfree.chart.plot.XXXPlot: chart area object, which basically determines what kind of chart. When creating this object, you need the support of Axis, Renderer and dataset objects.
Org.jfree.chart.axis.XXXAxis: two axes for working with charts: vertical axis and horizontal axis
Org.jfree.chart.render.XXXRender: responsible for how to display a chart object
Org.jfree.chart.urls.XXXURLGenerator: mouse-click links used to generate each item in the Web diagram
XXXXXToolTipGenerator: help tips for generating images. Different types of charts correspond to different types of tooltip classes.
JFreeChart class:
Void setAntiAlias (boolean flag) fonts blur boundaries
Void setBackgroundImage (Image image) background picture
Void setBackgroundImageAlignment (int alignment) background picture alignment (parameter constant is defined in the org.jfree.ui.Align class)
Void setBackgroundImageAlpha (float alpha) background picture transparency (0.01mm 1.0)
Void setBackgroundPaint (Paint paint) background color
Void setBorderPaint (Paint paint) Boundary Line Color
Void setBorderStroke (Stroke stroke) boundary line strokes
Is the void setBorderVisible (boolean visible) boundary line visible?
TextTitle class:
Void setFont (Font font) title font
Void setPaint (Paint paint) title font color
Within the heading of void setText (String text)
StandardLegend (Legend) class:
Void setBackgroundPaint (Paint paint) graphic background color
Void setTitle (String title) Icon title content
Void setTitleFont (Font font) Icon title font
Void setBoundingBoxArcWidth (int arcWidth) diagram shows the width of the boundary fillet
Void setBoundingBoxArcHeight (int arcHeight) diagram shows the height of the boundary fillet
Void setOutlinePaint (Paint paint) Illustrated Boundary Line Color
Void setOutlineStroke (Stroke stroke) Illustrated Boundary Line Stroke
Whether the void setDisplaySeriesLines (boolean flag) graphic item displays horizontal lines (line chart is valid)
Whether the void setDisplaySeriesShapes (boolean flag) graphic item displays the shape (line chart is valid)
Void setItemFont (Font font) icon font
Void setItemPaint (Paint paint) icon font color
The void setAnchor (int anchor) diagram shows where it appears in the chart (parameter constants are defined in the Legend class)
Axis class:
Whether the void setVisible (boolean flag) axis is visible
Void setAxisLinePaint (Paint paint) axis line color (invalid 3D axis)
Void setAxisLineStroke (Stroke stroke) axis line stroke (invalid 3D axis)
Whether the lines of the void setAxisLineVisible (boolean visible) axis are visible (invalid 3D axis)
Void setFixedDimension (double dimension) (for setting multiple axes in a composite table)
Void setLabel (String label) axis title
Void setLabelFont (Font font) axis title font
Void setLabelPaint (Paint paint) axis title color
Void setLabelAngle (double angle) `Axis title rotation angle (ordinates can be rotated)
Void setTickLabelFont (Font font) axis ruler value font
Void setTickLabelPaint (Paint paint) axis ruler value color
Whether the void setTickLabelsVisible (boolean flag) axis ruler value is displayed
Void setTickMarkPaint (Paint paint) axis ruler color
Void setTickMarkStroke (Stroke stroke) axis ruler stroke
Whether the void setTickMarksVisible (boolean flag) axis ruler is displayed
ValueAxis (Axis) class:
Void setAutoRange (boolean auto) automatically sets the data range of the data axis
Void setAutoRangeMinimumSize (double size) automatically sets the minimum span of the data range when the data axis data range
Whether the data label of the void setAutoTickUnitSelection (boolean flag) data axis is automatically determined (default is true)
Void setFixedAutoRange (double length) data axis fixed data range (set to 100that is to display the data range from MAXVALUE to MAXVALUE-100)
Whether the void setInverted (boolean flag) data axis is reversed (default is false)
Void setLowerMargin (double margin) lower (left) margin of the data axis
Void setUpperMargin (double margin) data axis (right) margin
Display minimum value on the void setLowerBound (double min) data axis
Display maximum value on the void setUpperBound (double max) data axis
Whether void setPositiveArrowVisible (boolean visible) displays forward arrow (invalid 3D axis)
Whether void setNegativeArrowVisible (boolean visible) displays the reverse arrow (invalid 3D axis)
Whether the void setVerticalTickLabels (boolean flag) data axis data label is rotated to vertical
Data label of void setStandardTickUnits (TickUnitSource source) data axis (only integer labels can be displayed, AutoTickUnitSelection needs to be set to false)
NumberAxis (ValueAxis) class:
Whether void setAutoRangeIncludesZero (boolean flag) forces the inclusion of 0 in the automatically selected data range
Whether void setAutoRangeStickyZero (boolean flag) forces 0 to be included in the entire data axis, even if 0 is not in the data range
Display format of void setNumberFormatOverride (NumberFormat formatter) data axis data label
Data label of void setTickUnit (NumberTickUnit unit) data axis (need to set AutoTickUnitSelection to false)
DateAxis (ValueAxis) class:
Minimum date on the void setMaximumDate (Date maximumDate) date axis
Maximum date on the void setMinimumDate (Date minimumDate) date axis
Void setRange (Date lower,Date upper) date axis range
Void setDateFormatOverride (DateFormat formatter) date axis date label display format
Date label of void setTickUnit (DateTickUnit unit) date axis (need to set AutoTickUnitSelection to false)
Void setTickMarkPosition (DateTickMarkPosition position) date label location (parameter constant is defined in the org.jfree.chart.axis.DateTickMarkPosition class)
CategoryAxis (Axis) class:
Void setCategoryMargin (double margin) Classification Shaft margin
Lower (left) margin of void setLowerMargin (double margin) classification axis
Void setUpperMargin (double margin) upper (right) margin of the classification axis
Whether the void setVerticalCategoryLabels (boolean flag) classification axis title is rotated to vertical
Maximum width of void setMaxCategoryLabelWidthRatio (float ratio) classification axis classification label
Plot class:
Background picture of void setBackgroundImage (Image image) data area
Background picture alignment of the void setBackgroundImageAlignment (int alignment) data area (parameter constant is defined in the org.jfree.ui.Align class)
Background picture background color of void setBackgroundPaint (Paint paint) data area
Background transparency of the void setBackgroundAlpha (float alpha) data area (0.021.0)
Foreground transparency of the void setForegroundAlpha (float alpha) data area (0.021.0)
Void setDataAreaRatio (double ratio) data area as a percentage of the entire chart area
Boundary line color of the void setOutLinePaint (Paint paint) data area
Boundary line strokes of void setOutLineStroke (Stroke stroke) data area
Messages displayed when void setNoDataMessage (String message) does not have data
Void setNoDataMessageFont (Font font) message font displayed when there is no data
The color of the message displayed when void setNoDataMessagePaint (Paint paint) has no data
CategoryPlot (Plot) class:
2D data table of void setDataset (CategoryDataset dataset) data area
Sorting method of void setColumnRenderingOrder (SortOrder order) data classification
Spacing from the void setAxisOffset (Spacer offset) axis to the data area
Direction of the void setOrientation (PlotOrientation orientation) data area (PlotOrientation.HORIZONTAL or PlotOrientation.VERTICAL)
Classification axis of void setDomainAxis (CategoryAxis axis) data area
Position of the void setDomainAxisLocation (AxisLocation location) classification axis (parameter constant is defined in the org.jfree.chart.axis.AxisLocation class)
Void setDomainGridlinesVisible (boolean visible) whether the grid of classification axes is visible
Void setDomainGridlinePaint (Paint paint) Classification Axis Grid Line Color
Void setDomainGridlineStroke (Stroke stroke) classification axis grid line strokes
Data axis of the void setRangeAxis (ValueAxis axis) data area
Location of the void setRangeAxisLocation (AxisLocation location) data axis (parameter constant is defined in the org.jfree.chart.axis.AxisLocation class)
Whether the void setRangeGridlinesVisible (boolean visible) data axis grid is visible
Void setRangeGridlinePaint (Paint paint) data axis grid line color
Void setRangeGridlineStroke (Stroke stroke) data axis grid line strokes
Representation of the void setRenderer (CategoryItemRenderer renderer) data area (see Renderer group for details)
Void addAnnotation (CategoryAnnotation annotation) adds a comment to the data area
Void addRangeMarker (Marker marker,Layer layer) adds a numerical range to the data area
PiePlot (Plot) class:
1-D data table of void setDataset (PieDataset dataset) data area
Void setIgnoreNullValues (boolean flag) ignores classification with no value
Is the void setCircular (boolean flag) pie chart necessarily a positive circle?
The initial angle of void setStartAngle (double angle) pie chart
The rotation direction of void setDirection (Rotation direction) pie chart
The piece extracted by void setExplodePercent (int section,double percent) (the classification subscript of the 1D data table) and the extracted distance (0.01mm 1.0), the 3D pie chart is invalid.
Background color of void setLabelBackgroundPaint (Paint paint) classification label
Font of the void setLabelFont (Font font) classification label
Font color of the void setLabelPaint (Paint paint) classification label
Void setLabelLinkMargin (double margin) Classification label and the margin of the connecting Line of the Graph
Void setLabelLinkPaint (Paint paint) Classification label and the color of the connecting line of the graph
Void setLabelLinkStroke (Stroke stroke) classification label and the stroke of the connecting line of the graph
Void setLabelOutlinePaint (Paint paint) Classification label Border Color
Void setLabelOutlineStroke (Paint paint) Classification label Border Stroke
Void setLabelShadowPaint (Paint paint) Classification label Shadow Color
Maximum length of the void setMaximumLabelWidth (double width) classification label (0.01mm)
Index of void setPieIndex (int index) pie chart (used in composite pie chart)
Void setSectionOutlinePaint (int section,Paint paint) specifies the border color of the sorted cake
Void setSectionOutlineStroke (int section,Stroke stroke) specifies the border stroke of the sorted cake
Void setSectionPaint (int section,Paint paint) specifies the color of the sorted cake
Shadow color of void setShadowPaint (Paint paint) pie chart
The horizontal offset of the shadow of the void setShadowXOffset (double offset) pie chart from the graph
The vertical offset of the shadow of the void setShadowYOffset (double offset) pie chart from the graph
The format of the void setLabelGenerator (PieSectionLabelGenerator generator) classification label. If it is set to null, the whole label, including the connecting line, will not be displayed.
Display format over mouse movement in void setToolTipGenerator (PieToolTipGenerator generator) MAP
Drillthrough link format in void setURLGenerator (PieURLGenerator generator) MAP
PiePlot3D (PiePlot) class:
Z axis height of void setDepthFactor (double factor) 3D pie chart (0.01mm)
MultiplePiePlot (Plot) class:
Void setLimit (double limit) data association between each pie chart (more complex in detail)
Void setPieChart (JFreeChart pieChart) how each pie chart is displayed (see JFreeChart class PiePlot class)
AbstractRenderer class:
Offset of void setItemLabelAnchorOffset (double offset) data label from data point
Whether the void setItemLabelsVisible (boolean visible) data label is visible
Font of void setItemLabelFont (Font font) data label
Font color of void setItemLabelPaint (Paint paint) data label
Void setItemLabelPosition (ItemLabelPosition position) data label location
Void setPositiveItemLabelPosition (ItemLabelPosition position) positive number label location
Void setNegativeItemLabelPosition (ItemLabelPosition position) negative label position
Line color of the border of void setOutLinePaint (Paint paint) graphics
Line strokes on the border of void setOutLineStroke (Stroke stroke) graphics
Void setPaint (Paint paint) colors of all classified graphics
Void setShape (Shape shape) the shape of all classified graphs (such as the points of a line chart)
Void setStroke (Stroke stroke) strokes of all classified graphics (such as the lines of a line chart)
Void setSeriesItemLabelsVisible (int series,boolean visible) specifies whether the classified data label is visible
Void setSeriesItemLabelFont (int series,Font font) specifies the font of the classified data label
Void setSeriesItemLabelPaint (int series,Paint paint) specifies the font color of the classified data label
Void setSeriesItemLabelPosition (int series,ItemLabelPosition position) data label location
Void setSeriesPositiveItemLabelPosition (int series,ItemLabelPosition position) positive number label location
Void setSeriesNegativeItemLabelPosition (int series,ItemLabelPosition position) negative label position
Void setSeriesOutLinePaint (int series,Paint paint) specifies the line color of the classified drawing border
Void setSeriesOutLineStroke (int series,Stroke stroke) specifies the line strokes of the classified drawing border
Void setSeriesPaint (int series,Paint paint) specifies the color of the classified graphic
Void setSeriesShape (int series,Shape shape) specifies the shape of the classification graph (such as the point of a line chart)
Void setSeriesStroke (int series,Stroke stroke) specifies the stroke of the classified graph (such as the line of a line chart)
AbstractCategoryItemRenderer (AbstractRenderer) class:
Format of void setLabelGenerator (CategoryLabelGenerator generator) data label
Display format over mouse movement in void setToolTipGenerator (CategoryToolTipGenerator generator) MAP
Drillthrough link format in void setItemURLGenerator (CategoryURLGenerator generator) MAP
Void setSeriesLabelGenerator (int series,CategoryLabelGenerator generator) specifies the format of the classified data label
Void setSeriesToolTipGenerator (int series,CategoryToolTipGenerator generator) specifies the display format over the mouse in the classified MAP
Void setSeriesItemURLGenerator (int series,CategoryURLGenerator generator) specifies the drillthrough link format in the classified MAP
BarRenderer (AbstractCategoryItemRenderer) class:
Does void setDrawBarOutline (boolean draw) draw a graphic border?
Void setItemMargin (double percent) the interval between each BAR
Void setMaxBarWidth (double percent) maximum width of each BAR
The shortest BAR length of void setMinimumBarLength (double min) to avoid the value being too small to be displayed
Void setPositiveItemLabelPositionFallback (ItemLabelPosition position) positive number label position that cannot be displayed in BAR
Negative label position where void setNegativeItemLabelPositionFallback (ItemLabelPosition position) cannot be displayed in BAR
BarRenderer3D (BarRenderer) class:
Wall color of void setWallPaint (Paint paint) 3D axes
StackedBarRenderer (BarRenderer) class:
No special settings
StackedBarRenderer3D (BarRenderer3D) class:
No special settings
GroupedStackedBarRenderer (StackedBarRenderer) class:
Void setSeriesToGroupMap (KeyToGroupMap map) maps classification freely to several groups (KeyToGroupMap.mapKeyToGroup (series,group)).
LayeredBarRenderer (BarRenderer) class:
Void setSeriesBarWidth (int series,double width) sets the width of each category (be careful not to overwrite a category)
WaterfallBarRenderer (BarRenderer) class:
The color of the first column chart of void setFirstBarPaint (Paint paint)
The color of the last bar chart of void setLastBarPaint (Paint paint)
The color of void setPositiveBarPaint (Paint paint) positive histogram
The color of void setNegativeBarPaint (Paint paint) negative histogram
IntervalBarRenderer (BarRenderer) class:
Need to pass IntervalCategoryDataset as the data source
GanttBarRenderer (IntervalBarRenderer) class:
Void setCompletePaint (Paint paint) completion progress color
Void setIncompletePaint (Paint paint) unfinished progress color
Void setStartPercent (double percent) sets the starting position of the progress bar in the entire bar (0.01mm 1.0)
Void setEndPercent (double percent) sets the end position of the progress bar in the whole bar (0.01mm 1.0)
StatisticBarRenderer (BarRenderer) class:
Need to pass StatisticCategoryDataset as the data source
LineAndShapeRenderer (AbstractCategoryItemRenderer) class:
Whether void setDrawLines (boolean draw) is connected by lines between the data points of the broken line.
Void setDrawShapes (boolean draw) whether the data points of broken lines use different shapes according to classification.
Void setShapesFilled (boolean filled) whether all classifications populate the data point graph
Void setSeriesShapesFilled (int series,boolean filled) specifies whether the classification populates the data point graph
Void setUseFillPaintForShapeOutline (boolean use) Paint, which specifies whether to fill data points, is also used to draw borders for data point shapes.
LevelRenderer (AbstractCategoryItemRenderer) class:
Void setItemMargin (double percent) the interval between each category
Void setMaxItemWidth (double percent) the maximum width of each category
CategoryStepRenderer (AbstractCategoryItemRenderer) class:
Void setStagger (boolean shouldStagger) whether the graphs of different classifications are interlaced
MinMaxCategoryRenderer (AbstractCategoryItemRenderer) class:
Does void setDrawLines (boolean drawLines) draw a connecting line between each classification line?
Void setGroupPaint (Paint groupPaint) the color of a set of graphic connection lines
Void setGroupStroke (Stroke groupStroke) the strokes of a set of graphic connecting lines
ICON of the maximum value of void setMaxIcon (Icon maxIcon)
ICON with minimum value of void setMinIcon (Icon minIcon)
ICON of all values of void setObjectIcon (Icon objectIcon)
AreaRender (AbstractCategoryItemRenderer) class:
No special settings
StackedAreaRender (AreaRender) class:
No special settings
These are all the contents of the article "what are the JFreeChart API in java?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.