I’m looking to add a chart onto a project that is to be accessed using an iPad, but am finding that the standard date range component and the calendar components are too fiddly to use. I guess what I am looking for is a number of push buttons that could provide basic functions to control the start and end dates / times but cannot seem to get a robust system working.
Has anyone out there achieved a more user friendly system for use on a tablet?
You can work with the java Calendar object to do this kind of manipulation in a button. Something like the following would move the end time forward an hour.
from java.util import Calendar
end = event.source.parent.getComponent('Easy Chart').endDate # get the end time from the chart
cal = Calendar.getInstance() # creates calendar
cal.setTime(end) # sets calendar time/date
cal.add(Calendar.HOUR_OF_DAY, 1) # adds one hour
event.source.parent.getComponent('Easy Chart').endDate = cal.getTime() # returns new date object, one hour in the future and sets to the chart's endDate
event.source.parent.getComponent('Easy Chart').startDate = end # sets the chart's start time to the original end time