Package com.google.test.metric.report.chart

Examples of com.google.test.metric.report.chart.HistogramChartUrl


    analysisModel.addClassCost(classCost);
  }

  public String getHistogram() {
    GradeCategories gradeCategories = new GradeCategories(maxExcellentCost, maxAcceptableCost);
    HistogramChartUrl histogramChartUrl =
        gradeCategories.createHistogram(HISTOGRAM_WIDTH, HISTOGRAM_HEIGHT, costs, new Logarithmic());
    return histogramChartUrl.getHtml();
  }
View Full Code Here


    int maxScale = 61;
    MultiHistogramDataModel model = buildHistogramDataModel(costs, scalingFunction);
    int[] excellent = model.getExcellent().getScaledBinRange(0, MAX_VALUE, maxScale);
    int[] good = model.getGood().getScaledBinRange(0, MAX_VALUE, maxScale);
    int[] needsWork = model.getNeedsWork().getScaledBinRange(0, MAX_VALUE, maxScale);
    HistogramChartUrl chart = new HistogramChartUrl();
    chart.setItemLabel(model.getOverallHistogram().getBinLabels(20));
    chart.setValues(excellent, good, needsWork);
    chart.setYMark(0, model.getOverallHistogram().getMaxBin(), scalingFunction);
    chart.setSize(width, height);
    chart.setBarWidth((width - HISTOGRAM_LEGEND_WIDTH) / model.getBinCount(), 0, 0);
    chart.setChartLabel("Excellent", "Good", "Needs Work");
    chart.setColors(GREEN, YELLOW, RED);
    return chart;
  }
View Full Code Here

TOP

Related Classes of com.google.test.metric.report.chart.HistogramChartUrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.