Interface ChartHandler

  • All Known Implementing Classes:
    DefaultAbstractCollectorChartHandler, DefaultLinearCollectorChartHandler

    public interface ChartHandler
    Generic interface to work with com.hybris.backoffice.widgets.collector.genericChart widget. Implementations of the interface can be easily plugged in to the widget to display different types of charts without the need to re-declare the widget.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ON_REFRESH_CHART
      Id of an even issued after refresh operation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void applyModel​(com.hybris.cockpitng.engine.WidgetInstanceManager wim, org.zkoss.chart.Charts charts)
      The method should be used to set the model for the chart.
      java.util.Collection<ChartInfoLabel> getDefaultInfoLabels​(org.zkoss.chart.Charts charts)
      The method should return a default set of labels to be displayed under the chart.
      java.util.Collection<ChartInfoLabel> getInfoLabels​(org.zkoss.chart.Charts charts, int pointIndex)
      The method should return a set of labels to be displayed under the chart for a selected point of the data series (if applicable).
      void initializeChart​(com.hybris.cockpitng.engine.WidgetInstanceManager wim, org.zkoss.chart.Charts charts)
      THe method should be used to initialize all visual settings of the chart.
    • Field Detail

      • ON_REFRESH_CHART

        static final java.lang.String ON_REFRESH_CHART
        Id of an even issued after refresh operation. After the event the widget should re-draw the chart.
        See Also:
        Constant Field Values
    • Method Detail

      • initializeChart

        void initializeChart​(com.hybris.cockpitng.engine.WidgetInstanceManager wim,
                             org.zkoss.chart.Charts charts)
        THe method should be used to initialize all visual settings of the chart.
        Parameters:
        wim - Widget instance manager
        charts - The Charts instance
        See Also:
        WidgetInstanceManager, Charts
      • applyModel

        void applyModel​(com.hybris.cockpitng.engine.WidgetInstanceManager wim,
                        org.zkoss.chart.Charts charts)
        The method should be used to set the model for the chart. It should be able to be called many times (for example when re-drawing is needed).
        Parameters:
        wim - Widget instance manager
        charts - The Charts instance
        See Also:
        WidgetInstanceManager, Charts
      • getDefaultInfoLabels

        java.util.Collection<ChartInfoLabel> getDefaultInfoLabels​(org.zkoss.chart.Charts charts)
        The method should return a default set of labels to be displayed under the chart.
        Parameters:
        charts - The Charts instance
        Returns:
        Collection of info-labels to be displayed under the chart.
        See Also:
        Charts
      • getInfoLabels

        java.util.Collection<ChartInfoLabel> getInfoLabels​(org.zkoss.chart.Charts charts,
                                                           int pointIndex)
        The method should return a set of labels to be displayed under the chart for a selected point of the data series (if applicable).
        Parameters:
        charts - The Charts instance
        pointIndex - The index of the point for which the information is required
        Returns:
        Collection of info-labels to be displayed under the chart.
        See Also:
        Charts