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

Real time #37

Open
massdonati opened this issue Mar 27, 2014 · 1 comment
Open

Real time #37

massdonati opened this issue Mar 27, 2014 · 1 comment

Comments

@massdonati
Copy link

Could I use iOS plot for realtime (30 redraws per second)?

@ghost
Copy link

ghost commented May 1, 2014

i solved this by adding the graphs PCLineChartView as subview of the root view with the setTag: method. upon refresh i just remove the old graph subviews by using their tags with removeFromSuperView and setup the graph with the refereshed data and add it as subview again.

// define a tag for your graphview
#define GRAPH_A 100

- (void) paintChart
{
    // remove previous graph view from root view with using the views tag
     [[self.view viewWithTag:GRAPH_A] removeFromSuperview];

    // init your graph
    // and set the graphs settings
    _tlineChartView = [[PCLineChartView alloc] initWithFrame:CGRectMake(10,10,cellWidth,cellHeight)];
    .. setup your graph here...

    // add a tag to the graphview
    [_tlineChartView setTag:GRAPH_A];

    // add graph to view
    [self.view addSubview:_tlineChartView];
}

hope this helps

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