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

MPAndroidChart draw multiple charts lined vertically with shared X axis

I wonder if it is possible to achieve something like this with MPAndroidChart library? Basically, I want to have multiple line charts with different Y axis stacked vertically sharing the same X axis (when I move, zoom or highlight a value I want…
Georgiy Shur
  • 748
  • 1
  • 8
  • 19
0
votes
1 answer

Ho to set MPAndroid piechart no lable

I'v used MPAndroid PieChart and want to show only percent values without labels. When I remove labels then colored guide below of chart also is without label. How to remove labels from pichart without removing guide labels?
Amirhosein
  • 4,266
  • 4
  • 22
  • 35
0
votes
1 answer

MPAndroidChart Change Graph's Date Range

I have a date-based graph with x-axis as dates. By default, I populate the graph with a data set of past 6 months. I would like to change the graph to show: Last one week, Last one month, Last 3 months etc. I looked at the API documentation for…
Bonton255
  • 2,231
  • 3
  • 28
  • 44
0
votes
2 answers

How to set icons in `LineChart` to selected position in MPAndroidChart?

I have a list of Entry points which I have plotted on LineChart. Now I want to set icon to a particular point. How to set or draw icons in LineChart to my selected position in MPAndroidChart?
Sandeep Yohans
  • 929
  • 1
  • 14
  • 36
0
votes
0 answers

MPChartAndroid - Line chart with multiple dataset

I am using MpChart library for Android graph representation Let's say we have DataSet1 and DataSet2. DataSet1 has a list of entries with timestamp as X-value and some Integer as Y-value. Dataset2 has only timestamp as X-value they do not have any…
Siddhpura Amit
  • 67
  • 2
  • 10
0
votes
1 answer

MP Android is not showing X axis value

Bar Graph with NO X valueI am able to plot MP Android chart successfully but If I click the particular bar then its not showing the X axis value. I am using kotlin and below is the part of the sample code. Input: …
user10480468
0
votes
0 answers

Get the center TextView of a PieChart

I am using the library MPAndroidChart. I am struggling with getting the View object that represents the TextView inside the PieChart ("Blabla" in the following example image): I need the View object because I need to pass it to a Showcase library…
Charly Lafon
  • 562
  • 1
  • 3
  • 18
0
votes
1 answer

Combined-Chart (bar- and linechart) + xAxis.setValueFormatter

I'm having a hard time figuring out how to set specific values to the X-AXIS. For Example, I would like the X-axis to display DAY 0, DAY 1, …,DAY N. But clearly I am not understanding setValueFormatter, I read your documentation and I'm still having…
Ants
  • 390
  • 1
  • 3
  • 18
0
votes
2 answers

How Can I Draw Cells Inside MPAndroidChart

How can I draw cells inside LineChart I am able to display lines dynamically, but didn't find how to draw inner cells. I have followed these examples https://github.com/PhilJay/MPAndroidChart/issues/3751 MPAndroidChart- How to add cells inside grids…
Tufan
  • 2,789
  • 4
  • 34
  • 52
0
votes
0 answers

I don't know what happens inside this thread and the log prints nothing

The code below is called in the mainThread, I wanted to update an MPAndroidChart LineChart from a separate thread with data from Arduino HC-06 Bluetooth module but I don't know what happens(because the plot is still populated with mock data) when it…
RABI Hamza
  • 106
  • 8
0
votes
0 answers

mpandroidchart data duplication

I have a LineChart inside of a Fragment, and I included a spinner to filter the data by week/month/year. The OnCreateView of the Fragment initializes it to display the Weekly data, but when I select the spinner to set it by Month or Year, the data…
0
votes
0 answers

MPAndroidChart with custom image

I am working on making this layout which is a layout contains a chart with custom image. I assume that this is a bar chart with custom image on it. Every 10 values equal to one bottle image. I'm planning to use MPAndroidChart but seems that i have…
Iganov
  • 85
  • 2
  • 14
0
votes
4 answers

MPAndroidChart and DataBinding

I have a fragment where I have MPAndroidChart and textViews. I understand that MPAndroidChart doesn't support Data Binding as indicated in here: https://github.com/PhilJay/MPAndroidChart/issues/1382 Right now I am using ButterKnife to find my views,…
user3937344
0
votes
1 answer

MPAndroidChart: Maintain the same resolution / step on x-axis when on portrait or landscape mode

There is a functionality to set maximum number of visible entries with mChart.setVisibleXRangeMaximum(5); but is there a way to maintain the same resolution or step size when in landscape mode, where the chart becomes longer? By resolution / step…
adriennoir
  • 1,329
  • 1
  • 15
  • 29
0
votes
2 answers

android - How to retrieve MPAndroidChart ArrayList from file

I'm using MPAndroidChart in my app and I'd like to save an ArrayList in a file, for later use. Here is where I save it to a file in the internal storage: ArrayList entries =…
Michele
  • 326
  • 8
  • 18