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
21
votes
8 answers

Remove all slice text from Pie Chart (ios-charts/mpandroidchart)

I know the method for removing the x-values but how do I remove the y-values. I basically don't want ANY text on my Pie Chart. The image shows the current-state with the 80.0 and 20.0 labels on top of the pie chart.
Husein Kareem
  • 516
  • 1
  • 4
  • 12
21
votes
2 answers

How MPAndroidChart display all xaxis values

I'm developing some chart features using MPAndroidChart library. Is there any way to display all the xaxis values I added? Seems that the library will auto calculate on xaxis, some of values will be hidden. ex. display date: 05-17 05-17 05-15…
bchang
  • 215
  • 1
  • 2
  • 6
20
votes
3 answers

MPAndroidChart BarChart disable right legends

I need to remove right legends from BarChart. This is my code. mChart = (BarChart) rootView.findViewById(R.id.chart1); mChart.setOnChartValueSelectedListener(this); mChart.setDrawBarShadow(false); mChart.setDrawValueAboveBar(true); …
benoffi7
  • 3,068
  • 3
  • 29
  • 44
20
votes
4 answers

MPAndroid Chart how to make smooth line chart

I am looking to use MPAndroid Chart in my application. But currently, specifying points gives a line graph with sharp edges. How do I make the transition of the graph smooth (similar to a sine-wave for example) ? Thanks !
Shivam Bhalla
  • 1,879
  • 5
  • 35
  • 63
20
votes
2 answers

MPAndroidChart: bottom x-axis and multiple y-axes

I have two questions about this awesome Android chart library: 1) I cannot find a way to put the x-axis at the bottom of the chart: is it possible? 2) is it possible to plot data against two (or more) y-axes on the same chart? Thank you in advance
user1737538
  • 497
  • 2
  • 7
  • 16
19
votes
4 answers

Remove point labels from Line chart using MPAndroidChart library

I am working on designing a Line chart using the MPAndroidChart library. in that chart, the "points labels" should be removed or suppressed, and once we click that point circle the marker should be displayed. However, right now it displays the point…
karuppiah
  • 522
  • 1
  • 5
  • 19
19
votes
1 answer

View outside bounds not drawing properly

I'm drawing a tooltip after clicking inside a custom bar chart (created with MPAndroidChart). The view hierarchy is as follows
Maragues
  • 37,861
  • 14
  • 95
  • 96
19
votes
10 answers

Force BarChart Y axis labels to be integers?

I've created a BarChart using MPAndroidChart and I'm entering the data dynamically. This means that I need my Y axis to also be determined dynamically. All of my data is represented as integers, however the Y axis is sometimes displaying the legend…
Fozefy
  • 665
  • 2
  • 7
  • 23
18
votes
4 answers

MPAndroidChart - Adding labels to bar chart

It is necessary for my application to have a label on each bar of the bar chart. Is there a way to do this with MPAndroidChart? I could not find a way to do this on the project wiki/javadocs. If there isn't a way to do this is there another software…
Matt
  • 1,017
  • 2
  • 11
  • 27
18
votes
1 answer

Hide point views from MPChart LineChart

I'd like to hide (or better, to not draw) the plot points upon the drawn line. Here is a screenshot: Have you got any suggestion on how to do it? I read the documentation but I found nothing useful for this. Thanks in advance! Bye!
andrea.rinaldi
  • 1,167
  • 1
  • 13
  • 33
17
votes
10 answers

How to set String value of xAxis in MPAndroidChart?

I want to make Line Chart Graph, but i have problem to show value string in xAxis, im used Library Github from MPAndroidChart to LineChart. Please help me how to add String Value and actually to much question i want ask private void…
Megi Fernanda
  • 263
  • 1
  • 4
  • 15
17
votes
7 answers

MPAndroidChart how to set y-axis min and max value or set default zoom?

I use MPAndroidChart to display the stock chart, but the Y line value is so close,the chart is like this I can use finger zoom like this way Which is I want the default looks like Is there any way to set Y line max and min value or set default…
Urchin
  • 464
  • 1
  • 4
  • 14
17
votes
5 answers

MPAndroidChart legend customization

I am using MPAndroidChart library. I want customize legends in MPAndroidChart. In MPAndroidChart library i tried to set the position of legends. by given code legend.setPosition(LegendPosition.BELOW_CHART_CENTER) but unable to do it. I have to set…
Zia
  • 2,365
  • 2
  • 17
  • 14
16
votes
7 answers

How to set X axis labels in MP Android Chart (Bar Graph)?

This is with reference to the article : https://github.com/PhilJay/MPAndroidChart/wiki/Setting-Data under the heading Bar Graph.In the given code below: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle…
Shubham Tunwal
  • 237
  • 1
  • 3
  • 11
16
votes
3 answers

MPAndroidChart x-axis date/time label formatting

Background For some charts in my app, I'm using the MPAndroidChart library. All horizontal axis' of my graphs are time based, they can span a full year, a month, a week, a day or span one hour. It always shows a full period, so January-December,…
Marcel50506
  • 1,280
  • 1
  • 14
  • 32