Data goes behind values on starting points(MPAndroidChart) - java

I have used MP android chart and made custom y-axis values by using y-axis renderer. My graph shows point data and line data.
My issue is point data goes behind y-axis value on starting point.
I know one way to achieve this is by using custom renderer. But Is there any easy way to show point data in front of y-axis values.

Related

Heatmap weighted only by value, not concentration

Im trying to make make a heatmap using WeightedLatLng. Right now it shows an increase in "intensity" for high values or for multiple lower values close together.
I want to be able to only take in to account the values of the weights, not the sum of different points.
Anyway you can create custom Ground Overlay or Tile Overlay with your own algorithm for heatmap. As start point for heatmap creation you can use for example AndroidHeatMap project of tredpath.

How to make clicks on part of model in Vuforia (without Unity)?

I want to make clickable cell of the palette in Vuforia (without Unity) by tap on screen:
I found Dominoes example with similar functionality and do that:
create one plate object and multiply cells objects
call isTapOnSetColor function with parameter x, y (click coordinates) on tap and get coordinates,
coordinates is correct, but get the id/name of part of objects is wrong
I think problem with this line:
boolean bool = checkIntersectionLine(matrix44F, lineStart, lineEnd);
In the Dominoes example this was:
bool intersection = checkIntersectionLine(domino->pickingTransform, lineStart, lineEnd);
But I don't know what does do domino->pickingTransform and paste instead of this line modelViewMatrix (Tool.convertPose2GLMatrix(trackableResult.getPose()).getData())
Full code of my touch function: http://pastebin.com/My4CkxHa
Can you help me to make clicks or may be another way (not Unity) to do that?
Basically, domino->pickingTransform is pretty much the final matrix that is being drawn for each domino object. The domino sample work in a way that for each object (domino), the app checks the projected point of the screen touch and sees if it intersects the matrix of the object. The picking matrix is not exactly the same, since you want to make the is more responsive, so you make it a little wider than the drawing matrix.
You said you are getting a wrong id, but the question is - is it always the same id for different cells? If not, this is probably some small calculation error you made in your matrix transformations. I would suggest to do a visual debugging - add some graphical indication for the detected id, so you will be able to see what cell the application thinks you have clicked. This should help you progress towards the solution.

Custom Fill formatter

I am trying to have a chart that only fills a certain amount of points using mpandroid chart, I have looked at the wiki but I am directed to a 404 error when I try to look at the default fill formatter. The picture has all of the values filled. Any help will be appreciated, thanks.
Nevermind, I got it, the key here is to make multiple data sets with overlapping x indices and each dataset will have a point that doesn't overlap with the previous data set. Then specify which data set to setdrawfill(true/false).

(Project Tango) Rotation and translation of point clouds with area learning

I have a java application that, when I press a button, records point clouds xyz coordinates together with the right pose.
What I want is to pick an object, record a pointCloud in the front and one in the back, then merge the 2 clouds.
Obviously to get a reasonable result I need to translate and rotate one or both the clouds I recorded. But I'm new to Tango Project and there are some things I should be missing.
I have read about this in this post.
There, #Jason Guo talks about those matrix:
start_service_T_device, imu_T_device , imu_T_depth
How could I get them?
Should i use getMatrixTransformAtTime()?
The first matrix is from start of service to device, but I'm using area learning, so my BaseFrame is TangoPoseData.COORDINATE_FRAME_AREA_DESCRIPTION.
Is it possible to use same strategy also in my case?
Just replacing start_service_T_device with something like area_description_T_device?
Side question
I want to extend this approach for the 3D reconstruction of objects.
I want to get several pointClouds of different view of the same object, rotate and translate them wrf some fixed axes. Then i'll assume that 2 points (x,y,z) and (x',y',z') are the same point if x~=x' && y~=y' && z~=z'.
This way i'll should be able to get a point cloud of the entire object, am I right?
Is this approach suitable?
Is there better alternatives?
The original post is a little bit out of date. Previously, we don't have getMatrixTransformAtTime(). So you have to use Tango.getPoseAtTime to query each of the transformation, and then chain them up using matrix.
But now, with getMatrixTransformAtTime, you can directly query area_description_T_depth, even in opengl frame. In order to transform a point cloud to the ADF frame in opengl, you can use following code (pseudo code):
TangoSupport.TangoMatrixTransformData transform =
TangoSupport.getMatrixTransformAtTime(pointCloud.timestamp,
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,
TangoPoseData.COORDINATE_FRAME_CAMERA_DEPTH,
TangoSupport.TANGO_SUPPORT_ENGINE_OPENGL,
TangoSupport.TANGO_SUPPORT_ENGINE_TANGO);
// Convert it into the matrix format you use in render.
// This is a pure data structure conversion, transform is
// in opengl world frame already.
Matrix4x4 model_matrix = ConvertMatrix(transform);
foreach (Point p in pointCloud) {
p = model_matrix * p;
}
// Now p is in opengl world frame.
But note that, you have to have a valid area description frame to query the pose based on area description, that is after relocalized with an ADF or in learning mode.

(jzy3d) How to display tool tip on Scatter effectively?

Currently, we are using jzy3d to display data on 3D chart, but we need to display "tool-tips" when mouse button hovers on a point in Scatter data.
Our solution is currently not cpu friendly, since we get all Scatter data with getProjection method, and iterate over returned array to find matched boundary with mouse point.
Do you know or recommend better and fast way to display tool-tips on scatters`s data?
Thanks in advance.
I would start by setting the points in a quad map to minimize the number of point to check. I however don't know how efficient is the quad map index phase, and it is maybe not a good idea if your user remain free to rotate the scene whenever he wants.

Categories

Resources