當前位置: 首頁>>代碼示例>>Java>>正文


Java XEnum類代碼示例

本文整理匯總了Java中org.xclcharts.renderer.XEnum的典型用法代碼示例。如果您正苦於以下問題:Java XEnum類的具體用法?Java XEnum怎麽用?Java XEnum使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XEnum類屬於org.xclcharts.renderer包,在下文中一共展示了XEnum類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setLabelBoxStyle

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
/**
 * 顯示標簽標識風格。默認為帶箭頭的標識框
 * @param style 風格
 */
public void setLabelBoxStyle(XEnum.LabelBoxStyle style)
{
	mLabelBoxStyle = style;
	
	if(XEnum.LabelBoxStyle.TEXT ==  mLabelBoxStyle)
	{
		this.hideBorder();
		this.hideBackground();
		return;
	}
	
	if(XEnum.LabelBoxStyle.CIRCLE ==  mLabelBoxStyle)
	{
		this.hideBorder();
		showBackground();
	}else{
		showBorder();
		showBackground();
	}		
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:25,代碼來源:PlotLabel.java

示例2: chartLnRender

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void chartLnRender()
{
	try {
		//設置繪圖區默認縮進px值,留置空間顯示Axis,Axistitle....		
		int [] ltrb = getBarLnDefaultSpadding();
		lnChart.setPadding(ltrb[0], ltrb[1], ltrb[2], ltrb[3]);	
		
		renderLnAxis();
		
		lnChart.getPlotLegend().show();
		
		//允許線與軸交叉時,線會斷開
		lnChart.setLineAxisIntersectVisible(false);
														
		lnChart.setXCoordFirstTickmarksBegin(true);
		lnChart.setBarCenterStyle(XEnum.BarCenterStyle.TICKMARKS);
		lnChart.getCategoryAxis().hideAxisLabels();
		//lnChart.getPlotArea().setBackgroundColor(true, Color.BLUE);
		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		Log.e(TAG, e.toString());
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:25,代碼來源:MultiAxisChart01View.java

示例3: renderLabels

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
protected boolean renderLabels(Canvas canvas)
{		
	if(null == mLstLabels) return false;
	
	boolean showLabel = true;
	
	if(mSaveLabelsPosition)
	{
		if( XEnum.LabelSaveType.ONLYPOSITION == mLabelSaveType ) showLabel = false;
	}
					
	int count = mLstLabels.size();
	for(int i=0 ;i<count; i++ )
	{
		 PlotArcLabelInfo info = mLstLabels.get(i);			
		 renderLabel(canvas,mDataset.get(info.getID()),info,mSaveLabelsPosition,showLabel);			
	}
	
	if(!mSaveLabelsPosition)mLstLabels.clear();
	
	return true;
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:23,代碼來源:PieChart.java

示例4: sortDataSet

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private boolean sortDataSet()
{		
	if(null == mDataSet)
	{
		Log.e(TAG,"數據源為空!");
		return false;
	}		
				
	for(int i= mDataSet.size()- 1;i >= 0;i--)
	{
		FunnelData d = mDataSet.get(i);
		if( Float.compare(d.getData(), 0.0f) == -1 
				||  Float.compare(d.getData(), 0.0f) == 0)
		{
			mDataSet.remove(i);
		}		
	}
	if( mDataSet.size() == 0) return false;			
	if( XEnum.SortType.NORMAL != mSortType)Collections.sort(mDataSet);		
	return true;
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:22,代碼來源:FunnelChart.java

示例5: chartPieRender

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void chartPieRender()
{
	try {				
		//標簽顯示(隱藏,顯示在中間,顯示在扇區外麵)
		chartPie.setLabelStyle(XEnum.SliceLabelStyle.INSIDE);
		chartPie.getLabelPaint().setColor(Color.WHITE);
		
		chartPie.setDataSource(chartDataPie);
		
		chartPie.getPlotLegend().hide();
		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		Log.e(TAG, "chartPieRender():"+e.toString());
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:17,代碼來源:BarChart01View.java

示例6: chartRender

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
public void chartRender()
{
	try {									
		//設置附加信息
		chart.setAttributeInfo(mDataInfo); 					
		
		//半圓方式顯示
		chart.setCircleType(XEnum.CircleType.HALF);	
		
		//設置圖表數據源			
		chart.setDataSource(mlPieData);				
		
		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:19,代碼來源:CircleChart01View.java

示例7: drawClipCategoryAxisLine

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
@Override
protected void drawClipCategoryAxisLine(Canvas canvas)
{
	if(XEnum.Direction.VERTICAL == mDirection &&
			dataAxis.getAxisStdStatus() && categoryAxis.getAxisBuildStdStatus())
	{
	   float y =  getVPDataAxisStdY();			
		categoryAxis.renderAxis(canvas,plotArea.getLeft(), y, plotArea.getRight(), y); 	
	}else if(XEnum.Direction.HORIZONTAL == mDirection &&
			dataAxis.getAxisStdStatus() && categoryAxis.getAxisBuildStdStatus()){		
		float x = getHPDataAxisStdX();
		categoryAxis.renderAxis(canvas,x, plotArea.getTop(), x, plotArea.getBottom()); 			
	}else{
		super.drawClipCategoryAxisLine(canvas);
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:17,代碼來源:BarChart.java

示例8: chartDataSet

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void chartDataSet()
{
	
			//線1的數據集
			List<PointD> linePoint1 = new ArrayList<PointD>();				
			linePoint1.add(new PointD(0d, 3d));	
			linePoint1.add(new PointD(1d, 9d));					
			linePoint1.add(new PointD(2d, 8d));				
			linePoint1.add(new PointD(3d, 7d));				
			linePoint1.add(new PointD(4d, 15d));
			linePoint1.add(new PointD(5d, 16d));
			SplineData dataSeries1 = new SplineData("Go",linePoint1,
					Color.WHITE ); //Color.rgb(54, 141, 238)
			//把線弄細點
			dataSeries1.getLinePaint().setStrokeWidth(6);
			dataSeries1.setLineStyle(XEnum.LineStyle.DASH);	
			dataSeries1.setLabelVisible(false);					
			dataSeries1.setDotStyle(XEnum.DotStyle.RING);
			dataSeries1.getDotPaint().setColor(Color.rgb(30, 179, 143));				
			dataSeries1.getPlotLine().getPlotDot().setRingInnerColor(Color.WHITE);//
		
			chartData.add(dataSeries1);	
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:24,代碼來源:SplineChart05View.java

示例9: defaultAxisSetting

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
/**
 * 圖為橫向或豎向時,軸和Bar的默認顯示風格
 */
protected void defaultAxisSetting()
{				
	if(null == mDirection) return;
	
	categoryAxisDefaultSetting();
	dataAxisDefaultSetting();
		
	if(null != getBar())
	{				
			switch (mDirection) {
				case HORIZONTAL: 	
					getBar().getItemLabelPaint().setTextAlign(Align.LEFT);						
					getBar().setBarDirection(XEnum.Direction.HORIZONTAL);							
					break;				
				case VERTICAL: 
					getBar().setBarDirection(XEnum.Direction.VERTICAL);				
					break;				
			}
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:24,代碼來源:BarChart.java

示例10: chartDataSet

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void chartDataSet()
{
	//將標簽與對應的數據集分別綁定
	//標簽對應的數據集
	List<Double> dataSeries1= new LinkedList<Double>();	
	
	double testData[] = {40,21,32,56,40,54,46,32,89,76,53,62,66,78,47,53,90,80,60,82,77,67,79,85,83,90} ;  
	for(int i=0;i< testData.length;i++){
		dataSeries1.add( testData[i]);			
		mLabels.add( Integer.toString(i));
	}
			
	//設置每條線各自的顯示屬性
	//key,數據集,線顏色,區域顏色
	AreaData line1 = new AreaData("小熊",dataSeries1,Color.rgb(108, 180, 223),Color.YELLOW);
	//不顯示點
	line1.setDotStyle(XEnum.DotStyle.HIDE);
	
	line1.setApplayGradient(true);
	line1.setAreaBeginColor(Color.WHITE);
	line1.setAreaEndColor(Color.rgb(108, 180, 223));
	line1.setGradientDirection(XEnum.Direction.VERTICAL);
	
	mDataset.add(line1);	
						
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:27,代碼來源:AreaChart03View.java

示例11: renderPlotOne

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void renderPlotOne(Canvas canvas,float cx,float funnelWidth,float funnelHeight)
{			
		FunnelData d = mDataSet.get(0);
		float halfWidth = getHalfWidth(funnelWidth,d.getData());
		
		PointF pStart = new PointF();
		PointF pStop = new PointF();
		
		pStart.x = cx - halfWidth;
		pStop.x = cx + halfWidth;			
		
		if(XEnum.SortType.DESC == mSortType)
		{
			pStart.y = pStop.y = plotArea.getTop();
		}else{
			pStart.y = pStop.y = plotArea.getBottom();
		}									
		if(d.getAlpha() != -1)getPaint().setAlpha(d.getAlpha());	
		drawTriangle(canvas,cx, pStart,pStop );
		if(d.getAlpha() != -1)getPaint().setAlpha(255);
		
		float labelY = plotArea.getBottom() - plotArea.getHeight()/2;	
		renderLabels(canvas,d.getLabel(),cx, labelY,d.getColor());
		
		return ;				
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:27,代碼來源:FunnelChart.java

示例12: drawLine

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
public void drawLine(XEnum.LineStyle style,
			float startX,float startY,
			float stopX,float stopY,			 
			Canvas canvas,
			Paint paint
		 	)
{
	
	switch(style)
	{
	case SOLID:		
		canvas.drawLine(startX, startY, stopX, stopY, paint); 
		break;
	case DOT:
		drawDotLine(startX, startY, stopX, stopY, canvas,paint); 
		break;
	case DASH:		
		//虛實線 	
		drawDashLine(startX, startY, stopX, stopY, canvas,paint); 
		break;
	}		
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:23,代碼來源:DrawHelper.java

示例13: chartCustomeLines

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
/**
 * 期望線/分界線
 */
private void chartCustomeLines() {
	CustomLineData cdx1 = new CustomLineData("稍好", 30d, Color.rgb(35, 172,
			57), 5);
	CustomLineData cdx2 = new CustomLineData("舒適", 40d, Color.rgb(69, 181,
			248), 5);
	cdx1.setLabelVerticalAlign(XEnum.VerticalAlign.MIDDLE);
	mXCustomLineDataset.add(cdx1);
	mXCustomLineDataset.add(cdx2);

	CustomLineData cdy1 = new CustomLineData("定製線", 45d, Color.rgb(69, 181,
			248), 5);
	cdy1.setLabelHorizontalPostion(Align.CENTER);
	mYCustomLineDataset.add(cdy1);
}
 
開發者ID:cdkd321,項目名稱:pure,代碼行數:18,代碼來源:SplineChart03View.java

示例14: initChart

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void initChart(int chartStyle)
	{
		switch (chartStyle)
		{
		case 0: // Vertical bar char
			mChart = new BarChart();
//			mChart.getAxisTitle().setLeftTitle("24 Hours Results");
			break;
		case 1:    // Horizontal bar chart
			mChart = new BarChart();
			mChart.setChartDirection(XEnum.Direction.HORIZONTAL);
			break;
		case 2:    // Vertical 3D bar char
			mChart = new BarChart3D();
			break;
		case 3:    // Horizontal 3D bar chart
			mChart = new BarChart3D();
			mChart.setChartDirection(XEnum.Direction.HORIZONTAL);
			break;
		case 4:    // Vertical stack bar char
			mChart = new StackBarChart();
			((StackBarChart) mChart).setTotalLabelVisible(false);
			break;
		case 5:    // Horizontal stack bar chart
			mChart = new StackBarChart();
			mChart.setChartDirection(XEnum.Direction.HORIZONTAL);
			((StackBarChart) mChart).setTotalLabelVisible(false);
			break;
		}
	}
 
開發者ID:PacteraMobile,項目名稱:pacterapulse-android,代碼行數:31,代碼來源:EmotionBarChartView.java

示例15: chartRender

import org.xclcharts.renderer.XEnum; //導入依賴的package包/類
private void chartRender()
{
	try {
		
		//設置繪圖區默認縮進px值,留置空間顯示Axis,Axistitle....		
		int [] ltrb = getBarLnDefaultSpadding();
		chart.setPadding(ltrb[0],ltrb[1], ltrb[2],  ltrb[3]);	
	
				
		//標題
		chart.setTitle("營銷漏鬥");
		chart.addSubtitle("(XCL-Charts Demo)");	
		//數據源
		chart.setDataSource(chartData);
		
		chart.showBorder();

		chart.setSortType(XEnum.SortType.DESC);
		
		//chart.setSortType(XEnum.SortType.ASC);
		
		chart.setLabelAlign(XEnum.HorizontalAlign.LEFT);
		
		chart.syncLabelLineColor();

		chart.setPlotWidthPercent(60.f);
		
		chart.getFunnelLinePaint().setColor(Color.WHITE);
		chart.getLabelPaint().setTextSize(18);
		 
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
開發者ID:xcltapestry,項目名稱:XCL-Charts,代碼行數:36,代碼來源:FunnelChart01View.java


注:本文中的org.xclcharts.renderer.XEnum類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。