Example usage for com.google.gwt.visualization.client LegendPosition NONE

List of usage examples for com.google.gwt.visualization.client LegendPosition NONE

Introduction

In this page you can find the example usage for com.google.gwt.visualization.client LegendPosition NONE.

Prototype

LegendPosition NONE

To view the source code for com.google.gwt.visualization.client LegendPosition NONE.

Click Source Link

Usage

From source file:com.google.sampling.experiential.client.ChartOMundo.java

License:Open Source License

private Options createOptions(String title, String xTitle, String yTitle, String barColor) {
    Options options = Options.create();/*from  ww  w  .  j a  v  a2 s .  c  o  m*/
    options.setWidth(CHART_WIDTH);
    options.setHeight(CHART_HEIGHT);
    options.setEnableTooltip(true);

    options.setMin(0.0);
    options.setTitle(title);
    options.setLegend(LegendPosition.NONE);
    options.setShowCategories(true);
    options.setTitleX(xTitle);
    options.setTitleY(yTitle);
    options.setColors(barColor);
    options.setBorderColor("black");
    return options;
}

From source file:com.google.speedtracer.latencydashboard.client.AggregatedEventTypeChart.java

License:Apache License

public void populateTimeline(DashboardRecord[] serverData) {
    DataTable data = DataTable.create();
    data.addColumn(ColumnType.STRING, REVISION_TITLE);
    data.addColumn(ColumnType.NUMBER, paintTitle);
    data.addColumn(ColumnType.NUMBER, layoutTitle);
    data.addColumn(ColumnType.NUMBER, recalculateStylesTitle);
    data.addColumn(ColumnType.NUMBER, parseHtmlTitle);
    data.addColumn(ColumnType.NUMBER, evalScriptTitle);
    data.addColumn(ColumnType.NUMBER, javaScriptExecutionTitle);
    data.addColumn(ColumnType.NUMBER, garbageCollectionTitle);

    int length = serverData.length;
    data.addRows(length);/*  w  ww  . j  av  a  2s  .c  om*/
    for (int i = 0; i < length; ++i) {
        addRow(data, length - (i + 1), serverData[i]);
    }
    leftChart.setHeight(CHART_HEIGHT + "px");
    AreaChart.Options options = AreaChart.Options.create();
    options.setHeight(CHART_HEIGHT);
    options.setLegend(LegendPosition.NONE);
    options.setTitleY("milliseconds");
    options.setStacked(true);
    options.setColors(paintColor, layoutColor, recalculateStylesColor, parseHtmlColor, evalScriptColor,
            javaScriptExecutionColor, garbageCollectionColor);
    leftChart.draw(data, options);
}

From source file:com.google.speedtracer.latencydashboard.client.GwtLightweightMetricsChart.java

License:Apache License

public void populateTimeline(DashboardRecord[] serverData) {
    DataTable dataTable = DataTable.create();
    dataTable.addColumn(ColumnType.STRING, REVISION_TITLE);
    dataTable.addColumn(ColumnType.NUMBER, bootstrapDurationTitle);
    dataTable.addColumn(ColumnType.NUMBER, loadExternalRefsTitle);
    dataTable.addColumn(ColumnType.NUMBER, moduleStartupTitle);
    int length = serverData.length;
    dataTable.addRows(length);// ww  w . ja  v  a  2s  .c  om
    for (int i = 0; i < length; ++i) {
        addRow(dataTable, length - (i + 1), serverData[i]);
    }

    AreaChart.Options options = AreaChart.Options.create();
    options.setLegend(LegendPosition.NONE);
    options.setHeight(CHART_HEIGHT);
    options.setTitleY("milliseconds");
    options.setStacked(true);
    leftChart.draw(dataTable, options);
}

From source file:com.google.speedtracer.latencydashboard.client.LoadEventChart.java

License:Apache License

public void populateTimeline(DashboardRecord[] serverData) {
    DataTable dataTable = DataTable.create();
    dataTable.addColumn(ColumnType.STRING, REVISION_TITLE);
    dataTable.addColumn(ColumnType.NUMBER, domContentLoadedTitle);
    dataTable.addColumn(ColumnType.NUMBER, pageLoadEventTitle);
    int length = serverData.length;
    dataTable.addRows(length);//  ww w. j a  v  a  2  s  .  c o m
    for (int i = 0; i < length; ++i) {
        addRow(dataTable, length - (i + 1), serverData[i]);
    }

    ColumnChart.Options options = ColumnChart.Options.create();
    options.setLegend(LegendPosition.NONE);
    options.setHeight(CHART_HEIGHT);
    options.setTitleY("milliseconds");
    options.setColors(domContentLoadedColor, pageLoadEventColor);
    leftChart.draw(dataTable, options);
}

From source file:com.google.speedtracer.latencydashboard.client.MarkTimelineChart.java

License:Apache License

/**
 * Populates the timeline with the total time of the measurement set and any
 * of the relevant events.//from w  w  w . jav  a 2s  . c  o m
 * 
 * @param serverData array of custom records for the timeline
 */
public void populateTimeline(CustomDashboardRecord[] serverData) {
    DataTable dataTable = DataTable.create();
    dataTable.addColumn(ColumnType.STRING, revisionTitle);
    dataTable.addColumn(ColumnType.NUMBER, "Total");

    for (String event : events) {
        dataTable.addColumn(ColumnType.NUMBER, displayEventName(event));
    }

    int length = serverData.length;
    dataTable.addRows(length);
    for (int i = 0; i < length; i++) {
        addRow(dataTable, length - (i + 1), serverData[i]);
    }

    LineChart.Options options = LineChart.Options.create();
    leftChart.getLayoutData();
    options.setLegend(LegendPosition.NONE);
    options.setHeight(CHART_HEIGHT);
    options.setTitleY("milliseconds");
    options.setColors(COLORS);
    leftChart.draw(dataTable, options);
}

