Display every value in Android GraphView with a bigger point - android-graphview

Is there an opportunity to add for each value in Graphview a bigger point?
Like it's done in google analaytics for example:
http://www.cutroni.com/blog/wp-content/uploads/2007/12/20071211-compre-two-metrics.png
I think it would make the data look way better ;-)

yes it's is possible since the new version GraphView 3.1.1.
From the Documentation:
You can set the flag to let the GraphView draw circles at the data points.
LineGraphView graphView = new LineGraphView(
this // context
, "GraphViewDemo" // heading
);
graphView.setDrawDataPoints(true);
graphView.setDataPointsRadius(15f);

Related

How to fit bounds and set max bounds at same time on window resize in MAPBOX?

To fit the map we use mapbox.fitBounds() and to set we do mapbox.setMaxBounds(), which avoid panning. This work's perfectly well on first load.
But on Window resize map get cropped and take the bounds reference from initially set maxbounds. I am trying to fit the map in viewport using setTimeout, so that map first fit on screen and then getting map bounds from mapbox.getBounds() set the value in mapbox.setMaxBounds(). But this is just an hack.
Is there any correct way to do so?
Please help... and thank you..
Hope you are all well...
After many days of struggle, we are able to find the perfect solution, for my own question posted...
Firstly,
mapbox.fitBounds() is the method on passing given bounds as args, will fit the geometry(polygon etc..), making the center point in the middle. But the only thing it does not disallow panning.
However, we can disallow panning using mapbox.setMaxBounds() which allow us to constrained to passed bounds.
But on window resize, somehow mapbox Map change the bounds as per internal logic, which will no longer be the same as passed bounds initially...
In order to fit the geometry on the viewport, at the same time disallow panning on window resize, we use Resize Observer to observe map's container, and in its callback, we just wrote, three lines
Set map.setMaxBounds(null) //to null
set fitbounds(bounds). //bounds of geometry that u have
Get bounds from viewport using
let bnds = mapbox.getBounds();
and finally set in map.setMaxBounds(bnds);
Note to pass the 3. point in requestAnimationFrame instead of setTimeout
UPDATED Code
MaxBounds and custom asymmetric padding in Mapbox GL
Hope this will help...
Thank you.

How to scale an object based off of Text size and length in Unreal?

This maybe an easy question maybe not. Essentially, I am creating a VR application and I am also making a 3D UI system for it. I have the basics of creating a 3D button and clicking it done already. What I want to do now is scale my button in order to fit my custom text inside of it. Is there a way to automatically scale the object based off of the size of another? I'll attach some pictures to maybe describe the problem and what I want to accomplish.
Currently,
What I want to happen in something like the ConstructionScript:
https://api.unrealengine.com/INT/BlueprintAPI/Widget/GetDesiredSize/index.html
Try something like this , you call if from text variable, it return struct with X and Y float , hope it may give u starting point.
Edit :
You can get Text render TextlocalSize or TextworldSize .

Stop Android Graph View from rounding the x-axis

I'm using graph view in my project and got it working just fine. However I don't like the x-axis values. The values I'm passing are 0,0.5,1,1.5,2,2.5...all the way to 23.5. I would like the graph to show every x-axis value on the grid and not rounded values of 0,3.4,6.9,10.3, 13.7 etc. Is there a way to force it to not round and use the x values provided?
the labels are have fix positions and shows the exact value at this point. It seems, that you want to have the another count of labels or other positions. In the current GraphView version you can set set count of labels. When you configure it in the correct way, you should see labels in 0.5-steps.
Have a look at GraphViewStyle#setNumHorizontalLabels

Annotating points on line graph with JFreeChart?

I'm using JFreeChart to make a line graph. There are some points that I want to mark, or annotate, with circles of different sizes. I tried ShapeAnnotation, but even after I addAnnotation, it's not visible. I was able to make a pointer annotation, though.
Here's the relevant code:
XYShapeAnnotation annotation = new XYShapeAnnotation(new Ellipse2D.Float(100.0f, 100.0f, 100.0f, 100.0f), new BasicStroke(1.0f), Color.blue);
XYPointerAnnotation pointer = new XYPointerAnnotation("arrow", 0.5,0.5,0.0);
xyDataset.addSeries(series1); //
xyDataset.addSeries(series2); // random lists of numbers
xyDataset.addSeries(series3); //
JFreeChart chart = ChartFactory.createXYLineChart ("XYLine Chart using JFreeChart","Age","Weight",xyDataset,PlotOrientation.VERTICAL,true,true,false);
chart.getXYPlot().addAnnotation(pointer);
chart.getXYPlot().addAnnotation(annotation);
I think I should have more code to make the ellipse annotation visible because I never specified coordinates like I did with the pointer. I went through the JFreeChart API and couldn't find it. Help?
It's hard to say why your XYShapeAnnotation fails without seeing your data; an sscce would help. As a starting point, you might look at the examples here and here for comparison.

IOS - Calculating tiles to display in a MapRect when

I have tried the solution on this but get 2 errors when I run the build. First "MAX_ZOOM undeclared" and Implicit declaraation of function'zoomScaleToZoomLevel'
I'm new to xCode, any help? need to fix tile zooming.
Thanks Ken
Calculating tiles to display in a MapRect when "over-zoomed" beyond the overlay tile set
MAX_ZOOM is a constant - you need to define it someplace in your code to match the number of zoom levels in your tile set.