package vismon.plot;

import vismon.data.Indicator;
import vismon.data.Session;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

public class MCTrialsPlot extends HistogramPlot {

    private Indicator indicator;

    public MCTrialsPlot(Indicator indicator) {
        this.indicator = indicator;
        mainColor = Color.LIGHT_GRAY;
    }

    public List<Integer> getPDFBinHeights() {
        List<Double> values = new ArrayList<Double>();
        for (int i = 0; i < Session.getSimulationNum(); ++i)
            values.add(Session.getCrosshairScenario().getValue(i, indicator));
        min = indicator.getMin();
        max = indicator.getMax();
        return super.getPDFBinHeights(values);
    }

    @Override
    public void drawHistogram(Graphics2D g, List<Integer> binHeights, Color color, int x, int y, int w, int h) {
        super.drawHistogram(g, binHeights, mainColor, x, y, w, h);    //To change body of overridden methods use File | Settings | File Templates.
    }
}
