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

when add points dynamicly, scale is changeing, #264

Closed
kscorpio opened this issue Aug 3, 2015 · 1 comment
Closed

when add points dynamicly, scale is changeing, #264

kscorpio opened this issue Aug 3, 2015 · 1 comment

Comments

@kscorpio
Copy link

kscorpio commented Aug 3, 2015

when add points dynamicly, scale is changeing. so visually, all the points are in the screen , the distance between became smaller, i need the visual effects like electrocardiogram or Oscilloscope

1 when the screen is not full (in x direction), the point add to screen from right
2 when the screen is full (in x direction), the point add to screen from right and a point disappear from left

the same to :#263
code like this:

   //! Y
   ChartDataSet * currentDataSet=self.scaleView.data.dataSets[0];
   NSInteger xIndex= currentDataSet.valueCount;
   ChartDataEntry * entry=[[ChartDataEntry alloc] initWithValue:yVal xIndex:xIndex];
   [currentDataSet addEntry:entry];
   //! X
   NSArray * xVal=_scaleView.data.xValsObjc;
   double lastX=[xVal.lastObject doubleValue];
   lastX +=0.1;
   [_scaleView.data addXValue:[NSString stringWithFormat:@"%f",lastX]];

   //!
   [self.scaleView notifyDataSetChanged];
   [self.scaleView moveViewToX:xIndex+1];
@kscorpio kscorpio reopened this Aug 12, 2015
@kscorpio
Copy link
Author

same to :#263

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

1 participant