我正在尝试使用 Android Plot 在 Android Activity 中显示图表,如何在图表中显示我的数据?
我正在尝试使用 Android Plot 在 Android Activity 中显示图表,如何在图表中显示数据并标记 x 轴和 y 轴?
我想在 X 轴上显示月份,在 Y 轴上显示费用,并且我想从数据库中获取特定类别(如食品、个人费用等)的数据,并根据数据获取图表。
请参考以下网站代码。
http://androidplot.com/wiki/Quickstart
如何传递从数据库获取的列表数据( SQLite)到变量?
Number[] series1Numbers = {1, 8, 5, 2, 7, 4};
Number[] series2Numbers = {4, 6, 3, 8, 2, 10};
I am trying to use Android Plot to display graphs in Android Activity, how can I display my data and label x and y axis in the graph?
I would like to display Months on the X-Axis and Expenses in Y-Axis, and I would like to fetch data from database for the particular category like Food, Personal Expenses etc.. and fetch the graph according to the data.
Please refer the below website code .
http://androidplot.com/wiki/Quickstart
How can I pass List data which is fetched from database(SQLite) to the variables?
Number[] series1Numbers = {1, 8, 5, 2, 7, 4};
Number[] series2Numbers = {4, 6, 3, 8, 2, 10};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取数据并存储在 Int[] 中,然后在使用 series1Numbers 和 series2Numbers 的任何地方传递此 int 数组,因为 Number 类只不过是一个 int 数组。
fetch the data and store in an Int[] and then pass this int array wherever you are using series1Numbers and series2Numbers because the Number class is nothing but an int array.