MPAndroidChart BarChart酒吧被切断了(MPAndroidChart BarChart bars getting cut off)
我正在使用MPAndroidChart在我的Android应用程序中绘制图表。
一个要求是我需要从非零y位置开始条形图, 如此所示 。 所以我也使用了CandleStickChart。 现在我的酒吧在开始和结束时都被切断了。
有没有办法在图表的开头和结尾给出填充,以便它不会被切断。
注意:我的XAxis值类似于“4Nov”,“5Nov”......
I am using MPAndroidChart for drawing a chart in my Android App.
One requirement is I need to bar chart starting from non-zero y position, as suggested in this. So I had using CandleStickChart for the same. Now my bars are getting cut off at the start and end.
Is there any way to give padding at the start and end of the graph so that it does not get cut off.
Note: My XAxis values are like "4Nov", "5Nov"...
原文:
最满意答案
这几乎是您首先使用Artifactory的主要原因之一。 Artifactory以其AQL的形式提供了非常广泛的搜索功能,它完全符合您的要求。
作为您的案例运行的例子如下所示:
builds.find( {"module.dependency.item.name":{"$match":"*artifact1*"}} ).include("module.artifact.name")
将返回所有具有
Artifact1
作为依赖项的构建(您还可以添加"$and"
子句将其限制为特定版本的Arifact1
),最后的include将返回属于具有Artifact1
的模块的所有Artifact1
作为一个依赖(所以你将在你的情况下看到Artifact2
)下面是我在一个简单的maven build上运行这个查询时得到的一个输出示例,它叫做
multi-module-build
,它有几个模块,其中一个模块(multi3
)有一个叫做multi1
的依赖multi1
:"results" : [ { "build.created" : "2016-03-10T09:08:51.283+02:00", "build.created_by" : "admin", "build.name" : "multi-module-build", "build.number" : "10", "build.url" : "http://localhost:9090/jenkins/job/multi-shmulti/10/", "modules" : [ { "artifacts" : [ { "artifact.name" : "multi3-3.6-SNAPSHOT.war" }, { "artifact.name" : "multi3-3.6-SNAPSHOT.pom" } ] } ] } ]
This is pretty much one of the main reasons why you would use Artifactory in the first place. Artifactory provides a very extensive search capability in the form of its AQL, which does exactly what you're asking for.
As an example for your case running something like:
builds.find( {"module.dependency.item.name":{"$match":"*artifact1*"}} ).include("module.artifact.name")
will return all builds that had
Artifact1
as a dependency (you can also add an"$and"
clause to limit this to a specific version ofArifact1
), the include at the end will return all artifacts that were part of the module that hadArtifact1
as a dependency (so that's where you will seeArtifact2
in your case)Here is an example output I got when running this query on a simple maven build called
multi-module-build
that had several modules where one of them (multi3
) had a dependency calledmulti1
:"results" : [ { "build.created" : "2016-03-10T09:08:51.283+02:00", "build.created_by" : "admin", "build.name" : "multi-module-build", "build.number" : "10", "build.url" : "http://localhost:9090/jenkins/job/multi-shmulti/10/", "modules" : [ { "artifacts" : [ { "artifact.name" : "multi3-3.6-SNAPSHOT.war" }, { "artifact.name" : "multi3-3.6-SNAPSHOT.pom" } ] } ] } ]
相关问答
更多-
如何将本地非Maven项目添加为Maven项目的依赖项?(How to add a local non-maven project as a dependency for a maven project?)[2022-05-14]
不,你不应该这样做。 Maven的主要目标是建立一个标准化的版本。 这就是Maven如此易于使用的原因:例外不是常态。 这就是为什么Maven要求所有的依赖都是典型的Maven格式(POM + jar)。 当你说“让它们变成目前不是一个选项”时,你基本上会说“Maven目前不是一个选项”。 根据我的经验,将现有项目转换为Maven只需要几分钟的时间......除非该项目使用了一个混乱,不可靠的构建过程,在这种情况下,您应该尽快将其转换为Maven,以避免浪费更多宝贵的时间。 :-) 如果一切都失败了,请使用 ... -
生成.so文件的Maven Repo,在Maven项目中用作依赖项(Maven Repo That Generates .so File, use as dependency in Maven Project)[2022-10-22]
好的, 所以基本上在.so项目中我使用'build-helper-maven-plugin'来附加我的.so工件。 然后在我的主项目中,我使用'maven-dependency-plugin'将.so文件复制(目标集复制)到本机输出目录。 如果有人需要更多信息,请评论。 Alright, So basically in the .so project I utilized the 'build-helper-maven-plugin' to attach my .so artifact. Then in m ... -
如何使用简单的maven项目作为GWT maven项目中的依赖项?(How to use a simple maven project as a dependency in GWT maven project?)[2022-09-21]
对的,这是可能的。 我们在其中一个项目中完成了我的工作。 当你们跟随分层方法时,你需要有服务器层(中间层),你将拥有所有的rpc服务类来监听来自客户端的异步调用。 该服务层将进入服务器端。 然后,您可以在服务器端调用db api / methods来实现此rpc服务。 Yes it is possible. We have done in one of the project that I have worked on. As you guys are following layered approach ... -
如果项目X和Y是Maven项目,您只需要从项目X的pom.xml依赖项目Y. Maven的一个主要特性是通常不需要复制任何其他依赖的Maven项目的库 - Maven将解析(直接)依赖项所需的依赖项(在您的示例中基于依赖项定义)项目Y的pom.xml并将它们传递给项目X. 那些“我的依赖关系的依赖”被称为传递依赖,并在官方文档中有详细描述: http : //maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.h ...
-
如果任何Maven仓库中没有Maven项目,Gradle无法在任何地方找到它,因此您必须构建它。 我至少会mvn install它,并告诉Gradle在本地Maven仓库而不是在特定目录中查找工件,使用 repositories { mavenLocal() } The eclipse-integration-gradle plugin replaces the mavenLocal() jar dependency with a Eclipse project dependency. This ...
-
我有同样的问题,无法解决单独的Maven模块中的类更改。 这对我有效: 将依赖关系添加到Grails项目的pom.xml中(以便您可以在IDE之外构建) 不要将Maven特性添加到Grails项目中。 其他项目仍然具有Maven特性,但Grails项目不应该这样做。 在Grails项目的Properties中,选择Java Build Path - > Projects并添加其他Maven项目。 这允许Eclipse立即找到对其他项目的更改。 启用启用了JRebel的Grails(以便您可以在单独的Mave ...
-
将Java项目用作其他项目中的jar文件作为maven依赖项(Using Java project as jar file in other project as maven dependency)[2022-04-20]
我猜您应该将项目上传到Maven存储库: https : //maven.apache.org/guides/mini/guide-central-repository-upload.html I guess you should upload your project to the Maven repository: https://maven.apache.org/guides/mini/guide-central-repository-upload.html -
如果你可以使用常规项目构建,这意味着你必须有权访问其他项目的jar文件? 如果其他项目如何构建它们并不重要,您仍然可以通过将依赖的jar加载到Maven存储库中来获得对自己构建过程的更多控制。 我建议使用以下存储库管理器之一: 关系 Artifactory的 Archiva 他们将为您提供上传第三方罐子的管理屏幕,他们也可以更有效地使用Maven Central等其他Maven存储库。 一旦您的Maven构建过程正常工作,您可以鼓励其他项目自动将其版本发布到您的Maven仓库中。 他们可以使用Maven或A ...
-
您提供的目标意味着jar是由您手动或通过包括框架提供的。 此外,如果您想将工件与其他库打包,您应该查看maven程序集插件。 如何使用maven-assembly-plugin包含package.jar Your goal "provided" means that the jar is provided by you manually or by the including framwork. Also if you want to package your artifacts with other li ...
-
查找其他项目是否将该项目用作Maven依赖项?(Find what other projects use this project as a maven dependency?)[2023-05-03]
这几乎是您首先使用Artifactory的主要原因之一。 Artifactory以其AQL的形式提供了非常广泛的搜索功能,它完全符合您的要求。 作为您的案例运行的例子如下所示: builds.find( {"module.dependency.item.name":{"$match":"*artifact1*"}} ).include("module.artifact.name") 将返回所有具有Artifact1作为依赖项的构建(您还可以添加"$and"子句将其限制为特定版本的A ...