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.

MPAndroidChart (https://github.com/PhilJay/MPAndroidChart) is a powerful open-source Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.

Core features:

  • LineChart, BarChart (vertical & horizontal), PieChart, ScatterChart, CandleStickChart, RadarChart (spider web chart), BubbleChart
  • Scaling on both axes (with touch-gesture, axes separately or pinch-zoom)
  • Dragging / Panning (with touch-gesture)
  • Separate (dual) y-axes
  • Highlighting values (with customizeable popup-views)
  • Save chart to SD-Card (as image)
  • Predefined color templates
  • Legends (generated automatically, customizeable)
  • Customizeable Axes (both x- and y-axis)
  • Animations (build up animations, on both x- and y-axis)
  • Limit lines (providing additional information, maximums, ...)
  • Fully customizeable (paints, typefaces, legends, colors, background, gestures, dashed lines, ...)
  • Available as .jar file
  • Available as gradle dependency and via maven: Usage
  • Detailed documentation
  • Example Project (code for demo-application)
  • Google-PlayStore Demo Application
1939 questions
0
votes
0 answers

Vertical legend wrong representation

I want the legend to be represented vertically on the right of the pie chart. I'm currently using this code:…
Paktalin
  • 236
  • 4
  • 16
0
votes
1 answer

MPAndroidChart won't animate

I want to animate barchart, linechart and others but its wont animate.. I have tried using all animate function in MPAndroidChart (barChart.animateXY(3000, 3000);). ArrayList labels = new ArrayList<>(); labels.add("2016"); …
Lim YC
  • 31
  • 2
  • 11
0
votes
0 answers

Changing colors of specific entries

Can you change the circle color of specific entries when adding data to a set? Right now, I have two data sets that make two separate different colored lines. I want one line with different colored circles if that is possible.
JDoza
  • 1
  • 1
0
votes
1 answer

Can't Reload JSON Data

I am trying to refresh "Bar chart" from json, in server. But android cant update that json data. I tried using runnable, but the data that was fetched remains same. I'm using volley to get the data from the server and i want to make it reload every…
0
votes
1 answer

Data disappears after adding (MPAndroidChart)

After I add a new Entry to my chart, if I go to a different activity, the data point disappears when I return. How do I fix it so that the data set is saved and remembers the new data entered by the user?
JDoza
  • 1
  • 1
0
votes
2 answers

How to set yaxis values in center of xaxis labels in line chart?

I am a bit new to MPAndroidChart library and I am going to make a line chart for my data. I intend to set yaxis values exactly in the center of each grid rectangle which is inside them. How that would be possible ?
0
votes
1 answer

MPCharts Bar chart X label and can't scroll

I am making a barchart as shown in the code below. However the x labels "12:00", "12:10", ... are not showing up on the graph. Only the first one shows ("12:00"). I am facing another issue. I have two charts on the same page and I can't scroll down…
Jon Goe
  • 165
  • 2
  • 13
0
votes
1 answer

(mpandroidchart) Using user input

I'm currently making an app that tracks a user's blood pressure. Right now, I have a dataset with data programmed into the graph instead of a user actually inputting information. How would I store an integer and use it as a new data point in the…
JDoza
  • 1
  • 1
0
votes
1 answer

MpAndroidChart for Xamarin.android

I'm using MpAndroidChart for my app. I can create piechart successfully but I have a question. I want an event listener to handle item clicked when user touched one of piechart item.How can I do it? My Code is as below; > int[] ydata = { 5, 2, 3, 1…
0
votes
1 answer

Multiple LineDataset Animation MPChart Android

I am using MPChart Library. I have multiple linedatasets in my line chart. I want to animate them in linear order. Right now the animation starts simultaneously on all datasets in line chart. Thank you
0
votes
1 answer

I am trying to set data from string array to xaxis in MpAndroid line chart

I am trying to set data from string arraylist to xaxis but it gives duplicate data and if i add xAxis.setGranularity(1f); it gives java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 graphxaxis = new ArrayList(); …
Shafin Raza
  • 21
  • 1
  • 8
0
votes
1 answer

Making a line chart with MPAndroid moveable

I have built a line chart in android which looks like this: I would like the graph to be able to move, as in if i plot more points along the graph and the screen can move to the right with it, either on its own or by the user moving it. how would…
user9582415
0
votes
1 answer

Android MP Chart - Line Chart Error when value in x-axis decreases

I am facing an issue in plotting my points using a LineChart in MPAndroidCharts library in Android. Scenario I want to make a chart like the image below. I have values for x-axis that might increase or decrease throughout my ArrayList. PROBLEM I…
0
votes
1 answer

Combined Chart with BarChart + LineChart onClickListener

I would like to use Combined Chart with BarChart and LineChart, but I would like to set the barChart as clickable only. Now if the click is near the line, the line's click fires, and not the Bar behind it (using stackedbars). Below is the code for…
Teszt Cell
  • 29
  • 3
0
votes
2 answers

Show only some values in MPAndroidChart

I have an array of y values that I am displaying over the dates of a month. To simplify, for the first week of April, I would have the values {0,200,0,0,500,0,100} over the x values {1,2,3,4,5,6,7}. I am able to display them as a bar chart using…
ankit
  • 125
  • 4
  • 13
1 2 3
99
100