Examples of PlotOptions


Examples of ca.nanometrics.gflot.client.options.PlotOptions

    private boolean m_ignoreSelectionEvent;

    public PlotWithOverview( PlotWithOverviewModel model )
    {
        this( model, new PlotOptions() );
    }
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    public Widget createExample()
    {

        PlotModel model = new PlotModel();
        PlotOptions plotOptions = new PlotOptions();

        BarSeriesOptions barSeriesOptions = new BarSeriesOptions();
        barSeriesOptions.setShow( true );
        barSeriesOptions.setLineWidth( 1 );
        barSeriesOptions.setBarWidth( 1 );
        barSeriesOptions.setAlignment( BarAlignment.CENTER );

        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions().setBarsSeriesOptions( barSeriesOptions ) );
        plotOptions.setLegendOptions( new LegendOptions().setShow( false ) );

        // add tick formatter to the options
        plotOptions.setXAxisOptions( new AxisOptions().setTicks( 12 ).setTickFormatter( new TickFormatter()
        {
            public String formatTickValue( double tickValue, Axis axis )
            {
                if ( tickValue > 0 && tickValue <= 12 )
                {
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

{

    public Widget createExample()
    {
        PlotWithOverviewModel model = new PlotWithOverviewModel( PlotModelStrategy.slidingWindowStrategy( 20 ) );
        PlotOptions plotOptions = new PlotOptions();
        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
            .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
            .setPointsOptions( new PointsSeriesOptions().setRadius( 2 ).setShow( true ) ).setShadowSize( 0d ) );
        plotOptions.setXAxisOptions( new TimeSeriesAxisOptions() );

        PlotOptions overviewPlotOptions =
            new PlotOptions()
                .setLegendOptions( new LegendOptions().setShow( false ) )
                .setGlobalSeriesOptions(
                    new GlobalSeriesOptions().setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setFill( true ) )
                        .setShadowSize( 0d ) )
                .setSelectionOptions( new SelectionOptions().setMode( SelectionMode.X ) )
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

     */
    public Widget createExample()
    {

        PlotWithOverviewModel model = new PlotWithOverviewModel( PlotModelStrategy.defaultStrategy() );
        PlotOptions plotOptions = new PlotOptions();
        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
        .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
        .setPointsOptions( new PointsSeriesOptions().setRadius( 2 ).setShow( true ) ).setShadowSize( 0d ) );

        SeriesHandler series = model.addSeries( "Random Series", "#2c1d54" );

View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    public Widget createExample()
    {

        PlotModel model = new PlotModel();
        PlotOptions plotOptions = new PlotOptions();

        // add tick formatter to the options
        plotOptions.setXAxisOptions( new AxisOptions().setTicks( 12 ).setTickFormatter( new TickFormatter()
        {
            public String formatTickValue( double tickValue, Axis axis )
            {
                return MONTH_NAMES[(int) ( tickValue - 1 )];
            }
        } ) );

        plotOptions.setGridOptions( new GridOptions().setAboveData( true ) );

        // create a series
        SeriesHandler handler = model.addSeries( "Ottawa's Month Temperatures (Daily Average in &deg;C)", "blue" );

        // add data
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    }

    public Widget createExample()
    {
        final PlotModel model = new PlotModel();
        final PlotOptions plotOptions = new PlotOptions();

        // add tick formatter to the options
        plotOptions.setXAxisOptions( new AxisOptions().setMinimum( -8 ).setMaximum( 4 ) );
        plotOptions.setYAxisOptions( new AxisOptions().setMinimum( -8 ).setMaximum( 4 ) );

        // create a series
        SeriesHandler handlerImage = model.addSeries( "Image series" );
        handlerImage.getSeries().setSeriesOptions( SeriesType.IMAGE, new ImageSeriesOptions().setShow( true ).setAlpha(0.5) );
        handlerImage.add( new ImageDataPoint( "images/hs-2004-27-a-large_web.jpg", -2, -2, 2, 2 ) );
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    {

        final Label selectedPointLabel = new Label( INSTRUCTION );

        PlotWithOverviewModel model = new PlotWithOverviewModel( PlotModelStrategy.defaultStrategy() );
        PlotOptions plotOptions = new PlotOptions();
        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
        .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
        .setPointsOptions( new PointsSeriesOptions().setRadius( 2 ).setShow( true ) ).setShadowSize( 1 ) );
        plotOptions.setLegendOptions( new LegendOptions().setShow( false ) );

        final PlotWithOverview plot = new PlotWithOverview( model, plotOptions );
        // add hover listener
        plot.addHoverListener( new PlotHoverListener()
        {
            public void onPlotHover( Plot plot, PlotPosition position, PlotItem item )
            {
                if ( item != null )
                {
                    selectedPointLabel.setText( "x: " + item.getDataPoint().getX() + ", y: " + item.getDataPoint().getY() );
                }
                else
                {
                    selectedPointLabel.setText( INSTRUCTION );
                }
            }
        }, false );
        plot.addSelectionListener( new SelectionListener()
        {

            public void selected( double x1, double y1, double x2, double y2 )
            {
                plot.setLinearSelection( x1, x2 );
            }
        } );
        SeriesHandler s = plot.getModel().addSeries( "Series 1" );
        s.add( new DataPoint( 1, 2 ) );
        s.add( new DataPoint( 2, 5 ) );
        s.add( new DataPoint( 3, 7 ) );
        s.add( new DataPoint( 4, 5 ) );
        s.add( new DataPoint( 5, 3 ) );
        s.add( new DataPoint( 6, 2 ) );
        s.add( new DataPoint( 7, 5 ) );
        s.add( new DataPoint( 8, 7 ) );
        s.add( new DataPoint( 9, 5 ) );
        s.add( new DataPoint( 10, 3 ) );

        // Start of Marking Code
        Marking m = new Marking();
        m.setX( new Range( 2, 4 ) );
        m.setColor( "#3BEFc3" );

        Marking m2 = new Marking();
        m2.setX( new Range( 5, 7 ) );
        m2.setColor( "#cccccc" );

        Marking m3 = new Marking();
        Range a = new Range();
        a.setFrom( 8 );
        m3.setX( a );
        m3.setColor( "#000000" );

        Markings ms = new Markings();
        ms.addMarking( m );
        ms.addMarking( m2 );
        ms.addMarking( m3 );
        // End of Marking Code

        // Add Markings Objects to Grid Options
        plotOptions.setGridOptions( new GridOptions().setHoverable( true ).setMarkings( ms ) );

        plot.setHeight( 250 );
        plot.setOverviewHeight( 60 );

        FlowPanel panel = new FlowPanel();
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    private int timeCounter = 0;

    public Widget createExample()
    {
        PlotWithOverviewModel model = new PlotWithOverviewModel( PlotModelStrategy.downSamplingStrategy( 20 ) );
        PlotOptions plotOptions = new PlotOptions();
        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
            .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
            .setPointsOptions( new PointsSeriesOptions().setRadius( 2 ).setShow( true ) ).setShadowSize( 0d ) );
        plotOptions.setLegendOptions( new LegendOptions().setLabelFormatter( new LabelFormatter()
        {
            @Override
            public String formatLabel( String label, Series series )
            {
                return label + " formated";
            }
        } ) );
        plotOptions.setXAxisOptions( new AxisOptions().setShow( false ) );

        final SeriesHandler series = model.addSeries( "Random Series", "#003366" );

        // create the plot
        final PlotWithOverview plot = new PlotWithOverview( model, plotOptions );
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

  }

  public Widget createExample() {

    PlotModel model = new PlotModel();
    PlotOptions plotOptions = new PlotOptions();
    plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
        .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
        .setPointsOptions( new PointsSeriesOptions().setRadius( 2 ).setShow( true ) ).setShadowSize( 0d ) );
    // add tick formatter to the options
    plotOptions.setXAxisOptions(new AxisOptions().setTicks(12).setTickFormatter(new TickFormatter() {
      public String formatTickValue(double tickValue, Axis axis) {
        return MONTH_NAMES[(int) (tickValue - 1)];
      }
    }));

    // >>>>>>> You need make the grid hoverable <<<<<<<<<
    plotOptions.setGridOptions(new GridOptions().setHoverable(true));
    // >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    // create a series
    SeriesHandler handler = model.addSeries("Ottawa's Month Temperatures (Daily Average in &deg;C)", "#007f00");
View Full Code Here

Examples of ca.nanometrics.gflot.client.options.PlotOptions

    @SuppressWarnings( "deprecation" )
    public Widget createExample()
    {

        PlotModel model = new PlotModel( PlotModelStrategy.defaultStrategy() );
        PlotOptions plotOptions = new PlotOptions();
        plotOptions.setGlobalSeriesOptions( new GlobalSeriesOptions()
        .setLineSeriesOptions( new LineSeriesOptions().setLineWidth( 1 ).setShow( true ) )
        .setPointsOptions( new PointsSeriesOptions().setRadius( 3 ).setShow( true ).setSymbol( PointSymbol.DIAMOND ) ) );
        plotOptions.setLegendOptions( new LegendOptions().setShow( false ) );

        // add tick formatter to the options
        plotOptions.setXAxisOptions( new TimeSeriesAxisOptions().setTickSize( 2, TickTimeUnit.MONTH ).setMonthNames( MONTH_NAMES ) );

        // create a series
        // Note: you need to specified the colors in other for the legend to
        // work properly
        SeriesHandler ottawaSeries = model.addSeries( "Ottawa", "#edc240" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.