afreechart/src/main/java/org/afree/chart/plot/Plot.java
/**
     * Draws a message to state that there is no data to plot.
     * 
     * @param canvas
     *            the graphics device.
     * @param area
     *            the area within which the plot should be drawn.
     */
Draws a message to state that there is no data to plot.

@param canvas
the graphics device.
@param area
the area within which the plot should be drawn.
Draws a message to state that there is no data to plot . @param canvas the graphics device . @param area the area within which the plot should be drawn .
protected void drawNoDataMessage(Canvas canvas, RectShape area) {
        canvas.save();
        canvas.clipRect((float) area.getMinX(), (float) area.getMinY(),
                (float) area.getMaxX(), (float) area.getMaxY());
        String message = this.noDataMessage;
        if (message != null) {
            Paint paint = PaintUtility.createPaint(Paint.ANTI_ALIAS_FLAG, this.noDataMessagePaintType, this.noDataMessageFont);
            TextBlock block = TextUtilities.createTextBlock(this.noDataMessage,
                    this.noDataMessageFont, this.noDataMessagePaintType,
                    0.9f * (float) area.getWidth(), new G2TextMeasurer(
                            paint));
            block.draw(canvas, (float) area.getCenterX(),
                    (float) area.getCenterY(), TextBlockAnchor.CENTER);
        }
        canvas.restore();
    }
protected void drawNoDataMessage ( Canvas canvas , RectShape area ) { canvas . save ( ) ; canvas . clipRect ( ( float ) area . getMinX ( ) , ( float ) area . getMinY ( ) , ( float ) area . getMaxX ( ) , ( float ) area . getMaxY ( ) ) ; String message = this . noDataMessage ; if ( message != null ) { Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , this . noDataMessagePaintType , this . noDataMessageFont ) ; TextBlock block = TextUtilities . createTextBlock ( this . noDataMessage , this . noDataMessageFont , this . noDataMessagePaintType , 0.9f * ( float ) area . getWidth ( ) , new G2TextMeasurer ( paint ) ) ; block . draw ( canvas , ( float ) area . getCenterX ( ) , ( float ) area . getCenterY ( ) , TextBlockAnchor . CENTER ) ; } canvas . restore ( ) ; }
Draws a message to state that there is no data to plot.
Draws a message to state that there is no data to plot .
// canvas.setFont(this.noDataMessageFont); // noDataMessagePaint //noDataMessagePaint.setAlpha(alpha);