Search in sources :

Example 1 with PlotOptionsBoxplot

use of com.vaadin.addon.charts.model.PlotOptionsBoxplot in project charts by vaadin.

the class BoxPlotExample method getPlotBoxOptions.

private PlotOptionsBoxplot getPlotBoxOptions() {
    PlotOptionsBoxplot options = new PlotOptionsBoxplot();
    if (useCustomStyles.getValue()) {
        // optional styling
        options.setMedianColor(new SolidColor("cyan"));
        options.setMedianWidth(1);
        options.setStemColor(new SolidColor("green"));
        options.setStemDashStyle(DashStyle.SHORTDOT);
        options.setStemWidth(4);
        options.setWhiskerColor(new SolidColor("magenta"));
        options.setWhiskerLength("70");
        options.setWhiskerWidth(5);
    }
    return options;
}
Also used : PlotOptionsBoxplot(com.vaadin.addon.charts.model.PlotOptionsBoxplot) SolidColor(com.vaadin.addon.charts.model.style.SolidColor)

Example 2 with PlotOptionsBoxplot

use of com.vaadin.addon.charts.model.PlotOptionsBoxplot in project charts by vaadin.

the class ChartTypes method chartTypesBoxplotPlotoptionsSnippet1.

public void chartTypesBoxplotPlotoptionsSnippet1() {
    Chart chart = new Chart(ChartType.BOXPLOT);
    Configuration conf = chart.getConfiguration();
    // Set median line color and thickness
    PlotOptionsBoxplot plotOptions = new PlotOptionsBoxplot();
    plotOptions.setMedianColor(SolidColor.BLUE);
    plotOptions.setMedianWidth(3);
    conf.setPlotOptions(plotOptions);
}
Also used : Configuration(com.vaadin.addon.charts.model.Configuration) PlotOptionsBoxplot(com.vaadin.addon.charts.model.PlotOptionsBoxplot) Chart(com.vaadin.addon.charts.Chart)

Aggregations

PlotOptionsBoxplot (com.vaadin.addon.charts.model.PlotOptionsBoxplot)2 Chart (com.vaadin.addon.charts.Chart)1 Configuration (com.vaadin.addon.charts.model.Configuration)1 SolidColor (com.vaadin.addon.charts.model.style.SolidColor)1