如何增加雷达图MPAndoid Chart的大小? [英] How to Increase size of Radar Chart MPAndoid Chart?

查看:300
本文介绍了如何增加雷达图MPAndoid Chart的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想增加MPAndroid雷达图的大小.我观察到,当我增加图表本身的大小时,该大小会逐渐增加,但是我希望该区域是相同的,只是应该增加图表大小.

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.

添加以下代码后:

mChart.setScaleY(1.2f);
mChart.setScaleX(1.2f);

它正在流离失所

推荐答案

我认为我们可以使用一些技巧来完成此工作.我从未研究过雷达图,但如果它支持缩放,则在创建时可以对其进行缩放符合我们的要求.再次,您必须测试它,我不确定它是否可以工作.它只是一个想法.如果您以我有意的方式这样做,请告诉我.

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.

缩放(以编程方式缩放)

zoomIn():放大1.4f,进入图表中心.

zoomIn(): Zooms in by 1.4f, into the charts center.

zoomOut():从图表中心缩小0.7f.

zoomOut(): Zooms out by 0.7f, from the charts center.

zoom(float scaleX,float scaleY,float x,float y):放大或缩小给定的比例因子. x和y是缩放中心的坐标(以像素为单位).请记住,缩放比例为1f =无缩放.

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轴):放大或缩小给定的比例因子. xValue和yValue是缩放中心的实际数据值(不是像素).请记住,缩放比例为1f =无缩放.

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.

这篇关于如何增加雷达图MPAndoid Chart的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