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
114
votes
5 answers

Android charting libraries

I am trying to find a fast and reliable charting library. After some searching, I found 4 libraries: AChartEngine [warning! official website is down and redirects to virus filled website!], WilliamChart, HelloCharts and AndroidPlot. I need some up…
user3488996
  • 1,339
  • 2
  • 10
  • 13
75
votes
20 answers

Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.1.4

I'm using MPAndroidChart library in android studio. But when I'm trying to sync gradle I get an error as shown in below image. Gradle text is here to compile MPAndroidChart library. compile 'com.github.PhilJay:MPAndroidChart:v2.1.4' How can I…
pRaNaY
  • 24,642
  • 24
  • 96
  • 146
71
votes
9 answers

How to hide legends and axis in MPAndroidChart?

Is their any possibility to hide all rounded items from this picture. I have used the following code, public void setDataList(List dataList, Resources resources) { ArrayList categories = new…
Gunaseelan
  • 14,415
  • 11
  • 80
  • 128
58
votes
4 answers

How to remove description from chart in MPAndroidChart?

I am using MPAndroidChart. How can I remove the description from PieChart? I can remove the Legend with chart.setDrawLegend(false), but I couldn't find anything regarding the chart description in the documentation.
dbam
  • 1,088
  • 1
  • 13
  • 16
51
votes
7 answers

MPAndroidChart hide background grid

I'm using MPAndroidChart - LineChart in my android application. I want to remove gridlines from the background . How can I remove gridlines from the background? Library: MPAndroidChart on GitHub EDIT: I created my own custom LineChart using this…
Metehan Toksoy
  • 1,885
  • 3
  • 22
  • 39
36
votes
7 answers

MPAndroidChart - Change message "No chart data available"

Is there any way to change the message "No chart data available" when the chart is not populated? Edit: Found the answer chart.setNoDataText("Description that you want");
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
27
votes
3 answers

How to disable highlight line in MPAndroidChart?

MPAndroidChart - linechart how to invisible touching line ? please help.
KI-NAM BANG
  • 285
  • 1
  • 4
  • 7
27
votes
4 answers

How to create a BarChart with grouped bars with MPAndroidChart?

How can i compare two set of data using BarChart of MPAndroidChart. It should look like this image below: I edited a code, I get from a sample project in github. how can I put together 100f and 110f value in one Xaxis label Whole Number …
Drenyl
  • 906
  • 1
  • 18
  • 41
27
votes
2 answers

How to hide drawn values in MPAndroidChart?

I need to hide the value above bars in MPAndroidChart for barchart. I have tried all the methods available in it , but could not find the solution.
vaibhav
  • 339
  • 1
  • 5
  • 7
27
votes
9 answers

MPAndroidChart - Legend labels are being cut off

I am using MPAndroidChart library. Anybody has this problem? When I put the labels in BOTTOM position, these are cut. Thank you
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
27
votes
2 answers

How to format values inside MPAndroidChart?

2 Questions about the MPAndroidChart library. All my yvalues are integers, but displayed as Decimals. How can I get them displayed as integers (without the digits)? How can I prevent that the ylabels are also shows as decimals? I know there is a…
Dennis
  • 327
  • 1
  • 4
  • 8
26
votes
7 answers

In MPAndroidChart Library, How to wrap X Axis Labels to two lines when long?

I am trying to show X axis label to go to 2 lines when they are long. How to achieve this in LineChart? See screenshot below. I want time to go to second line instead of staying next to date
NinjaCoder
  • 2,381
  • 3
  • 24
  • 46
24
votes
6 answers

mpandroidchart - How can I avoid the repeated values in Y-Axis?

I want to avoid the repeated values and the -0 values in Y-Axis, avoiding the image situation. I have these ideas to solve this, but any solution: Limit the zoom before having repeated values in YAxis, therefore stop the infinite zoom-in on the…
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
24
votes
9 answers

MPAndroidChart - Round edged bar chart

I am trying to create a chart like below, For my android application using MPAndroidChart. I am unable to figure out, how to make the bar chart's edges as round edged. It always comes as square edge. So can you please suggest me what I should…
syed imty
  • 1,018
  • 1
  • 9
  • 27
23
votes
8 answers

MarkerView goes out of the chart for the last point on the chart

I am using a MarkerView class to show markerviews in the chart. The markerview layout I have created contains two textview, one below the other. The problem I am facing is that the markerview for the last point on the chart is half within the chart…
Arjun Issar
  • 672
  • 4
  • 13
  • 32
1
2 3
99 100