Class SankeyChart

  • All Implemented Interfaces:
    HasAxes, IsChart, IsDatasetCreator<SankeyDataset>

    public final class SankeyChart
    extends AbstractChart
    implements IsDatasetCreator<SankeyDataset>
    Sankey charts are a type of flow diagram in which the width of the arrows is proportional to the flow rate.
    Sankey diagrams emphasize the major transfers or flows within a system.
    They help locate the most important contributions to a flow.
    They often show conserved quantities within defined system boundaries.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • SankeyChart

        public SankeyChart()
        Builds the object.
    • Method Detail

      • getOptions

        public SankeyOptions getOptions()
        Description copied from interface: IsChart
        Returns the options of chart.
        Specified by:
        getOptions in interface IsChart
        Returns:
        the options of chart.
      • newDataset

        public SankeyDataset newDataset​(boolean hidden)
        Description copied from interface: IsDatasetCreator
        Creates a new dataset related to chart type.
        Specified by:
        newDataset in interface IsDatasetCreator<SankeyDataset>
        Parameters:
        hidden - if true, it will be initially hidden.
        Returns:
        a new dataset related to chart type.
      • applyConfiguration

        protected final void applyConfiguration()
        Description copied from class: AbstractChart
        Called before any drawing or reconfiguration in order that the chart which implements it can override options
        Overrides:
        applyConfiguration in class AbstractChart
      • getMaximumDatasetsCount

        protected int getMaximumDatasetsCount()
        Description copied from class: AbstractChart
        Returns the maximum amount of datasets that the chart can manage.
        Overrides:
        getMaximumDatasetsCount in class AbstractChart
        Returns:
        the maximum amount of datasets that the chart can manage.
      • checkDataset

        protected boolean checkDataset​(Dataset dataset)
        Description copied from class: AbstractChart
        Returns true if the dataset can be managed by a this chart type.
        Specified by:
        checkDataset in class AbstractChart
        Parameters:
        dataset - dataset to check
        Returns:
        true if the dataset can be managed by a this chart type
      • checkAxis

        public boolean checkAxis​(Axis axis)
        Description copied from interface: HasAxes
        Returns true if the axis can be managed by a this chart type.
        Specified by:
        checkAxis in interface HasAxes
        Parameters:
        axis - axis to check
        Returns:
        true if the axis can be managed by a this chart type
      • getMaximumAxesCount

        protected final int getMaximumAxesCount()
        Description copied from class: AbstractChart
        Returns the maximum amount of axes that the chart can manage.
        Overrides:
        getMaximumAxesCount in class AbstractChart
        Returns:
        the maximum amount of axes that the chart can manage.
      • register

        public static void register()
        Registers the SANKEY controller in CHART.JS.