本文整理汇总了Java中com.db.chart.view.BarChartView类的典型用法代码示例。如果您正苦于以下问题:Java BarChartView类的具体用法?Java BarChartView怎么用?Java BarChartView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BarChartView类属于com.db.chart.view包,在下文中一共展示了BarChartView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: produceThree
点赞 2
import com.db.chart.view.BarChartView; //导入依赖的package包/类
/**
*
* Chart 3
*
*/
public void produceThree(ChartView chart, Runnable action){
BarChartView barChart = (BarChartView) chart;
Tooltip tip = new Tooltip(BarActivity.this, R.layout.barchart_three_tooltip);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat(View.ALPHA, 1);
tip.setEnterAnimation(alpha);
alpha = PropertyValuesHolder.ofFloat(View.ALPHA,0);
tip.setExitAnimation(alpha);
}
barChart.setTooltips(tip);
BarSet dataset = new BarSet(mLabelsThree, mValuesThree);
dataset.setColor(Color.parseColor("#eb993b"));
barChart.addData(dataset);
barChart.setBarSpacing(Tools.fromDpToPx(3));
barChart.setXLabels(AxisController.LabelPosition.NONE)
.setYLabels(AxisController.LabelPosition.NONE)
.setXAxis(false)
.setYAxis(false);
Animation anim = new Animation()
.setEasing(new ElasticEase())
.setEndAction(action);
chart.show(anim);
}
开发者ID:Knockathon2017,
项目名称:knockathon-scripts-kiddies,
代码行数:39,
代码来源:BarActivity.java
示例2: setUpStatistics
点赞 2
import com.db.chart.view.BarChartView; //导入依赖的package包/类
private void setUpStatistics(){
cData = cDb.getData();
transactionLineChart = (LineChartView) findViewById(R.id.transaction_linechart);
creditLineChart = (LineChartView) findViewById(R.id.credit_linechart);
averageBarChart = (BarChartView) findViewById(R.id.average_barchart);
setUpTransactionLineChart();
setUpCreditLineChart();
setUpAverageBarChart();
setUpAllTimeSpendings();
}
开发者ID:ueman,
项目名称:CampusCardReader,
代码行数:11,
代码来源:MainActivity.java
示例3: onCreate
点赞 2
import com.db.chart.view.BarChartView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_data_view);
this.outputTextView = (TextView) this.findViewById(R.id.outputTextView);
this.barChartView = (BarChartView) this.findViewById(R.id.barChartView);
barChartView.setBarBackgroundColor(Color.BLACK);
barChartView.setBarSpacing(10);
barChartView.setSetSpacing(10);
barChartView.setLabelsColor(Color.WHITE);
barChartView.setAxisColor(Color.GRAY);
barChartView.setAxisBorderValues(-20, 20, 2);
this.xBar = new Bar("x", 0.0f);
this.yBar = new Bar("y", 0.0f);
this.zBar = new Bar("z", 0.0f);
this.xBar.setColor(Color.WHITE);
this.yBar.setColor(Color.WHITE);
this.zBar.setColor(Color.WHITE);
BarSet barSet = new BarSet();
barSet.addBar(xBar);
barSet.addBar(yBar);
barSet.addBar(zBar);
barChartView.addData(barSet);
barChartView.show();
// this.accelerometerService.setRawAccelerometerDataListener(new AccelerometerService.RawAccelerometerDataListener() {
// @Override
// public void newData(float x, float y, float z) {
// double avg = Math.sqrt((x * x) + (y * y) + (z * z));
// String format = String.format("%9.5f, %9.5f, %9.5f, %9.5f\n", x, y, z, avg);
//// outputTextView.append(format);
//
// xBar.setValue(x);
// yBar.setValue(y);
// zBar.setValue(z);
// barChartView.show();
//
// PrintWriter pw = fileWriter;
// if (pw != null) {
// pw.write(format);
// }
// }
// });
// this.fileNameEditText = (EditText) this.findViewById(R.id.fileNameEditText);
//
// this.recordButton = (Button) this.findViewById(R.id.recordButton);
// this.recordButton.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// recordButtonPressed();
// }
// });
// Button optionsButton = (Button) this.findViewById(R.id.optionsButton);
// optionsButton.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// displayOptionsMenu();
// }
// });
}
开发者ID:uml-ubicomp-2016-spring,
项目名称:ubicomp16-DropApp,
代码行数:67,
代码来源:DataViewActivity.java
示例4: produceOne
点赞 2
import com.db.chart.view.BarChartView; //导入依赖的package包/类
public void produceOne(ChartView chart, Runnable action){
if(getActivity()==null) {
return;
}
int currentColor;
int preClor;
preClor=mShowDaily?PRECOLOR:mCurrentColor;
currentColor=mShowDaily?mCurrentColor:PRECOLOR;
prepareStat();
AnimatorUtils.showCardBackgroundColorAnimation(mCardItem, preClor, currentColor, 400);
if(mLables.length<5||mStatValues.length<5) {
return;
}
barChart = (BarChartView) chart;
barChart.setOnEntryClickListener(new OnEntryClickListener() {
@Override
public void onClick(int setIndex, int entryIndex, Rect rect) {
new FinestWebView.Builder(getActivity())
.gradientDivider(false)
.show(mPlayerUrls[entryIndex]);
}
});
Tooltip tooltip = new Tooltip(getActivity(), R.layout.barchart_one_tooltip);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
tooltip.setEnterAnimation(PropertyValuesHolder.ofFloat(View.ALPHA, 1));
tooltip.setExitAnimation(PropertyValuesHolder.ofFloat(View.ALPHA, 0));
}
barChart.setTooltips(tooltip);
BarSet barSet = new BarSet(mLables, mStatValues);
barSet.setColor(preClor);
barChart.addData(barSet);
barChart.setSetSpacing(Tools.fromDpToPx(-15));
barChart.setBarSpacing(Tools.fromDpToPx(20));
barChart.setRoundCorners(Tools.fromDpToPx(4));
gridPaint = new Paint();
gridPaint.setColor(CHART_TEXT_COLOR);
gridPaint.setStyle(Paint.Style.STROKE);
gridPaint.setAntiAlias(true);
gridPaint.setStrokeWidth(Tools.fromDpToPx(.75f));
barChart.setBorderSpacing(5)
.setAxisBorderValues(0, mMax, STEP)
.setGrid(BarChartView.GridType.FULL, mMax, 6, gridPaint)
.setYAxis(false)
.setXLabels(XController.LabelPosition.OUTSIDE)
.setYLabels(YController.LabelPosition.OUTSIDE)
.setLabelsColor(CHART_TEXT_COLOR)
.setAxisColor(CHART_TEXT_COLOR);
int[] order = {2, 1, 3, 0, 4};
final Runnable auxAction = action;
Runnable chartOneAction = new Runnable() {
@Override
public void run() {
showTooltipOne();
auxAction.run();
}
};
barChart.show(new Animation()
.setOverlap(.5f, order)
.setEndAction(chartOneAction));
}
开发者ID:SilenceDut,
项目名称:NBAPlus,
代码行数:71,
代码来源:BarFragment.java