1,935 questions
0
votes
0
answers
70
views
MPAndroidChart CombinedChart load more candle data: chart jumps and zooms out when loadmore candle
I’m working with MPAndroidChart (CombinedChart) for a cryptocurrency app (Android, Kotlin). My chart is a typical Binance-like candle chart (candlestick + volume below) with “load more” support:
When ...
0
votes
0
answers
156
views
MPAndroid Chart: How to set up a scrollable horizontal barchart
I am using MPAndroidChart to display a horizontal bar chart in portrait mode with vertical scrolling enabled. Here's my current code snippet:
Map<String, Integer> genreData = new LinkedHashMap&...
0
votes
0
answers
45
views
MPAndroidChart real-time plot glitch when updating entries with static viewport and live cursor
I am developing a real-time BLE audio application on Android. The audio sampling rate is 16,000 samples per second, and I receive data in 100 packets per second, each packet having 160 samples (so ...
0
votes
1
answer
147
views
Can't import MPAndroidChart libraries into Activity declaring in TOML and build.gradle (app)
I'm in Sdk 35. I've declared MPAndroidChart in my Android project:
in TOML as mpandroidchart = "3.1.0" and mpandroidchart = { group = "com.github.PhilJay", name = "...
0
votes
1
answer
66
views
Grouped barchart not grouping datasets with AndroidChart
First of all english isn't my first language so please excuse errors.
I'm using Android Studio, some years ago i wrote a simple app to store some data and generate different graphs (not in real time), ...
1
vote
0
answers
175
views
How to make perfect Pie Chart in android jetpack compose
How to make pie chart code like this, I have used many libraries like MPAndroidChart for it but none of them prevents overlapping of labels
my current approach with MPAndroidChart is
val ds = ...
0
votes
1
answer
65
views
How to move a chart to a specific X and Y point in your CANVAS in Kotlin?
The following code takes a linechart view, turns into an PNG image and saves it on the phone. However, I want to adjust vertical or Top location of the linechart on the canvas. No matter what I try, ...
0
votes
1
answer
46
views
MPAndroidChart phantom legend over landscape legend
I am using MPAndroidChart to chart weather data. The app supports both portrait and landscape modes. The legend looks fine in portrait mode, however in landscape more there appears to be white text, ...
2
votes
1
answer
79
views
Why are LineChart lines plotting above the correct grid line?
I have a LineChart where axisLeft.axisMinimum = -0.5f a set of points that are y=[0,0,3,0,0]. For some reason, the line starts plotting above the 0 grid line even though the value is 0. Why would a -0....
0
votes
1
answer
54
views
MPAndroidChart. How do I make LineChart plot y=0 at the x-axis without disappearing?
I am on MPAndroidChart v.3.1.0 and I am using a LineChart. I have a continuous plot of data that starts at (0,0). Some Y will be positive but some points will be 0. My current graph looks like the ...
0
votes
0
answers
54
views
MPAndroid Line chart cannot draw from right to left?
I'm trying to draw a graph using MPAndroid line chart like the one below
My issue is that I'm able to plot the loop above the X axis, but when I start drawing backwards, It gives me java.lang....
1
vote
0
answers
49
views
How do i change the HorizontalBarChart's gridlines and axis color to another color? And how do i show text on the bars for MPAndroidChart in Kotlin?
I'm working with a HorizontalBarChart in MPAndroidChart and need to customize the appearance of the labels, text and grid lines. Here's what I've tried so far:
Removing and Adding bar labels: I've ...
0
votes
1
answer
64
views
MPAndroidChart Scatter Chart data getting clipped
I have been exploring MPAndroidChart and came across this issue where the data point seem to be clipped off.
Any ways to go about this without changing the axis minmax?
Current Situation
Tried various ...
0
votes
1
answer
46
views
Issue with non-filling bars in a chart: why are the colors not displaying correctly?
i am facing an issue with a bar chart where the bars are not filling with the assigned colors properly. Instead, they appear as empty. I have tried various methods to set custom colors for the bars, ...
0
votes
1
answer
273
views
Errors in importing MPAndroidChart: INVALID CATALOG DEFINITION
I'm trying to import MPAndroidChart in my application in android studio. This is what I did so far.
Added this in my settings.gradle.kts under repositories
dependencyResolutionManagement {
...
0
votes
0
answers
251
views
MPAndroidChart:v3.1.0 not working in kotlin
I am trying to do this -
dependencies {
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
}
Sync is successful but when I am running the app it is throwing these errors -
...
0
votes
0
answers
57
views
In MPAndroidChart, How to make the lengths between the two labels on the x-axis and y-axis equal
I am using the MPAndroidChart library and have implemented a LineChart. I have set the maximum and minimum values for both the x-axis and y-axis, and the width and height in the layout are set to ...
1
vote
0
answers
59
views
MPAndroidChart XAxis lables
I have a c# chart that looks like the image. I need to make something similar in MPAndroidChart 3.1.0. But I cannot figure out how to set the xaxis tick marks (0,600,1200...) and label ( Energy(KeV) ...
1
vote
0
answers
61
views
How to add a non-standard background to the MPAndroidChart library chart
I'm using a scatter plot where I want to use the background (image or programmatically) to immediately see which areas the dots are in.
I have not been able to find solutions to this problem.
How to ...
0
votes
1
answer
168
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
1k
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 ...
2
votes
1
answer
293
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
67
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
324
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
40
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
137
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 ...
1
vote
0
answers
209
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
117
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 ...
2
votes
1
answer
159
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
378
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
132
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
342
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 ...
0
votes
1
answer
319
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
270
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
55
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
292
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
74
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
277
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
237
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
95
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
484
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
180
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
140
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 ...
1
vote
0
answers
129
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
103
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
578
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
338
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
73
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
77
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
1
answer
240
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 ...