Codota Logo
SpiderWebPlot
Code IndexAdd Codota to your IDE (free)

How to use
SpiderWebPlot
in
org.jfree.chart.plot

Best Java code snippets using org.jfree.chart.plot.SpiderWebPlot (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Applies the attributes of this theme to a {@link SpiderWebPlot}.
 *
 * @param plot  the plot (<code>null</code> not permitted).
 */
protected void applyToSpiderWebPlot(SpiderWebPlot plot) {
  plot.setLabelFont(this.regularFont);
  plot.setLabelPaint(this.axisLabelPaint);
  plot.setAxisLinePaint(this.axisLabelPaint);
}
origin: jfree/jfreechart

/**
 * Sets the outline stroke for ALL series in the plot. If this is set to
 * {@code null}, then a list of paints is used instead (to allow
 * different colors to be used for each series).
 *
 * @param stroke  the stroke ({@code null} permitted).
 */
public void setSeriesOutlineStroke(Stroke stroke) {
  this.seriesOutlineStroke = stroke;
  fireChangeEvent();
}
origin: org.codehaus.jtstand/jtstand-chart

RectangleInsets insets = getInsets();
insets.trim(area);
drawBackground(g2, area);
drawOutline(g2, area);
Composite originalComposite = g2.getComposite();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
    getForegroundAlpha()));
    calculateMaxValue(seriesCount, catCount);
  double gapHorizontal = area.getWidth() * getInteriorGap();
  double gapVertical = area.getHeight() * getInteriorGap();
    double angle = getStartAngle()
        + (getDirection().getFactor() * cat * 360 / catCount);
    Point2D endPoint = getWebPoint(radarArea, angle, 1);
    g2.setStroke(this.axisLineStroke);
    g2.draw(line);
    drawLabel(g2, radarArea, 0.0, cat, angle, 360.0 / catCount);
    drawRadarPoly(g2, radarArea, centre, info, series, catCount,
        headH, headW);
  drawNoDataMessage(g2, area);
origin: jfree/jfreechart

Rectangle2D labelBounds = getLabelFont().getStringBounds(label, frc);
LineMetrics lm = getLabelFont().getLineMetrics(label, frc);
double ascent = lm.getAscent();
Point2D labelLocation = calculateLabelLocation(labelBounds, ascent,
    plotArea, startAngle);
g2.setPaint(getLabelPaint());
g2.setFont(getLabelFont());
g2.drawString(label, (float) labelLocation.getX(),
    (float) labelLocation.getY());
origin: jfree/jfreechart

/**
 * Sets the dataset used by the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @see #getDataset()
 */
public void setDataset(CategoryDataset dataset) {
  // if there is an existing dataset, remove the plot from the list of
  // change listeners...
  if (this.dataset != null) {
    this.dataset.removeChangeListener(this);
  }
  // set the new dataset, and register the chart as a change listener...
  this.dataset = dataset;
  if (dataset != null) {
    setDatasetGroup(dataset.getGroup());
    dataset.addChangeListener(this);
  }
  // send a dataset change event to self to trigger plot change event
  datasetChanged(new DatasetChangeEvent(this, dataset));
}
origin: dhis2/dhis2-core

private JFreeChart getRadarChart( BaseChart chart, CategoryDataset dataSet )
{
  SpiderWebPlot plot = new SpiderWebPlot( dataSet, TableOrder.BY_ROW );
  plot.setLabelFont( LABEL_FONT );
  JFreeChart radarChart = new JFreeChart( chart.getName(), TITLE_FONT, plot, !chart.isHideLegend() );
  setBasicConfig( radarChart, chart );
  return radarChart;
}
origin: jfree/jfreechart

RectangleInsets insets = getInsets();
insets.trim(area);
drawBackground(g2, area);
drawOutline(g2, area);
Composite originalComposite = g2.getComposite();
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
    getForegroundAlpha()));
    calculateMaxValue(seriesCount, catCount);
  double gapHorizontal = area.getWidth() * getInteriorGap();
  double gapVertical = area.getHeight() * getInteriorGap();
    double angle = getStartAngle()
        + (getDirection().getFactor() * cat * 360 / catCount);
    Point2D endPoint = getWebPoint(radarArea, angle, 1);
    g2.setStroke(this.axisLineStroke);
    g2.draw(line);
    drawLabel(g2, radarArea, 0.0, cat, angle, 360.0 / catCount);
    drawRadarPoly(g2, radarArea, centre, info, series, catCount,
        headH, headW);
  drawNoDataMessage(g2, area);
origin: org.codehaus.jtstand/jtstand-chart

Rectangle2D labelBounds = getLabelFont().getStringBounds(label, frc);
LineMetrics lm = getLabelFont().getLineMetrics(label, frc);
double ascent = lm.getAscent();
Point2D labelLocation = calculateLabelLocation(labelBounds, ascent,
    plotArea, startAngle);
