mpandroidchart

How to Increase size of Radar Chart MPAndoid Chart?

馋奶兔 提交于 2020-01-14 12:59:07
问题 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

How to Increase size of Radar Chart MPAndoid Chart?

独自空忆成欢 提交于 2020-01-14 12:59:00
问题 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

MPAndroidChart: Chart Not Displaying

末鹿安然 提交于 2020-01-13 20:40:06
问题 I added a BarChart into my project XML (snippet of layout below): <RelativeLayout android:id="@+id/relative_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" > <com.github.mikephil.charting.charts.BarChart android:id="@+id/chart" android:layout

android 优秀图表库之MPAndroidChart

ぃ、小莉子 提交于 2020-01-12 17:03:26
MPAndroidChart 1.在项目当中很多时候要对数据进行分析就要用到图表,在gitHub上有很多优秀的图表开源库,这里就简单介绍一下MPAndroidChart。 他可以实现图表的拖动,3D,局部查看,数据动态展示等功能 代码下载: 下载 2.贴一些效果图出来: linechart 填充式lineChart 单条线的LineChart BarChart2D BarChart3D PieChart ScatterChart 3.使用方法在giHub上下载这个库: https://github.com/PhilJay/MPAndroidChart 你在查看它给的示例的时候可能项目会出错,我这里是环境编码问题,改成utf-8就OK了 xml中 1 <com.github.mikephil.charting.charts.PieChart 2 android:id="@+id/spread_pie_chart" 3 android:layout_width="match_parent" 4 android:layout_height="320dip" /> activity中 初始化 1 ColorTemplate mCt; 2 mCt = new ColorTemplate(); 3 mCt.addDataSetColors(ColorTemplate.PASTEL_COLORS

How to get selected bar x-axis value using MPAndroidChart?

烈酒焚心 提交于 2020-01-11 09:21:27
问题 I am using the MPAndroidChart library in my Android graphs app and I need to display the dialog with a title containing the selected bar's x-axis values. I referred to this wiki entry for click events to the bars in the bar graph. But now I need to get the selected bar x-axis value as a title. Can any one tell me how to achieve it? 回答1: Use the OnChartValueSelectedListener : @Override public void onValueSelected(Entry e, Highlight h) { final String x = chart.getXAxis().getValueFormatter()

How to get selected bar x-axis value using MPAndroidChart?

岁酱吖の 提交于 2020-01-11 09:20:06
问题 I am using the MPAndroidChart library in my Android graphs app and I need to display the dialog with a title containing the selected bar's x-axis values. I referred to this wiki entry for click events to the bars in the bar graph. But now I need to get the selected bar x-axis value as a title. Can any one tell me how to achieve it? 回答1: Use the OnChartValueSelectedListener : @Override public void onValueSelected(Entry e, Highlight h) { final String x = chart.getXAxis().getValueFormatter()

Set the negative values to the left of the bars in horizontal bar chart

懵懂的女人 提交于 2020-01-09 08:13:09
问题 The bounty expires in 7 hours . Answers to this question are eligible for a +50 reputation bounty. sak is looking for an answer from a reputable source : “Please help in any way, I need a fix .” I want to set the negative values of the bars to the left of the bars but at present some of the bars are overlapping these values. As shown: View for horizonatal_chart.setDrawValueAboveBar(true) View for horizonatal_chart.setDrawValueAboveBar(false) : How can i remove this overlapping of the negative

MPAndroidChart Scatter Chart data point markers and connecting the dots

 ̄綄美尐妖づ 提交于 2020-01-06 20:14:57
问题 I am using MPAndroidChart. In an application for scatter data I want to have the data points connected by a line and disable the automatic labels that show up when I plot just a few points. I've listed my code below for reference, Is this possible? Thanks public class StaticPlottingFragment extends Fragment { private static String TAG = "file_plotting_fragment"; private Typeface tf; private int count = 100; private LinkedList<DataPoint> mDataPoints; public static StaticPlottingFragment

want two colors when using mpandroidchart line chart with beizer style

瘦欲@ 提交于 2020-01-06 08:17:12
问题 I'm drawing a line chart with mpandroidchart and I want my line BELOW zero to be red rather than green. It's seems that beizer is not respecting the line-color settings (green is first color in my array & thats the only one that gets used). Can anyone tell me how to accomplish this? 来源: https://stackoverflow.com/questions/58458576/want-two-colors-when-using-mpandroidchart-line-chart-with-beizer-style

want two colors when using mpandroidchart line chart with beizer style

心不动则不痛 提交于 2020-01-06 08:17:06
问题 I'm drawing a line chart with mpandroidchart and I want my line BELOW zero to be red rather than green. It's seems that beizer is not respecting the line-color settings (green is first color in my array & thats the only one that gets used). Can anyone tell me how to accomplish this? 来源: https://stackoverflow.com/questions/58458576/want-two-colors-when-using-mpandroidchart-line-chart-with-beizer-style