本文整理汇总了Java中org.achartengine.renderer.XYSeriesRenderer.setLineWidth方法的典型用法代码示例。如果您正苦于以下问题:Java XYSeriesRenderer.setLineWidth方法的具体用法?Java XYSeriesRenderer.setLineWidth怎么用?Java XYSeriesRenderer.setLineWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.achartengine.renderer.XYSeriesRenderer
的用法示例。
在下文中一共展示了XYSeriesRenderer.setLineWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
@Override
public void addRenderer(int series, Activity activity, int color) {
XYSeriesRenderer mCurrentRenderer = new XYSeriesRenderer();
mCurrentRenderer.setLineWidth(getDPI(3));
mCurrentRenderer.setColor(color);
// Include low and max value
mCurrentRenderer.setDisplayBoundingPoints(true);
// we add point markers
mCurrentRenderer.setPointStyle(PointStyle.CIRCLE);
mCurrentRenderer.setPointStrokeWidth(getDPI(5));
mCurrentRenderer.setShowLegendItem(false);
XYSeries seriesData = new XYSeries("data" + series);
mSeriesDataSet.add(series, seriesData);
mRenderer.addSeriesRenderer(series, mCurrentRenderer);
}
示例2: buildRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private XYMultipleSeriesRenderer buildRenderer(Context context) {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
renderer.setAxisTitleTextSize(16);
renderer.setChartTitleTextSize(0);
renderer.setLabelsTextSize(15);
renderer.setLegendTextSize(20);
renderer.setLegendHeight(22);
renderer.setPointSize(5f);
renderer.setMargins(new int[] { 20, 30, 15, 20 });
renderer.setChartTitle("");
renderer.setXTitle(context.getResources().getString(R.string.X));
renderer.setYTitle(context.getResources().getString(R.string.Y));
renderer.setXAxisMin(Graph.MIN_HEIGHT_X);
renderer.setXAxisMax(Graph.MAX_HEIGHT_X);
renderer.setYAxisMin(Graph.MIN_HEIGHT_Y);
renderer.setYAxisMax(Graph.MAX_HEIGHT_Y);
renderer.setAxesColor(Color.GRAY);
renderer.setLabelsColor(Color.LTGRAY);
renderer.setYLabelsAlign(Align.RIGHT);
renderer.setXLabels(20);
renderer.setYLabels(20);
renderer.setPanEnabled(true);
renderer.setZoomEnabled(true);
renderer.setShowGrid(true);
renderer.setXAxisBold(true);
renderer.setYAxisBold(true);
renderer.setZoomButtonsVisible(false);
renderer.setExternalZoomEnabled(true);
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(context.getResources().getColor(R.color.graph_color));
r.setPointStyle(PointStyle.POINT);
r.setLineWidth(4f);
renderer.addSeriesRenderer(r);
return renderer;
}
示例3: getReportRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private XYSeriesRenderer getReportRenderer(int color) {
int displayChartValueDistance = 40;
int lineWidth = 3;
XYSeriesRenderer reportRenderer = new XYSeriesRenderer();
reportRenderer.setPointStyle(PointStyle.CIRCLE);
reportRenderer.setFillPoints(true);
reportRenderer.setColor(color);
reportRenderer.setLineWidth(lineWidth);
reportRenderer.setDisplayChartValues(true);
reportRenderer.setDisplayChartValuesDistance(displayChartValueDistance);
return reportRenderer;
}
示例4: buildRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
protected XYMultipleSeriesRenderer buildRenderer(int color, PointStyle style, boolean fill) {
XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
//设置图表中曲线本身的样式,包括颜色、点的大小以及线的粗细等
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(Color.RED);
// r.setPointStyle(null);
// r.setFillPoints(fill);
r.setLineWidth(1);
renderer.addSeriesRenderer(r);
return renderer;
}
示例5: addValue
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
/**
* Adds a value into the both the data set containing all constellations and individual data set
* of the constellation of the satellite
*/
private void addValue(int tab, int constellationType, int svID,
double timeInSeconds, double value) {
XYMultipleSeriesDataset dataSetAll = getDataSet(tab, DATA_SET_INDEX_ALL);
XYMultipleSeriesRenderer rendererAll = getRenderer(tab, DATA_SET_INDEX_ALL);
value = Double.parseDouble(sDataFormat.format(value));
if (hasSeen(constellationType, svID, tab)) {
// If the satellite has been seen before, we retrieve the dataseries it is add and add new
// data
dataSetAll
.getSeriesAt(mSatelliteIndex[tab].get(constellationType).get(svID))
.add(timeInSeconds, value);
mDataSetList[tab]
.get(constellationType)
.getSeriesAt(mSatelliteConstellationIndex[tab].get(constellationType).get(svID))
.add(timeInSeconds, value);
} else {
// If the satellite has not been seen before, we create new dataset and renderer before
// adding data
mSatelliteIndex[tab].get(constellationType).put(svID, dataSetAll.getSeriesCount());
mSatelliteConstellationIndex[tab]
.get(constellationType)
.put(svID, mDataSetList[tab].get(constellationType).getSeriesCount());
XYSeries tempSeries = new XYSeries(CONSTELLATION_PREFIX[constellationType - 1] + svID);
tempSeries.add(timeInSeconds, value);
dataSetAll.addSeries(tempSeries);
mDataSetList[tab].get(constellationType).addSeries(tempSeries);
XYSeriesRenderer tempRenderer = new XYSeriesRenderer();
tempRenderer.setLineWidth(5);
tempRenderer.setColor(mColorMap.getColor(svID, constellationType));
rendererAll.addSeriesRenderer(tempRenderer);
mRendererList[tab].get(constellationType).addSeriesRenderer(tempRenderer);
}
}
示例6: prepareThresholdSeries
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private void prepareThresholdSeries() {
mThresholdSeries = new TimeSeries(THRESHOLD_SERIES_TITLE);
dataset.addSeries(mThresholdSeries);
XYSeriesRenderer renderer = new XYSeriesRenderer();
renderer.setLineWidth(3f);
renderer.setColor(Color.BLACK);
this.renderer.addSeriesRenderer(renderer);
}
示例7: buildXYSeriesRender
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
protected XYSeriesRenderer buildXYSeriesRender(int color, PointStyle style){
XYSeriesRenderer renderer = new XYSeriesRenderer();
renderer.setColor(color);
renderer.setPointStyle(style);
renderer.setFillPoints(true);
renderer.setDisplayChartValues(true);
//Chaning size in graph
renderer.setLineWidth(3);
renderer.setChartValuesTextSize(25.0f);
return renderer;
}
示例8: buildXYSeriesRender
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
protected XYSeriesRenderer buildXYSeriesRender(int color, PointStyle style){
XYSeriesRenderer renderer = new XYSeriesRenderer();
renderer.setColor(color);
renderer.setPointStyle(style);
renderer.setFillPoints(true);
renderer.setDisplayChartValues(true);
//Chaning size in graph
renderer.setLineWidth(3);
renderer.setChartValuesTextSize(25.0f);
renderer.setAnnotationsTextSize(20.0f);
return renderer;
}
示例9: initChart
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private void initChart() {
mCurrentSeries = new XYSeries("Sample Data");
mRenderer.setApplyBackgroundColor(true);
mRenderer.setBackgroundColor(Color.parseColor("#555555"));
mDataset.addSeries(mCurrentSeries);
mRenderer.setShowAxes(false); //change back
mRenderer.clearXTextLabels();
//mRenderer.clearYTextLabels();
mRenderer.setLabelsTextSize(16f);
mRenderer.setYLabels(5);
mRenderer.setShowAxes(false);
mRenderer.setXLabels(0);
mCurrentRenderer = new XYSeriesRenderer();
mCurrentRenderer.setLineWidth(6);
mCurrentRenderer.setShowLegendItem(false);
mCurrentRenderer.setFillPoints(true);
mCurrentRenderer.setColor(Color.parseColor("#FFFFFF"));
mCurrentSeries.setTitle("");
mRenderer.addSeriesRenderer(mCurrentRenderer);
mRenderer.setMargins(new int[]{0, 12, 0, 0});
mRenderer.setShowLegend(false);
mRenderer.setMarginsColor(Color.parseColor("#555555"));
mRenderer.setPanEnabled(false, false);
mRenderer.setZoomEnabled(false, false);
}
示例10: GraphView
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
public GraphView(Context context) {
super(context);
XYMultipleSeriesDataset ds = new XYMultipleSeriesDataset();
series = new TimeSeries("quote");
ds.addSeries(series);
renderers = new XYMultipleSeriesRenderer();
renderer = new XYSeriesRenderer();
renderer.setColor(Color.GREEN);
renderer.setLineWidth(5.0f);
renderer.setFillBelowLine(true);
renderer.setFillBelowLineColor(Color.green(64));
renderers.addSeriesRenderer(renderer);
tc = new TimeChart(ds, renderers);
}
示例11: addSeriesRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
public static void addSeriesRenderer(int color, XYMultipleSeriesRenderer renderer) {
XYSeriesRenderer r = new XYSeriesRenderer();
r.setColor(color);
r.setPointStyle(PointStyle.POINT);
r.setLineWidth(4f);
renderer.addSeriesRenderer(r);
}
示例12: onActivityCreated
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
@Override
public void onActivityCreated(final Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Log.d(TAG, "onActivityCreated");
mViewZoomIn = getActivity().findViewById(R.id.zoom_in);
mViewZoomOut = getActivity().findViewById(R.id.zoom_out);
mViewZoomReset = getActivity().findViewById(R.id.zoom_reset);
mViewZoomIn.setOnClickListener(this);
mViewZoomOut.setOnClickListener(this);
mViewZoomReset.setOnClickListener(this);
pulseSeries = new TimeSeries("Pulse");
if (mPulses.size() > 0) {
for (Pulse p : mPulses) {
pulseSeries.add(new Date(p.getTime()), p.getValue());
}
}
mDataset.addSeries(pulseSeries);
// graph itself
XYSeriesRenderer pulseRenderer = new XYSeriesRenderer();
pulseRenderer.setDisplayChartValues(true);
pulseRenderer.setChartValuesTextSize(25);
pulseRenderer.setPointStyle(PointStyle.CIRCLE);
pulseRenderer.setColor(Color.RED);
pulseRenderer.setFillPoints(true);
pulseRenderer.setLineWidth(3);
mRenderer.addSeriesRenderer(pulseRenderer);
maxXRange = pulseSeries.getMaxX();
minXRange = pulseSeries.getMinX();
}
示例13: getTemperatureSeriesRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private XYSeriesRenderer getTemperatureSeriesRenderer() {
XYSeriesRenderer renderer1 = new XYSeriesRenderer();
renderer1.setColor(Color.BLUE);
renderer1.setPointStyle(PointStyle.POINT);
renderer1.setLineWidth(3);
return renderer1;
}
示例14: getHumiditySeriesRenderer
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
private XYSeriesRenderer getHumiditySeriesRenderer() {
XYSeriesRenderer renderer1 = new XYSeriesRenderer();
renderer1.setColor(Color.YELLOW);
renderer1.setLineWidth(3);
renderer1.setPointStyle(PointStyle.POINT);
return renderer1;
}
示例15: createGraph
import org.achartengine.renderer.XYSeriesRenderer; //导入方法依赖的package包/类
protected void createGraph() {
graphRenderer = new XYMultipleSeriesRenderer();
graphRenderer.setChartTitle("Line Graph");
graphRenderer.setChartTitleTextSize(50);
graphRenderer.setMargins(new int[] {100, 100, 70, 50}); // top, left, bottom, right
graphRenderer.setBackgroundColor(Color.WHITE);
graphRenderer.setMarginsColor(Color.parseColor("#FFFFFF"));
graphRenderer.setAxesColor(Color.DKGRAY);
graphRenderer.setXTitle("Time(sec)");
graphRenderer.setYTitle("Value");
graphRenderer.setAxisTitleTextSize(30);
graphRenderer.setLabelsTextSize(25);
graphRenderer.setYLabelsAlign(Paint.Align.RIGHT);
// graphRenderer.setPointSize(50);
graphRenderer.setLegendTextSize(30);
graphRenderer.setXAxisMin(0);
graphRenderer.setXAxisMax(100);
graphRenderer.setZoomEnabled(false, false);
graphDataSerieses = new XYSeries[sensorInfo.getType().getValueNumbers()];
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();;
for(int loop1 = 0 ; loop1 < sensorInfo.getType().getValueNumbers() ; loop1++) {
graphDataSerieses[loop1] = new TimeSeries(sensorInfo.getType().getValueInfos()[loop1][0] + "(" + sensorInfo.getType().getValueInfos()[loop1][1] + ")");
dataset.addSeries(graphDataSerieses[loop1]);
XYSeriesRenderer seriesRenderer = new XYSeriesRenderer();
seriesRenderer.setColor(Color.parseColor(COLORS[loop1]));
seriesRenderer.setPointStyle(PointStyle.POINT);
seriesRenderer.setLineWidth(3);
graphRenderer.addSeriesRenderer(seriesRenderer);
}
graphView = ChartFactory.getLineChartView(this, dataset, graphRenderer);
LinearLayout graphArea = (LinearLayout) findViewById(R.id.ll_graph_area);
graphArea.addView(graphView);
graphArea.setClickable(false);
}