g2.setPaint(getLabelPaint());
g2.setFont(getLabelFont());
g2.drawString(label, (float) labelLocation.getX(),
    (float) labelLocation.getY());
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Sets the dataset used by the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param dataset  the dataset (<code>null</code> permitted).
 *
 * @see #getDataset()
 */
public void setDataset(CategoryDataset dataset) {
  // if there is an existing dataset, remove the plot from the list of
  // change listeners...
  if (this.dataset != null) {
    this.dataset.removeChangeListener(this);
  }
  // set the new dataset, and register the chart as a change listener...
  this.dataset = dataset;
  if (dataset != null) {
    setDatasetGroup(dataset.getGroup());
    dataset.addChangeListener(this);
  }
  // send a dataset change event to self to trigger plot change event
  datasetChanged(new DatasetChangeEvent(this, dataset));
}
origin: jfree/jfreechart

/**
 * Sets the outline paint for ALL series in the plot. If this is set to
 * {@code null}, then a list of paints is used instead (to allow
 * different colors to be used for each series).
 *
 * @param paint  the paint ({@code null} permitted).
 */
public void setSeriesOutlinePaint(Paint paint) {
  this.seriesOutlinePaint = paint;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Applies the attributes of this theme to a {@link SpiderWebPlot}.
 *
 * @param plot  the plot ({@code null} not permitted).
 */
protected void applyToSpiderWebPlot(SpiderWebPlot plot) {
  plot.setLabelFont(this.regularFont);
  plot.setLabelPaint(this.axisLabelPaint);
  plot.setAxisLinePaint(this.axisLabelPaint);
}
origin: jfree/jfreechart

/**
 * Sets the webFilled flag and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param flag  the flag.
 *
 * @see #isWebFilled()
 */
public void setWebFilled(boolean flag) {
  this.webFilled = flag;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Sets the head percent and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param percent  the percent.
 *
 * @see #getHeadPercent()
 */
public void setHeadPercent(double percent) {
  this.headPercent = percent;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Sets the axis label gap and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param gap  the gap.
 *
 * @see #getAxisLabelGap()
 */
public void setAxisLabelGap(double gap) {
  this.axisLabelGap = gap;
  fireChangeEvent();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Sets the outline stroke for ALL series in the plot. If this is set to
 * </code> null</code>, then a list of paints is used instead (to allow
 * different colors to be used for each series).
 *
 * @param stroke  the stroke (<code>null</code> permitted).
 */
public void setSeriesOutlineStroke(Stroke stroke) {
  this.seriesOutlineStroke = stroke;
  fireChangeEvent();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Sets the webFilled flag and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param flag  the flag.
 *
 * @see #isWebFilled()
 */
public void setWebFilled(boolean flag) {
  this.webFilled = flag;
  fireChangeEvent();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Sets the head percent and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param percent  the percent.
 *
 * @see #getHeadPercent()
 */
public void setHeadPercent(double percent) {
  this.headPercent = percent;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Sets the maximum value any category axis can take and sends
 * a {@link PlotChangeEvent} to all registered listeners.
 *
 * @param value  the maximum value.
 *
 * @see #getMaxValue()
 */
public void setMaxValue(double value) {
  this.maxValue = value;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Sets the paint for ALL series in the plot.  If this is set to 
 * {@code null}, then a list of paints is used instead (to allow different 
 * colors to be used for each series of the radar group).
 *
 * @param paint the paint ({@code null} permitted).
 *
 * @see #getSeriesPaint()
 */
public void setSeriesPaint(Paint paint) {
  this.seriesPaint = paint;
  fireChangeEvent();
}
origin: jfree/jfreechart

/**
 * Sets the URL generator for the plot and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param generator  the generator ({@code null} permitted).
 *
 * @see #getURLGenerator()
 *
 * @since 1.0.2
 */
public void setURLGenerator(CategoryURLGenerator generator) {
  this.urlGenerator = generator;
  fireChangeEvent();
}
org.jfree.chart.plotSpiderWebPlot

Javadoc

A plot that displays data from a CategoryDataset in the form of a "spider web". Multiple series can be plotted on the same axis to allow easy comparison. This plot doesn't support negative values at present.

Most used methods

  • setLabelFont
    Sets the series label font and sends a PlotChangeEvent to all registered listeners.
  • calculateLabelLocation
    Returns the location for a label
  • calculateMaxValue
    loop through each of the series to get the maximum value on each category axis
  • datasetChanged
  • drawBackground
  • drawLabel
    Draws the label for one axis.
  • drawNoDataMessage
  • drawOutline
  • drawRadarPoly
    Draws a radar plot polygon.
  • fireChangeEvent
  • getDataset
    Returns the dataset.
  • getDirection
    Returns the direction in which the radar axes are drawn (clockwise or anti-clockwise).
  • getDataset,
  • getDirection,
  • getDrawingSupplier,
  • getForegroundAlpha,
  • getInsets,
  • getInteriorGap,
  • getLabelFont,
  • getLabelPaint,
  • getLegendItemShape,
  • getPlotValue

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now