本文整理汇总了Java中org.achartengine.ChartFactory.getCubeLineChartView方法的典型用法代码示例。如果您正苦于以下问题:Java ChartFactory.getCubeLineChartView方法的具体用法?Java ChartFactory.getCubeLineChartView怎么用?Java ChartFactory.getCubeLineChartView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.achartengine.ChartFactory
的用法示例。
在下文中一共展示了ChartFactory.getCubeLineChartView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
public void onResume()
{
super.onResume();
LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
if (mChart == null) {
initChart();
//addSampleData();
mChart = ChartFactory.getCubeLineChartView(this, mDataset, mRenderer, 0.3f);
layout.addView(mChart);
} else {
mChart.repaint();
}
trigger();
}
示例2: onCreateView
import org.achartengine.ChartFactory; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
//Log.i(TAG, "ResultAL: " + resultAL);
//View v = inflater.inflate(R.layout.fragment_indiv_chart, container, false);
LinearLayout ll = (LinearLayout) inflater.inflate(R.layout.fragment_indiv_chart, container, false);
FrameLayout fl = null;
try{
fl = (FrameLayout) ll.findViewById(R.id.fragment_indiv_chart_FF);
}catch (NullPointerException e){ }
TextView tv = (TextView) ll.findViewById(R.id.fragment_indiv_chart_TV);
marketId = IndivActivity.marketId;
// marketId = getArguments().getInt("marketId");
//Log.i(TAG, "marketId is: " + marketId);
if (mChart == null) {
//Log.i(TAG, "mChart detected as null");
initChart();
mChart = ChartFactory.getCubeLineChartView(getActivity(), mDataset, mRenderer, 0.2f);
fl.addView(mChart);
fl.setBackgroundColor(Color.parseColor("#222222"));
tv.setText("Price (1 wk.)");
tv.setTextColor(Color.WHITE);
} else {
// Log.i(TAG, "mChart detected as existing already");
mChart.repaint();
}
//return ll;
new JSONGet(getActivity(), marketId).execute(JSON_API);
return ll;
}