问题
I want to increase size of MPAndroid Radar Chart. I observed that the size increases gradually when i increase size of the chart itself, but I want the area to be same just Chart size should be increased.
After adding following code:
mChart.setScaleY(1.2f);
mChart.setScaleX(1.2f);
it is getting displaced
回答1:
I think we can use a little hack to do that.I never worked on radar chart but if it supports zoom then we may zoom it when we create it to fit to our requirements. Again you have to test it I am not sure if it will work. Its just an idea. If you did that in my purposed way please do let me know.
Zooming (programmatically)
zoomIn(): Zooms in by 1.4f, into the charts center.
zoomOut(): Zooms out by 0.7f, from the charts center.
zoom(float scaleX, float scaleY, float x, float y): Zooms in or out by the given scale factor. x and y are the coordinates (in pixels) of the zoom center. Remember that a scale of 1f = no zoom.
zoom(float scaleX, float scaleY, float xValue, float yValue, AxisDependency axis): Zooms in or out by the given scale factor. xValue and yValue are the actual data values (not pixels) of the zoom center. Remember that a scale of 1f = no zoom.
来源:https://stackoverflow.com/questions/47090070/how-to-increase-size-of-radar-chart-mpandoid-chart