SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

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

Version
v. 2.0.0.1511
  • You must to post comments
0
0

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

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.