Tag: achartengine

AChartEngine,点击获取情节值

我用achartengine编写了一个简单的时间表。 我想要做的是通过点击图表上的点来获取已经绘制的值,这可能吗?

如何在2点之间填充数组列表?

我有这段代码。 解释: 用户输入“initcores”数据和“ttime”数据(“fcores”是结果)。 我想用0到ttime的值填充x数组,从initcores到fcores填充y,并做散点图,x vs y。 我有一个问题: 如果我把“for(double t = 0; t <= fcores; t = t + fcores / 10.0){y.add(t);” 它给了我一个情节,但错了。 如果我把“for(double t = initcores; t <= fcores; ……”(这是正确的,因为我们从initcores开始) 情节中没有出现任何内容。 我不是在这儿吗? 谢谢! ……… Double initcores= getInitcores(); Double fcores= getFcores(); Double ttime=getTime(); ArrayList x =new ArrayList(); ArrayList y =new ArrayList(); //fill x,y values for (double […]

使用Achartengine可以实现多个堆叠条形图吗?

我尝试将另一组值添加到带有achartengine的堆积条形图的演示示例中,但我引入的新值不会出现在图表上。 堆叠条限制为两个吧? public Intent getIntent(Context context) { String[] titles = new String[] { “Good”, “Defect”, “Repair” }; List values = new ArrayList(); values.add(new double[] { 14230, 12300, 1424, 15240, 15900, 19200, 22030, 21200, 19500, 15500, 12060, 14000 }); values.add(new double[] { 14230, 12300, 14240, 15244, 15900, 19200, 22030, 21200, 19500, 15500, 12600, 14000 }); values.add(new […]

修改后如何构建achartengine库?

我修改了achartengine代码以便为自己优化它但是如何在AndroidStudio中构建lib? (我是编码新手) 我找到了一个build.xml文件,所以应该可以运行ant jar来创建lib,但是我该怎么做……? 或者,还有更好的方法?

在一天内保存用户数据(同一天 – >许多用户数据)

我有一个应用程序,用户在edittext中输入数据并按下保存按钮。 通过按“保存”,我在文件中保存用户数据(在一列中)和当前日期(在另一列中)。 然后,我按下另一个按钮并绘制图表(使用achartengine)日期(x轴)数据(y轴)。 因此,在一天内输入数据会导致保存,例如:“1”(用户数据) – > 20/4/2013,“2” – > 20/4/2013,“3” – > 20/4/2013 。 在绘图中,我在y轴上有3个点(ok),在x轴上有3个点(不行)。 我想在x轴上有一个点,因为在同一天输入的数据。 我保存数据: public void savefunc(){ SimpleDateFormat thedate = new SimpleDateFormat(“dd/MM/yyyy”); Date d=new Date(); String formattedDate=thedate.format(d); Log.d(“tag”,”format”+formattedDate); dates_Strings.add(formattedDate); double thedata=Double.parseDouble(value.getText().toString().trim()); mydata.add(thedata); File sdCard = Environment.getExternalStorageDirectory(); File directory = new File (sdCard, “MyFiles”); directory.mkdirs(); File file = new File(directory, filename); FileOutputStream fos; […]