src/jtwod/engine/drawable/Graph.java
@Override
    public final void render(Graphics graphics, Scene<ParentEngine> screen)
    {
        super.render(graphics, screen);

        for (int dataSetId = 0; dataSetId < dataSets.length; dataSetId++) {
            int lastY = this.getPosition().getY() + this.getSize().getHeight();
            for (int dataValueId = 0; dataValueId < dataSets[dataSetId].length; dataValueId++) {
                graphics.setColor(getColorForDataSet(dataSetId));
                int nextY = this.getPosition().getY() + this.getSize().getHeight()
                    - (1 + (dataSets[dataSetId][dataValueId] == 0 ? 0 : (int) (
                    (
                            dataSets[dataSetId][dataValueId]
                                    / this.getMaxValueForDataSet(dataSetId)
                    ) * this.getSize().getHeight()
                )));

                if (dataValueId != 0) {
                    graphics.drawLine(
                        this.getPosition().getX() + dataValueId - 1, lastY,
                        this.getPosition().getX() + dataValueId, nextY
                    );
                }

                graphics.drawRect(
                    this.getPosition().getX() + dataValueId,

                    nextY,

                    1, 1
                );

                lastY = nextY;
            }
        }
    }
/**
     * Render the graph out.
     *
     * @param graphics The <code>{@link java.awt.Graphics Graphics}</code>
     *                 object to use for rendering.
     * @param screen The scene to render it out to.
     */
Render the graph out.
@param graphics The  java.awt.Graphics Graphics
object to use for rendering.
@param screen The scene to render it out to.
Render the graph out . @param graphics The java . awt . Graphics Graphics object to use for rendering . @param screen The scene to render it out to .
@Override
    public final void render(Graphics graphics, Scene<ParentEngine> screen)
    {
        super.render(graphics, screen);
        for (int dataSetId = 0; dataSetId < dataSets.length; dataSetId++) {
            int lastY = this.getPosition().getY() + this.getSize().getHeight();
            for (int dataValueId = 0; dataValueId < dataSets[dataSetId].length; dataValueId++) {
                graphics.setColor(getColorForDataSet(dataSetId));
                int nextY = this.getPosition().getY() + this.getSize().getHeight()
                    - (1 + (dataSets[dataSetId][dataValueId] == 0 ? 0 : (int) (
                    (
                            dataSets[dataSetId][dataValueId]
                                    / this.getMaxValueForDataSet(dataSetId)
                    ) * this.getSize().getHeight()
                )));
                if (dataValueId != 0) {
                    graphics.drawLine(
                        this.getPosition().getX() + dataValueId - 1, lastY,
                        this.getPosition().getX() + dataValueId, nextY
                    );
                }
                graphics.drawRect(
                    this.getPosition().getX() + dataValueId,
                    nextY,
                    1, 1
                );
                lastY = nextY;
            }
        }
    }
@ Override public final void render ( Graphics graphics , Scene < ParentEngine > screen ) { super . render ( graphics , screen ) ; for ( int dataSetId = 0 ; dataSetId < dataSets . length ; dataSetId ++ ) { int lastY = this . getPosition ( ) . getY ( ) + this . getSize ( ) . getHeight ( ) ; for ( int dataValueId = 0 ; dataValueId < dataSets [ dataSetId ] . length ; dataValueId ++ ) { graphics . setColor ( getColorForDataSet ( dataSetId ) ) ; int nextY = this . getPosition ( ) . getY ( ) + this . getSize ( ) . getHeight ( ) - ( 1 + ( dataSets [ dataSetId ] [ dataValueId ] == 0 ? 0 : ( int ) ( ( dataSets [ dataSetId ] [ dataValueId ] / this . getMaxValueForDataSet ( dataSetId ) ) * this . getSize ( ) . getHeight ( ) ) ) ) ; if ( dataValueId != 0 ) { graphics . drawLine ( this . getPosition ( ) . getX ( ) + dataValueId - 1 , lastY , this . getPosition ( ) . getX ( ) + dataValueId , nextY ) ; } graphics . drawRect ( this . getPosition ( ) . getX ( ) + dataValueId , nextY , 1 , 1 ) ; lastY = nextY ; } } }
Render the graph out.
Render the graph out .