Questions tagged [mpandroidchart]
MPAndroidChart is a powerful open-source Android chart view / graph view library. Use this tag if your question is specific to this library.
1,934
questions
0
votes
0
answers
8
views
MPAndroidChart : How to have colors filled between LimitLines in LineChart
I am trying to fill color between limit lines and have legend just like below -
I tried using example given here - https://github.com/PhilJay/MPAndroidChart/issues/485
But unable to achieve. Last I ...
0
votes
2
answers
90
views
In the MPAndroidChart, how do you set the labels on the x-axis (time) with a fixed interval?
I've been trying for a week different things I found on SO, including setting the granularity and the axis min and max values. Look at how neatly distributed the values on the y-axis are, the interval ...
0
votes
0
answers
49
views
MpAndroid Barchart
Using MPAndorid library i'm trying to display a bar chart in which i Only have 2 values that are both for Y.
All i want to do is that the y axis values should be from 0 to 200 but the bar chart shuld ...
0
votes
0
answers
16
views
is there a better way for reusing the MPAndroid graphview multiple time?
i have been trying to use a single MPAndroid graphview with few function to show the data in the graph either monthly, weekly or yearly by the response of button click. The functions works but on the ...
2
votes
1
answer
65
views
How to correctly add labels on a barchart in MPAndroidChart
I am using MPAndroidChart and I want to create a barchart. Actually this works fine. But the problem are the labels on the different bars. Somehow they just don't match. Only if I have exactly 3 bars, ...
1
vote
0
answers
48
views
How to set the new value about y in a mpandroidchart barchart
At first My y value are these:
arrayList1.add("math");
arrayList1.add("english");
arrayList1.add("biology");
...
0
votes
0
answers
74
views
Get Flag violation the policies from Google Drive when Uploading Android Studio project (.Rar) that have/using "github.Philjay:MPAndroidChart"
I have a Android Studio project that using MPAndroidChart to create Chart. Whenever I try to upload the rar project to Google drive, I get flag that said the file is violated the policies from google, ...
0
votes
0
answers
28
views
How to show a start figure of each slice
mpandroidchart piechart is very useful. But how can I show a start figure at the beginning of each slice?
I have tried legends but it shows at the middle of each slice but I want to show it at the ...
2
votes
1
answer
78
views
Program crash after trying to draw chart
I have an app, where user can select date (from/to), list of currencies, and then, display chart with some data. The chart, is just stacked bar chart, from MPAndroidChart. Recently, I've implemented ...
0
votes
0
answers
25
views
Center bar between grid lines | MPChart
I am using Android MPChart library to show some graphs in my application. I have to create a bar graph, and the customer would like to have the bars between the grid lines, like the ios app:
Right ...
1
vote
0
answers
52
views
How to access individual bar items in a bar graph - Helpful from accessibility point of view too [MPAndroidChart ]
I am using MPAndroidChart Library(https://github.com/PhilJay/MPAndroidChart) to show bar items.
Currently when I am trying to get focus on each individual item in the bar graph, I am not able to do so,...
0
votes
0
answers
37
views
is it possible to disable the function to hide marker view when touching a value that already shows the marker view in MPAndroidChart?
In default of MPAndroidChart, if I set marker view and touch an value in chart, I can see a marker view about the value. And if I touch it again, the marker view disappears, as far as I know.
At this ...
1
vote
1
answer
42
views
Remove Empty Spaces from the MPAndroidChart Horizontal Chart
I am using MPAndroidChart to create a chart inside my application.
I want to remove all the empty space that is not covered by the graph. As you can see, there are some empty spaces for all 4 sides.
...
0
votes
1
answer
62
views
How to add different colors setCircleColorHole in line graph of MPAndroidChart android?
There are method to add single circle hole color in the graph for all points.
setCircleHoleColor(Color.RED);
I am adding multiple circle colors using setCircleColors in LineDataSet like this :
...
2
votes
1
answer
58
views
How to implement a connected scatter graph in Chart.js
I am trying to implement the chart shown in Chart.js - essentially a scatter graph with two sets of connected data-sets. I have coded a scatter graph with the correct point distribution but struggle ...
0
votes
1
answer
120
views
How to resolve reference: ViewGroup in MPAndroidChart
I'm trying to run this MPAndroidChart PieChart example, but getting the error:
Unresolved reference: ViewGroup
LayOutParams() shows Viewgroup as accepted input, but won't accept it. Am I right in ...
-1
votes
1
answer
70
views
MPAndroidChart - hide missing data
I have a dataset that I would like to display using LineChart.
However, the data is some times incomplete, and data is missing some timestamps.
Is there a way to not display a line when the LineChart (...
0
votes
0
answers
121
views
How to draw a MPAndroidChart in kotlin using data that retrieved from Google Sheets?
I have the following code where I am trying to get data from Google Spreadsheets and create a Line Chart using MPAndroidChart in Kotlin. I could fetch the data successfully using the below code but ...
0
votes
0
answers
28
views
Freeze axisLeft in MPAdnroidChart
Is it possible to set axisLeft to be always present on screen, while horizontal scrolling the chart? I would like to see the Y values all the time
0
votes
0
answers
37
views
Could Not Show Date in X-Axis More than Once in MPAndroidChart (LineChart)
I have a GraphActivity class which includes all graph activities. Also Realtime Database are running in this class. The GraphActivity class is as below:
package com.example.basardesktop;
import ...
1
vote
1
answer
156
views
How to Plot Line Chart in reverse direction ie. starting from right to left direction in Android using MPAndroidChart library?
Hi I am using this library https://github.com/PhilJay/MPAndroidChart and trying to draw line chart from Endpoint to Start point that is from right to left direction, I followed library document and ...
2
votes
1
answer
43
views
Does LineDataSet state gets altered by chart.setData(lineData) in MPAndroidChart?
I have a weird behavior happening to me, where I have a unique LineDataSet instance used across 2 different charts.
This LineDataSet obtains its configuration BEFORE entering ANY one chart.
Both ...
1
vote
0
answers
138
views
How to add a marker in a RadarChart using the MPAndroidChart library?
I am currently working on a project where I need to display a RadarChart using the MPAndroidChart library in my Android application. I have successfully plotted the data points on the chart, but now I ...
0
votes
1
answer
122
views
MPAndroidChart line graph doesn't like my real data
My data looks like this:
{
"id": "6e10e9fc-2d1f-4c5c-a1c5-d94d99ec55db",
"air_temperature": 25.7,
"timestamp": "2023-05-12 15:00:00",
&...
0
votes
0
answers
44
views
I'm trying to plot ECG data from ad8232 sensor using Android App in java. But today it shows java.lang.IndexOutOfBoundsException: Index: 0, Size: 1
FATAL EXCEPTION: main
Process: com.example.ecg_lead, PID: 25186
java.lang.IndexOutOfBoundsException: Index: 0, Size: 1
at java.util.ArrayList.get(ArrayList.java:437)
at com.github.mikephil.charting....
0
votes
0
answers
43
views
Making a custom step graph with mpandroidchart
I want to achieve this kind of chart using MPAndroidChart. In particular.
I have done all the necessary setup and particularly customized the chart to use the stepped mode below
Val set1 = ...
1
vote
1
answer
144
views
How to change xaxis label start position MPAndroidChart
Im having trouble with clipping x axis labels. The problem can be seen in the picture
What I would like to change is that instead of the labels ending at that place, that they instead start at that ...
1
vote
1
answer
92
views
MPAndroidChart visual rendering problem with a specific data
I am trying to draw a polygon using MPAndroidChart in AndroidStudio in Kotlin for an Android developpment.
I am facing a visual rendering problem.
I am drawing 2 different polygons on 2 different ...
1
vote
1
answer
48
views
Is it possible to draw gridlines ABOVE a filled linechart?
In all the examples I have found when a linechart is filled (gradient or solid color) , this filling covers the gridlines and they dissapear. Is it possible to draw the gridlines over them?
I have ...
0
votes
0
answers
28
views
How to draw real time linechart mpandroid from reading data from file and plotting continuously?
i am newbie in android,i have class names LedControl,i have to display realtime linechart in mpandroid. I have tried lot but all vain.but no linechart is drawing.Please Help with full code.
i have ...
1
vote
0
answers
51
views
BarChart mp Android chart x axis not aligning with the graph
I am trying to align my x axis data with the bars in the bar chart and also enable a scrolling to the left or right.
I tried different methods but none worked. I am getting my x axis label from my ...
1
vote
1
answer
57
views
MPandroid. The app is receiving data, but the chart is not updating
package com.example.communication;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android....
1
vote
1
answer
215
views
MPAndroidChart - Line chart is no longer filling entire view after changing the number of data points
I'm having an issue in my app where adding a large number of data points, clearing them, adding a smaller number of datapoints causes the LineChart to not completely reach the end of the view.
I ...
0
votes
1
answer
125
views
MPAndroidChart - First marker on line chart not being centered
I'm trying to display a linechart with a Custom Marker class that's centered on the highlight line.
.setHighLightColor(Color.WHITE);
I can't figure out why only the first marker is not being centered ...
0
votes
1
answer
33
views
How to save and retrieve CombinedData in shared preferences?
I using mpandroidchart library to plot candlestick chart, I am getting candlestick data from API. What I am trying to do now is:
When I have data on my chart I want to save it so that I can retrieve ...
1
vote
0
answers
41
views
How to set/pass in a custom class object to a custom view in Android
I have a custom view which is a wrapper over the Mp Android Chart library. It takes an implementation class that actually calls the methods of the MP Android Chart library. I want this implementation ...
0
votes
0
answers
22
views
How to draw a x axis line without grid line in mpchart or remove grid line first line on x axis and y axis on android mpchart
I need to set X-axis and Y-axis in one color with different width and draw grid lines in different color and width. When I added the code below, I saw the x and y-axis lines overlapped with the grid ...
0
votes
0
answers
63
views
How to show multiple icons above same bar in charts swift
I am using CHARTS library in Swift. https://github.com/danielgindi/Charts
currently plotting barchart using sample value with icons using the following code
barValue = BarChartDataEntry(x: Double(i.x!)...
0
votes
0
answers
36
views
MpChartsAndroid: Highlight is skipping chart values while dragging, when we have multiple data sets
I am using MPAndroidChart library, we have multiple Line data sets, we are differentiating them on the point of zero, so we have negative and positive data sets, in the end I am assigning the data to ...
0
votes
0
answers
46
views
MPAndroidChart Different color on YAxis (Left & Right)
I have a chart that I use both left & right axis, the same code runs on customizing both, but for some reason the one looks a different color than the other.
I have tried debugging it and ...
0
votes
1
answer
135
views
MPAndroid chart didn't draw linechart points
LineChart got smaller and even not visible when entries are above 50. It draws normally with 50 size of entries but with 51, 52 ... n it disappeared.
Here is the example with 52 size of entries.
Is ...
0
votes
0
answers
28
views
My MPAndroidChart's RadarChart is too small and rotated
When I adapt custom valueFormatter in my RadarChart, my chart become smaller and rotated.
current situation
I tried to change valueFormatter, chart size... but doesn't work.
My custom valueFormatter ...
0
votes
1
answer
162
views
MPAndroidChart BarChart - ValueFormatter is not applied
I use MPAndroid to use Group Bar chart.
I create ValueFormatter.
val StepValueFormatter = object : ValueFormatter() {
override fun getFormattedValue(
value: Float,
entry: Entry?,
...
0
votes
1
answer
168
views
Get week range of current month in Android
I would like to show the week range in the MPAndroidChart Graph. For example in February month I would like to show the xAxis label value like 1-4, 5-11, 12- 18, 19-25, 26-28. Here 1-4 comes from the ...
0
votes
0
answers
103
views
How to add circle to MPAndroidChart radar chart
btw im using this fork https://github.com/AppDevNext/AndroidChart thankyou for giving time to read this :D
0
votes
1
answer
57
views
Android MPAndroidChart xAxis.setValueFormatter throws ArrayIndexOutOfBoundsException
Good morning,
I'm struggling with ArrayIndexOutOfBoundsException thrown when i'm inserting the row
xAxis.setValueFormatter(formatter) (commented in code).
protected void onCreate(Bundle ...
0
votes
0
answers
26
views
How can I see mpandroid barchart x-axis label completely?
I draw barchart in my Android project, but I can't see x-axis label completely about g, j....etc.
These letters are not shown completely. The letters cut off.
I chaged many things like margin, padding....
0
votes
0
answers
21
views
how to add labels to points on a chart in mpandroidchart(java language)
I have an app which makes line chart with points, could i set labels on each points? totally I have just 6 points always.
here i d like to call it smth like p1
0
votes
0
answers
15
views
Is there any way to animate a particular slice in MPAndroid Chart?
I just want to animate a particular slice in the piechart. I have figured out a way to animate the whole chart but didn't find any way to animate a particular slice. Can anyone help to figure this out?...
0
votes
0
answers
24
views
How can I see barchart value above bar?
By using MPAndroidChart, I draw barchart but I can't see the value of bar.
I changed some values but it does't work.
I set setDrawValueAboveBar(true), setDrawValues(true), valueFormatter, ...