Java Code Examples for lecho.lib.hellocharts.view.Chart#getMaximumViewport()

The following examples show how to use lecho.lib.hellocharts.view.Chart#getMaximumViewport() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BgGraphBuilder.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) ((86400000 / 2.5) / FUZZER), 0);
    double distance_to_move = ((new Date().getTime())/ FUZZER) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 2
Source File: BgGraphBuilder.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart, float hours) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) ((86400000 / hours) / FUZZER), 0);
    double distance_to_move = ((new Date().getTime()) / FUZZER) - viewport.left - (((viewport.right - viewport.left) / 2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 3
Source File: BgGraphBuilder.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) ((86400000 / 2.5) / FUZZER), 0);
    double distance_to_move = ((new Date().getTime())/ FUZZER) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 4
Source File: BgGraphBuilder.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart, float hours) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) ((86400000 / hours) / FUZZER), 0);
    double distance_to_move = ((new Date().getTime()) / FUZZER) - viewport.left - (((viewport.right - viewport.left) / 2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 5
Source File: BgGraphBuilder.java    From xDrip-Experimental with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) ((86400000 / 2.5) / FUZZER), 0);
    double distance_to_move = ((new Date().getTime())/ FUZZER) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 6
Source File: BgGraphBuilder.java    From NightWatch with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float)((86400000 / 2.5)/fuzz), 0);
    double distance_to_move = ((new Date().getTime())/fuzz) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 7
Source File: BgGraph.java    From HAPP with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float) (86400000 / 2.5), 0);
    double distance_to_move = (new Date().getTime()) - viewport.left - (((viewport.right - viewport.left) / 2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 8
Source File: BgGraphBuilder.java    From NightWatch with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float)((86400000 / 2.5)/fuzz), 0);
    double distance_to_move = ((new Date().getTime())/fuzz) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}
 
Example 9
Source File: BgGraphBuilder.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
public Viewport advanceViewport(Chart chart, Chart previewChart) {
    viewport = new Viewport(previewChart.getMaximumViewport());
    viewport.inset((float)((86400000 / 2.5)/fuzzer), 0);
    double distance_to_move = ((new Date().getTime())/fuzzer) - viewport.left - (((viewport.right - viewport.left) /2));
    viewport.offset((float) distance_to_move, 0);
    return viewport;
}