From source file:com.google.speedtracer.latencydashboard.client.RightPieChart.java

License:Apache License

/**
 * Options to pass to the pie chart./* w w w.j av  a 2  s  .  c om*/
 */
public static PieChart.Options createOptions() {
    Options options = PieChart.Options.create().<Options>cast();
    options.setLegend(LegendPosition.NONE);
    options.setHeight(LatencyDashboardChart.RIGHT_CHART_HEIGHT);
    return options;
}

From source file:com.rhizospherejs.gwt.showcase.client.gviz.GoogleVisualizationTab.java

License:Open Source License

private void initOptions() {
    // Scatterplot options
    scatterChartOptions = ScatterChart.Options.create();
    scatterChartOptions.setWidth(400);//from ww w  .  j a  v  a  2 s  .com
    scatterChartOptions.setHeight(400);
    scatterChartOptions.setLegend(LegendPosition.NONE);
    scatterChartOptions.setTitleX("Weight (kg)");
    scatterChartOptions.setTitleY("Height (cm)");

    // Rhizosphere options.
    rhizosphereOptions = RhizosphereOptions.create();

    // Defines a custom renderer via configuration options.
    rhizosphereOptions.setRenderer(new PersonRenderer(this));
    rhizosphereOptions.setCacheDimensions(true);
    rhizosphereOptions.setEnableHTML5History(false);

    // Enhance the metamodel Rhizosphere automatically generates from the
    // DataTable. In particular, configure Rhizosphere to use a Date data type
    // and selector for the 'dob' column.
    RhizosphereMetaModel meta = RhizosphereMetaModel.create();
    meta.newAttribute("dob").setKind(RhizosphereKind.DATE).setLabel("Date of Birth").setYearRange(2005, 2011);

    // Extend the automatically generated metamodel with the provided info.
    rhizosphereOptions.setMetaModelFragment(meta);
}

From source file:com.square.composant.contrat.personne.morale.square.client.view.ContratsPersonneMoraleViewImpl.java

License:Open Source License

@Override
public void afficherCamembertPopulation(final DataTable donneesPopulation) {
    final Runnable onLoadCallback = new Runnable() {
        public void run() {
            final Options options = Options.create();
            options.setSize(ContratsPersonneMoraleViewImplConstants.LARGEUR_CHART,
                    ContratsPersonneMoraleViewImplConstants.HAUTEUR_CHART);
            options.setLegend(LegendPosition.NONE);
            options.setBackgroundColor(ContratsPersonneMoraleViewImplConstants.COULEUR_FOND_STATISTIQUE);
            options.setTitle(viewConstants.titrePopulation());
            options.setTitleFontSize(12);
            final PieChart pieChartPopulation = new PieChart(donneesPopulation, options);
            panelPieChartPopulation.add(pieChartPopulation);
            panelPieChartPopulation.setCellVerticalAlignment(pieChartPopulation, HasAlignment.ALIGN_TOP);
            panelPieChartPopulation.setVisible(true);
        }//from  w  ww .  ja va  2  s  . c  om
    };
    VisualizationUtils.loadVisualizationApi(onLoadCallback, "corechart");
    panelPieChartPopulation.setVisible(true);
}

From source file:com.square.composant.contrat.square.client.view.ContratsViewImpl.java

License:Open Source License

@Override
public void afficherJaugeBanco(final String dateDebut, final String dateFin, final DataTable donnees) {
    final Runnable onLoadCallback = new Runnable() {
        public void run() {
            final Options options = Options.create();
            options.setWidth(ContratsViewImplConstants.LARGEUR_CHART);
            options.setHeight(ContratsViewImplConstants.HAUTEUR_CHART);
            options.setLegend(LegendPosition.NONE);
            options.setColors(getListeCouleursJaugeBanco());
            options.setBackgroundColor(ContratsViewImplConstants.COULEUR_FOND_STATISTIQUE);
            options.setTitle(viewMessages.titreJaugeBanco(dateDebut, dateFin));
            options.setFontSize(12);//  www.  j av a2  s. com
            final PieChart pieChartJaugeBanco = new PieChart(donnees, options);
            panelStatsJaugeBanco.add(pieChartJaugeBanco);
            panelStatsJaugeBanco.setVisible(true);
        }
    };
    VisualizationUtils.loadVisualizationApi(onLoadCallback, "corechart");
}

From source file:com.square.composant.contrat.square.client.view.ContratsViewImpl.java

License:Open Source License

@Override
public void afficherStatistiquePrestationCotisation(final DataTable dataLineChart) {
    final Runnable onLoadCallback = new Runnable() {
        public void run() {
            final Options options = Options.create();
            options.setWidth(ContratsViewImplConstants.LARGEUR_CHART);
            options.setHeight(ContratsViewImplConstants.HAUTEUR_CHART);
            options.setLegend(LegendPosition.NONE);
            options.setBackgroundColor(ContratsViewImplConstants.COULEUR_FOND_STATISTIQUE);
            options.setTitle(viewConstants.titreStatsPrestationCotisation());
            options.setFontSize(12);/*  w w  w . j a  va 2  s .c om*/
            lineChartPrestationCotisation = new LineChart(dataLineChart, options);
            panelStatsPrestationCotisation.clear();
            panelStatsPrestationCotisation.add(lineChartPrestationCotisation);
            panelStatsPrestationCotisation.setVisible(true);
        }
    };
    VisualizationUtils.loadVisualizationApi(onLoadCallback, LineChart.PACKAGE);
}