@Override
    protected void drawData(Graphics g) {
         if(graphValues == null) return;

            int X, Y;
            int lastX = Integer.MIN_VALUE;
            int highestValue = bufferYmax;
            int lowestValue = bufferYmin;

            if (lowestValue <= highestValue){ 
                //jLabelVMin.setText("" + lowestValue);
                jLabelVMin.setText("" + labelFormat.format(lowestValue * scale));
                //jLabelVMax.setText("" + highestValue);
                jLabelVMax.setText("" + labelFormat.format(highestValue * scale));
            }

            int w = computeX(1)- computeX(0) + 1;

            g.setColor(color);
            Graphics2D g2 = (Graphics2D)g;
            Stroke s = g2.getStroke();
            g2.setStroke(new BasicStroke(w));

            for(int i = 0; i < graphValues.length; i++) {

                if(graphValues[i] != graphBuffer.getInvalidNumber()) {
                    X = computeX(i);

                    if (graphValues[i] < ymin) {
                        Y = computeY(ymin);
                    }
                    else if (graphValues[i] > ymax) {
                        Y = computeY(ymax);
                    }
                    else {

                       Y = computeY(graphValues[i]);
                    }



                    if (graphValues[i] > 0)
                        g2.drawLine(X, computeY(0)-w/2, X, Y+w/2);
                    else if (graphValues[i] < 0)
                        g2.drawLine(X, computeY(0)+w/2, X, Y-w/2);
                }

            }

        g2.setStroke(s);
    }