Creating a line slider on a graph in android - android

I have created a graph with a series of data. Now I'm trying to add a slider / line marker to the chart like the one below.
I created the graph/charts using the MPAndroidChart library provided here https://github.com/PhilJay/MPAndroidChart.
The graph seems to be working fine and good but i need a line slider like below so that when i touch on the graph the line slides and provides the values of the line intersecting the graph.
Could anyone help me figure out this problem or do i have to use a different library to achieve this.

This feature just became available: https://github.com/PhilJay/MPAndroidChart/commits/master
However, it is not available as a release yet, so you cannot get it via gradle or maven, only via cloning the repository.
It will be in the next release v2.1.0 which will be available within the next week.

Related

How to change object color change using google ARCore SDK at run time in android?

I want to implement something like below feature in my AR application for which I use Google ARCore SDK.
Add an object in AR plane. Then select that object and select color from the list of different colors. And change the color of an added object without affecting an added object.
If its possible to change the color of some particular part then it will very fine.
Please help someone to get this concept idea. Thank you in advance.
You can use Sceneform SDK to do that.
This codelab explains in details how to add objects to scene using Sceneform - https://codelabs.developers.google.com/codelabs/sceneform-intro/#0
One way of doing what you want to do (maybe not the most efficient) - is to changes appropriate attribute of the renderable, remove the old one from the scene, add updated one into the scene.

MPAndroidChart Android method setDrawVerticalGrid/setGridColor not found

So long story short, I used MPAndroidChart it works great(thanks to creators). As there were couple of crashes in this lib, we decided to update the library to latest.
After updating to latest versions of Library lots of methods/classes started showing error(not found). Some examples are
chart.setGridColor(Color.WHITE & 0xAAFFFFFF);
YLabel y = chart.getY..... // Seems this is changed to YAxis
chart.setDrawVerticalGrid(false) // Error not found
chart.setTypeFace //
There are other errors as well, tried alot but seems no links to point out which latest api to be followed.
Generally when Google removes some apis, they mention which one to use instead of this one.
P.S:- I hope this gets answer by Mr Philip Jahoda :)
chart.drawVerticalGrid(...) also moved to the axis. YAxis now controls the horizontal grid via yAxis.setDrawGridLines(...), XAxis controls the vertical grid via the same method.
For more information I suggest you check out the examples which are always up to date with the latest version.

How do I display values on top of Shinobi bar chart for android

How do I display values on top of a bar chart using the shinobi library in android
The AnnotationsManager, specifically the addTextAnnotation method, is the solution that you are looking for. You can use this method to add any string to the chart at any X and Y position, in terms of data.
There is a How-To guide about Annotations at the ShinobiControls website. This How-To guide, along with an accompanying sample app, is also included in the download bundle.
Disclaimer: I work for ShinobiControls.

Is that possible to create negative bar chart using GraphView library in Android?

I'm looking library that allow to build bar charts with negative values like on picture below.
I tried already AndroidPlot(impossible to achieve this on version 0.6.0) and GraphView(look like impossible, actually i get same result as in AndroidPlot)
Greatly appreciate any help.
It is impossible via GraphView library but possible using AChartEngine library.

What is the component name of the following image?

Can you people see the common icon at the left of this list . If we hold and drag that icon then we can manually arrange the list. I want to know the name of this component and any example links (if available) to achieve this.
Thanks,
Its drag and drop list view you can find and example
http://ericharlow.blogspot.com/2010/10/experience-android-drag-and-drop-list.html
This project code is simply to share a simple working drag and drop list since I was unable to find one elsewhere on the web. If you add any extensions to this simple project I would like to hear about it in the comments.
or
You can also try Mark Murphy's
https://github.com/commonsguy/cwac-touchlist
To work with TouchListView in your own project, place the library project somewhere and update your project to reference the library project (via Eclipse, via android update lib-project, etc.). Then, add a com.commonsware.cwac.tlv.TouchListView widget to your XML layout file.

Categories

Resources