Hi, guys
My axis is SCICategoryDateTimeAxis type. And using SCIZoomPanModifier (SCIClipMode_ClipAtExtents) to scroll chart
I’m using setVisibleRangeLimit: method to clip the axis during ZoomExtents
Until v. 2.0.0.1511 it’s work like a charm. But now something had have broken. And it’s doesn’t allow me to scroll chart at right way. It show me all of the data range on chart or only left side.
So can you fix it?
Best regards,
Sushynski Andrei
- Andrei Sushynski asked 7 years ago
- last edited 7 years ago
- You must login to post comments
Hi, Andrei
I’ve fixed it. But there are some changes in category axis. Now Visible range and visible range limit work with indexes, not with value. So you should pass range of indexes for visible range limit. (in v2.0.0.1523)
Here small example how to work with the visible range:
axis = [[SCICategoryDateTimeAxis alloc] init];
axis.axisId = @"X1";
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
dateFormat.dateFormat = @"YYYY-MM-dd";
id<SCIDataSeriesProtocol> dataSeries = self.dataSeries;
int minIndex = [[dataSeries xValues] indexOf:SCIGeneric([dateFormat dateFromString:@"2001-06-13"]) IsSorted:YES SearchMode:SCIArraySearchMode_Nearest];
int maxIndex = [[dataSeries xValues] indexOf:SCIGeneric([dateFormat dateFromString:@"2004-06-13"]) IsSorted:YES SearchMode:SCIArraySearchMode_Nearest];
axis.visibleRangeLimit = [[SCIDoubleRange alloc] initWithMin:SCIGeneric(minIndex) Max:SCIGeneric(maxIndex)];
Best Regards, Mykola
- Mykola Hrybeniuk answered 7 years ago
-
Thanks Now it’s works
- You must login to post comments
Please login first to submit.