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

PeriodAxis.setFirst() does not work or not documented well #427

Open
jdotsoft opened this issue Dec 24, 2024 · 3 comments
Open

PeriodAxis.setFirst() does not work or not documented well #427

jdotsoft opened this issue Dec 24, 2024 · 3 comments

Comments

@jdotsoft
Copy link

jdotsoft commented Dec 24, 2024

Demo the issue:
Add the line domainAxis.setFirst(new Month(10, 2001)); in the demo PeriodAxisDemo1.java

Expected the chart to start from Oct-2010, but it starts from the first chart point.
Commenting out the method domainAxis.setAutoRangeTimePeriodClass(Month.class); does not have effect.
Using v1.5.5, Java-8

@trashgod
Copy link
Contributor

Verify that you invoke setFirst() after calling setDomainAxis().

@jdotsoft
Copy link
Author

jdotsoft commented Dec 24, 2024

It works! Please update JavaDoc.

The constructor PeriodAxis(label, first, last) does not work with this required sequence of calls.
BTW, it is very unusual sequence of calls. I expect all settings for PeriodAxis object to be called before finally calling setDomainAxis() with this PeriodAxis object.

From user's perspective classes PeriodAxis and DateAxis are very similar. It would be great to have method DateAxis.setLabelInfo() similar to PeriodAxis.setLabelInfo() and method PeriodAxis.setMinimumDate() and PeriodAxis.setMaximumDate() similar to class DateAxis. Please create feature requests for these methods.

@trashgod
Copy link
Contributor

Rather than relying on an existing time series ChartFactory, it might be useful to aggregate the required sequence into a custom factory method.

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

2 participants