gpt4 book ai didi

android - AChartEngine XYMultipleSeriesRenderer 参数?

转载 作者:搜寻专家 更新时间:2023-11-01 09:02:08 24 4
gpt4 key购买 nike

我正在尝试创建一个包含六条线和两个 Y 轴的折线图。所有 6 条线都将使用相同的 X 轴,但 3 条线应相对于一个 Y 轴绘制,而其他 3 条线应相对于另一条 Y 轴绘制。

我一直在看this tutorial但不能完全弄清楚发生了什么。

这条线是表示创建一个有 2 条线的图表,还是有 2 个 y 轴的图表?

XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer(2);

JavaDocs根本不解释参数。它只是说 scaleNumber,没有任何解释。

此外,是否可以在不使用 Intents 的情况下使用 AChartEngine?我目前已设置好创建图形的所有内容,只需设置一个 LinearLayout 即可显示它。除了图形之外,页面上还有其他内容。

最佳答案

I am trying to create a line graph with six lines, and two Y Axis. All six lines will use >the same X-axis, but 3 lines should be graphed with respect to one Y-axis, and the other 3 >lines graphed with respect to the other Y-axis.

I have been looking at this tutorial but cannot quite figure out whats going on.

Does this line represent creating a chart with 2 lines to be graphed, or a chart with 2 y->axis?

XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer(2);The JavaDocs do not explain the parameter at all. It simply says scaleNumber, which is >explained nowhere.

简而言之,是的,scaleNumber 指的是图表中 Y 刻度的数量。当另一个方法调用引用 scaleNumber 时,通常是要明确将该方法应用到哪个比例尺。

Also, is there anyway to work with AChartEngine without using Intents? I currently have everything set up to create the graph and just set a LinearLayout to display it. There are other things on the page other than the graph.

再一次,是的。我在我的应用程序中使用它是这样的:

GraphicalView graph = ChartFactory.getTimeChartView(myContext, data, renderer, xLabelFormat);

LinearLayout myLL = (LinearLayout) findViewById(R.id.graph_container);
myLL.addView(graph);

所有图表类型都可以作为 Intents 或 Views 检索(Javadoc 中的完整列表在这里:http://www.achartengine.org/content/javadoc/org/achartengine/ChartFactory.html)

关于android - AChartEngine XYMultipleSeriesRenderer 参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14341770/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com