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

setAutoGenerated(true) with Date values #63

Closed
jaichandra opened this issue Jan 28, 2015 · 8 comments
Closed

setAutoGenerated(true) with Date values #63

jaichandra opened this issue Jan 28, 2015 · 8 comments

Comments

@jaichandra
Copy link

I want to show a set of dates in the X Axis that can adjust the visible range (show/hide) based on zoom level (like the integers when setAutoGenerated(true) is set). How can I do it?

@lecho
Copy link
Owner

lecho commented Jan 29, 2015

Hi, not sure if that's what you need but you can set manual labels for axis, library will hide some of them if there will be no place to display them, that will happens automatically. Look at LineColumnDependency sample in repository, there is X axis with months names, on small screen in portrait orientation some of them will not be displayed but when you zoom in you will be able to see every month name.

@jaichandra
Copy link
Author

yes.. looks like its working that way right now. But my x-axis labels are a little longer and the chart is still showing too many labels at a time, causing overlap. My x-axis date label format is MM-DD-YY. Does the chart caculate the width of labels to decide how many labels to show at a time. Or, can specify the number of items to display on the x-axis?

@lecho
Copy link
Owner

lecho commented Jan 30, 2015

You can specify maximum number or characters for labels with method Axis.setMaxLabelChars(int), default are 4 or 3.

@jaichandra
Copy link
Author

Thanks that works in the master branch. Doesn't work in the last release version 1.3.

@lecho
Copy link
Owner

lecho commented Jan 30, 2015

Hmm, that possible, I made some changes in AxisRenderer last month, I will release version 1.4 in the next week.

@jaichandra
Copy link
Author

Great.. another request would be to add a feature to reset the chart's zoom level. May be long press on the chart's viewport.

@johnjohndoe
Copy link
Contributor

@jaichandra Please open a separate issue for your feature request and remove it here.

@lecho
Copy link
Owner

lecho commented Feb 12, 2015

@jaichandra you can already reset zoom:

chart.setCurrentViewport(chart.getMaximumViewport());

I will not add new gesture/touch event for that, you will have to implement it by yourself.

@lecho lecho closed this as completed Feb 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants