com.androidplot.xy.PointLabelFormatter Java Examples

The following examples show how to use com.androidplot.xy.PointLabelFormatter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DynamicPlot.java    From AccelerationAlert with Apache License 2.0 5 votes vote down vote up
/**
 * Add a series to the plot.
 * 
 * @param seriesName
 *            The name of the series.
 * @param key
 *            The unique series key.
 * @param color
 *            The series color.
 */
public void addSeriesPlot(String seriesName, int key, int color)
{
	history.append(key, new LinkedList<Number>());

	series.append(key, new SimpleXYSeries(seriesName));

	LineAndPointFormatter formatter = new LineAndPointFormatter(Color.rgb(
			0, 153, 204), Color.rgb(0, 153, 204), Color.TRANSPARENT,
			new PointLabelFormatter(Color.TRANSPARENT));

	Paint linePaint = new Paint();
	linePaint.setAntiAlias(true);
	linePaint.setStyle(Paint.Style.STROKE);
	linePaint.setColor(color);
	linePaint.setStrokeWidth(LINE_WIDTH);

	formatter.setLinePaint(linePaint);

	Paint vertexPaint = new Paint();
	vertexPaint.setAntiAlias(true);
	vertexPaint.setStyle(Paint.Style.STROKE);
	vertexPaint.setColor(color);
	vertexPaint.setStrokeWidth(VERTEX_WIDTH);

	formatter.setVertexPaint(vertexPaint);

	dynamicPlot.addSeries(series.get(key), formatter);
}
 
Example #2
Source File: CustomPointFormatter.java    From sensordatacollector with GNU General Public License v2.0 4 votes vote down vote up
public CustomPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, PointLabelFormatter plf)
{
    super(lineColor, vertexColor, fillColor, plf, FillDirection.BOTTOM);
}
 
Example #3
Source File: CustomPointFormatter.java    From sensordatacollector with GNU General Public License v2.0 4 votes vote down vote up
public CustomPointFormatter(Integer lineColor, Integer vertexColor, Integer fillColor, PointLabelFormatter plf, FillDirection fillDir)
{
    super(lineColor, vertexColor, fillColor, plf, fillDir);
}