Skip to content

Graph viewport not changed after call to movieViewToX #765

@gopi1410

Description

@gopi1410

In my code I do a call to

    mChart.moveViewToX(data.getXValCount() - 11);
    mChart.invalidate();

I keep on adding data dynamically to the chart the above code is executed after each data addition.
Sometimes the chart does not change the viewport and after the next data, it changes.

I looked in the issue and I noted that if I call invalidate() once again after a second or so of adding the data then the chart moves. Upon further examining the issue, the found that the issue was due to not refreshing the chart upon completion of the post() job. In the ViewPortHandler.java class, if I change the refresh(save, view, false); to refresh(save, view, true);, then my chart renders as desired. Is there any reason why you aren't refreshing after changing the viewport?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions