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

org.bklab.flow.chartjs.ClickEvent Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.flow.chartjs;

import com.vaadin.flow.component.ComponentEvent;

/**
 * Represents dataset click event.
 * Holds information which dataset values was clicked.
 */
public class ClickEvent extends ComponentEvent {
    private String label;
    private String value;
    private String datasetLabel;

    public ClickEvent(ChartJs source, boolean fromClient, String label, String datasetLabel, String value) {
        super(source, fromClient);

        this.label = label;
        this.value = value;
        this.datasetLabel = datasetLabel;
    }

    /**
     * Corresponds to value on x axis of vertical chart.
     *
     * @return Corresponds to value on x axis of vertical chart.
     */
    public String getLabel() {
        return label;
    }

    /**
     * Corresponds to value on y axis of vertical chart.
     *
     * @return Corresponds to value on y axis of vertical chart.
     */
    public String getValue() {
        return value;
    }

    /**
     * Label the dataset, it;s value corresponds to values in the legend.
     *
     * @return Label the dataset, it;s value corresponds to values in the legend.
     */
    public String getDatasetLabel() {
        return datasetLabel;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy