@Override
protected void paint() {
canvas.clear();
for (int i = 0, n = visualizations.size(); i < n; i++) {
Visualization<?, ?> viz = visualizations.get(i);
GraphModel model = viz.getModel().getGraphModel();
GraphUiProps graphUiProps = viz.getGraphUiProps();
Color graphColor = graphUiProps.getGraphColor();
Color graphStrokeColor = graphUiProps.getStrokeColor();
double maxYValue = Math.max(model.getMaxEncounteredValue(),
graphUiProps.getYAxisScaleCap());
double yAdjustment = COORD_Y_HEIGHT / maxYValue;
canvas.setLineWidth(2);
canvas.setStrokeStyle(graphStrokeColor);
canvas.setFillStyle(graphColor);
canvas.setGlobalAlpha(0.7);
// Redraw timeline
canvas.beginPath();
canvas.moveTo(0, COORD_Y_HEIGHT);
for (int x = 0, p = getPlotPrecision(); x <= p; x++) {
double xVal = (double) x * getCoordDelta();
double yVal = model.getRangeValue(getLeftBound()
+ (getDomainDelta() * (double) x), getDomainDelta())
* yAdjustment;
canvas.lineTo(xVal, COORD_Y_HEIGHT - yVal);
}