All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.flow.component.charts.model.Breaks Maven / Gradle / Ivy

There is a newer version: 24.5.4
Show newest version
/**
 * Copyright 2000-2024 Vaadin Ltd.
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See {@literal } for the full
 * license.
 */
package com.vaadin.flow.component.charts.model;

import java.time.Instant;
import java.util.Date;

import com.vaadin.flow.component.charts.util.Util;

/**
 * An array defining breaks in the axis, the sections defined will be left out
 * and all the points shifted closer to each other.
 */
public class Breaks extends AbstractConfigurationObject {

    private Number breakSize;
    private Number from;
    private Number repeat;
    private Number to;

    public Breaks() {
    }

    /**
     * @see #setBreakSize(Number)
     */
    public Number getBreakSize() {
        return breakSize;
    }

    /**
     * A number indicating how much space should be left between the start and
     * the end of the break. The break size is given in axis units, so for
     * instance on a datetime axis, a break size of 3600000 would
     * indicate the equivalent of an hour.
     * 

* Defaults to: 0 */ public void setBreakSize(Number breakSize) { this.breakSize = breakSize; } /** * @see #setFrom(Number) */ public Number getFrom() { return from; } /** * The point where the break starts. */ public void setFrom(Number from) { this.from = from; } /** * @see #setRepeat(Number) */ public Number getRepeat() { return repeat; } /** * Defines an interval after which the break appears again. By default the * breaks do not repeat. *

* Defaults to: 0 */ public void setRepeat(Number repeat) { this.repeat = repeat; } /** * @see #setTo(Number) */ public Number getTo() { return to; } /** * The point where the break ends. */ public void setTo(Number to) { this.to = to; } /** * @deprecated as of 4.0. Use {@link #setPointStart(Instant)} */ @Deprecated public void setFrom(Date date) { this.from = Util.toHighchartsTS(date); } /** * @see #setFrom(Number) */ public void setFrom(Instant instant) { this.from = Util.toHighchartsTS(instant); } /** * @deprecated as of 4.0. Use {@link #setPointStart(Instant)} */ @Deprecated public void setTo(Date date) { this.to = Util.toHighchartsTS(date); } /** * @see #setTo(Number) */ public void setTo(Instant instant) { this.to = Util.toHighchartsTS(instant); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy