Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement in documentation: Chart description documentation is outdated #3987

Open
SeppPenner opened this issue Apr 29, 2018 · 2 comments
Open

Comments

@SeppPenner
Copy link

@SeppPenner SeppPenner commented Apr 29, 2018

Your documentation for the description methods for a chart is outdated.

https://github.com/PhilJay/MPAndroidChart/wiki/General-Chart-Settings-&-Styling:

  • setDescription(String desc): Set a description text that appears in the bottom right corner of the chart.
  • setDescriptionColor(int color): Sets the color of the description text.
  • setDescriptionPosition(float x, float y): Sets a custom position for the description text in pixels on the screen.

However, the Chart.java class only contains a method to set a Description object as a total object:

public void setDescription(Description desc) {
	this.mDescription = desc;
}

So, to set e.g. the titel of a description to the chart, you need to do the following (assuming Kotlin, but is quite equal to Java):

private fun something() {
	myChart.description = getDescription()
}

private fun getDescription(): Description{
	val description = Description()
	description.text = getString(R.string.consumptionPer100km)
	//Here e.g. the setPosition(float x, float y) or setTextAlign(Paint.Align align) methods can be applied,
	//too
	return description
}

I think, the documentation should be updated as this is really confusing otherwise.

@almic
Copy link
Contributor

@almic almic commented Apr 29, 2018

Yes, since the library has been... er... ignored... for the most part... for around a year now, the documentation in the Wikis is very limited and sometimes wrong.

Step one will be updating the javadoc, and then step two is updating the Wiki to be more extensive.

As far as I know, I'm the only one left who is working on this project. This is definitely on my to-do list.

@almic almic self-assigned this Apr 29, 2018
@SeppPenner
Copy link
Author

@SeppPenner SeppPenner commented Apr 29, 2018

Step one will be updating the javadoc, and then step two is updating the Wiki to be more extensive.

Yeah, that would be great.

As far as I know, I'm the only one left who is working on this project. This is definitely on my to-do list.

I can understand that it is quite impossible for one person to deal with about 1500 issues and support topics here 😄

@almic almic added this to In progress in Version 3.1.0 May 3, 2018
@almic almic added this to In progress in Support May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Version 3.1.0
  
In progress
Support
In progress
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.