void drawLabel(char symbol, boolean opposite, int gridId, double scaledstep, int x, int y, Font font, Paint fontColor, String labfmt) {

        String graph_label;
        int labelOffset = (int) (worker.getFontAscent(font) / 2);
        double label_value = scaledstep * gridId;
        if (gridId == 0 || symbol == ' ') {
            if (scaledstep < 1) {
                if (gridId != 0 && gdef.altYGrid) {
                    graph_label = Util.sprintf(gdef.locale, labfmt, label_value);
                }
                else {
                    graph_label = Util.sprintf(gdef.locale, "%4.1f", label_value);
                }
            }
            else {
                graph_label = Util.sprintf(gdef.locale, "%4.0f", label_value);
            }
        }
        else {
            if (scaledstep < 1) {
                graph_label = Util.sprintf(gdef.locale, "%4.1f %c", label_value, symbol);
            }
            else {
                graph_label = Util.sprintf(gdef.locale, "%4.0f %c", label_value, symbol);
            }
        }

        int length = (int) (worker.getStringWidth(graph_label, font));
        if (opposite) {
            worker.drawString(graph_label, x + PADDING_VLABEL, y + labelOffset, font, fontColor);
        } else {
            worker.drawString(graph_label, x - length - PADDING_VLABEL, y + labelOffset, font, fontColor);
        }

    }