mpandroidchart

How to set legend labels MPChart

被刻印的时光 ゝ 提交于 2021-02-19 02:46:25
问题 I am trying to customize legend but not able to do so.My purpose is to give different legend labels.I ma using MPChart library to do so. ArrayList<BarEntry> entries = new ArrayList<>(); entries.add(new BarEntry(4f, 0)); entries.add(new BarEntry(8f, 1)); entries.add(new BarEntry(6f, 2)); entries.add(new BarEntry(12f, 3)); entries.add(new BarEntry(18f, 4)); mColors.add(R.color.red); mColors.add(R.color.text_color_gray); mColors.add(R.color.text_color_blue); mColors.add(R.color.green); mColors

XAxis label angle in MPAndroidChart

核能气质少年 提交于 2021-02-18 06:47:13
问题 I am using MPAndroidChart library for my project. Is it possible to rotate the labels of the XAxis by 270 degrees so that I can fit more text? 回答1: Original answer: Unfortunately it is currently not possible to rotate the values on the x-axis of a chart to a certain degree / angle. You will have to implement such a feature yourself. UPDATE: As of v2.1.5 this feature is now available: XAxis xAxis = chart.getXAxis(); xAxis.setLabelRotationAngle(...); 回答2: do it simply by XAxis xAxis=barChart

XAxis label angle in MPAndroidChart

左心房为你撑大大i 提交于 2021-02-18 06:46:29
问题 I am using MPAndroidChart library for my project. Is it possible to rotate the labels of the XAxis by 270 degrees so that I can fit more text? 回答1: Original answer: Unfortunately it is currently not possible to rotate the values on the x-axis of a chart to a certain degree / angle. You will have to implement such a feature yourself. UPDATE: As of v2.1.5 this feature is now available: XAxis xAxis = chart.getXAxis(); xAxis.setLabelRotationAngle(...); 回答2: do it simply by XAxis xAxis=barChart

How to make MPAndroidChart RadarChart round

爱⌒轻易说出口 提交于 2021-02-11 16:38:05
问题 I would like to present some Values inside a Radar Chart. Long-time I was working with AndroidPlot which works great but it doesn't support Radar charts. So I swapped to MPAndroidCharts. But MPCharts only supports angular RadarCharts by default. I found the following Link in the Issues, but there is no Code given https://github.com/PhilJay/MPAndroidChart/issues/1446 Another Stack Overflow Entry I found is this, but I can't combine it with MPAndroid Charts Radar Chart for Android At the

How to make MPAndroidChart RadarChart round

痴心易碎 提交于 2021-02-11 16:37:56
问题 I would like to present some Values inside a Radar Chart. Long-time I was working with AndroidPlot which works great but it doesn't support Radar charts. So I swapped to MPAndroidCharts. But MPCharts only supports angular RadarCharts by default. I found the following Link in the Issues, but there is no Code given https://github.com/PhilJay/MPAndroidChart/issues/1446 Another Stack Overflow Entry I found is this, but I can't combine it with MPAndroid Charts Radar Chart for Android At the

How to make MPAndroidChart RadarChart round

▼魔方 西西 提交于 2021-02-11 16:35:58
问题 I would like to present some Values inside a Radar Chart. Long-time I was working with AndroidPlot which works great but it doesn't support Radar charts. So I swapped to MPAndroidCharts. But MPCharts only supports angular RadarCharts by default. I found the following Link in the Issues, but there is no Code given https://github.com/PhilJay/MPAndroidChart/issues/1446 Another Stack Overflow Entry I found is this, but I can't combine it with MPAndroid Charts Radar Chart for Android At the

Retrieving MySQL data dynamically and plotting on android using retrofit and MPAndroidChart

走远了吗. 提交于 2021-02-08 09:53:49
问题 I am following to plot following this example. Things work if I have a static JSON and it will plot the data like shown in the website. However, I am retrieving data from MySQL and they are being updated every hour (I had look into this; create a button and potential to call the URL every hour), but I am not too sure if that's the efficient approach. My question is if I have a MySQL table/data that is being every hour, how do I retrieve them and plot (retain old values as well as plot the new

Retrieving MySQL data dynamically and plotting on android using retrofit and MPAndroidChart

落花浮王杯 提交于 2021-02-08 09:53:40
问题 I am following to plot following this example. Things work if I have a static JSON and it will plot the data like shown in the website. However, I am retrieving data from MySQL and they are being updated every hour (I had look into this; create a button and potential to call the URL every hour), but I am not too sure if that's the efficient approach. My question is if I have a MySQL table/data that is being every hour, how do I retrieve them and plot (retain old values as well as plot the new

MPAndroidChart LineChart is not plotting correctly

偶尔善良 提交于 2021-02-08 08:00:25
问题 I am working on a product which records heart rate and sends that data to my Android app. The app presents this data using MPAndroidChart in real time . Note that, I am using the latest version of the library. I am facing some issue in some phones. I have tested it on Moto G2, Realme 1, OnePlus 5t, OnePlus 6, Lenovo K8 plus. The chart on OnePlus 6 phone (This is wrong): The chart on Moto G2 phone (This is correct): Update Code: private void initHeartLineChart(){ lineChartHeart.getDescription(

How to add x axis as datetime label in MPAndroidChart?

爷,独闯天下 提交于 2021-02-07 14:15:01
问题 I implemented line chart (MPAndroidChart library) for temperature report in my project.In X axis datetime should be plotted and Y axis temperature should be plotted. I just added datetime as string in X axis label but it's collapsed. So please anyone guide me. 回答1: Try the following. To set the X Axis XAxis xAxis = mChart.getXAxis(); xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); xAxis.setValueFormatter(new MyXAxisValueFormatter()); xAxis.setLabelsToSkip(0); Create a new class