MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Line chart start and end data set circles are clipped at the axis

Open mdrabic opened this issue 11 years ago • 13 comments

I have a Line Chart that has a layout_height set to 108dp and a layout_width set to match_parent. The circles that indicate the first and last data point on the graph are getting clipped. I took a look at the video from the demo app that is listed in the ReadMe and the Line Chart that is demoed does not have this problem. I thought my issue my related to the combination of styling I was doing to the graph but it wasn't. Even after I removed all non-default styling, the first and last circles are still clipped.

I did search the existing issues and did not come across an existing issue related to my problem.

screen shot 2015-03-18 at 1 30 43 pm

mdrabic avatar Mar 18 '15 17:03 mdrabic

Known issue, already fixed in latest commit :-) Thx anyway!

If it really bugs you, v2.0.7 should not have this issue!

PhilJay avatar Mar 18 '15 17:03 PhilJay

@PhilJay Thanks for the ultra quick response. Will go ahead and build from the latest commit. Do you have an estimated date when you'll cut the next release?

mdrabic avatar Mar 18 '15 17:03 mdrabic

Not really sure, probably ina week or so!

PhilJay avatar Mar 18 '15 17:03 PhilJay

Hey @PhilJay .. I am facing the same issue. Out off curiosity, is the issue supposed to be fixed in v2.0.8 or is there a new build coming out in few days.?

v-singhal avatar Mar 24 '15 04:03 v-singhal

@v-singhal This issue was not resolved in v2.0.8. A fix already exists for this in the code base and will be included in the next release. I ended up cloning the project and building it. Had no issues doing that and it resolved the clipping issue.

mdrabic avatar Mar 24 '15 11:03 mdrabic

Thanks a lot @mdrabic !

v-singhal avatar Mar 24 '15 15:03 v-singhal

@v-singhal I am also facing the same issue how can I resolve it ? Thanks

nhjariwala avatar Mar 31 '15 12:03 nhjariwala

Hey @nhjariwala .. You have two options here: #1: (pretty straight forward) Switch from v2.0.8 to v2.0.7 If you are using the .jar file for v2.0.8, replace it the .jar for v2.0.7. I trust you know where to find the .jar files. If you are customizing your graphs, you will have to modify some of your function calls appropriately. Incase you have the git project, get the old version and replace it with the existing version in your workspace/project.

#2: Download the latest (non-released) workspace/project version of library by using gitclone as indicated below... (extracted from MPAndroidChart's Readme.md)

  • Open your commandline-input and navigate to your desired destination folder (where you want to put the library)
  • Use the command git clone https://github.com/PhilJay/MPAndroidChart.git to download the full MPAndroidChart repository to your computer (this includes the folder of the library project as well as the example project)
  • Import the library folder (MPChartLib) into your Eclipse workspace
  • Add it as a reference to your project

v-singhal avatar Mar 31 '15 13:03 v-singhal

@v-singhal Thanx for your response but still issues is not resolve. I have try to implemented 2nd options please have look the below image.

images

Thanx

nhjariwala avatar Apr 01 '15 04:04 nhjariwala

@nhjariwala The graph looks correct to me. None of the circles on the edge of the graph are clipped. What are you expecting?

mdrabic avatar Apr 01 '15 10:04 mdrabic

@mdrabic the last value of data are clipped it not showing whole value

nhjariwala avatar Apr 01 '15 11:04 nhjariwala

Hi @nhjariwala, just to confirm the data value at the datapoint is double digit? Because as per the graph, the value at the last point is "2" and it can be verified from the Y-Axis as well. EDIT : Try using debugger/adb logger and verify the value computed at that particular data point.

v-singhal avatar Apr 01 '15 11:04 v-singhal

Hi @v-singhal thank you so much for your prompt response .. yeah the value is in single digit it means the issue is resolved now.. many many thanx again :+1: :+1:

nhjariwala avatar Apr 02 '15 04:04 nhjariwala