Interface IOptionBuilder

    • Method Detail

      • getChartBaseResourceKey

        String getChartBaseResourceKey()
        Helper function to build resource base key for a chart and it's id according to a convention. This should be used as left part for all keys for i18n of charts. Takes the chart id from the chart field.
        Returns:
        Base key with trailing dot, eg. "Chart.myChart." if param is "myChart".
      • getChartLabelResourceModel

        IModel<String> getChartLabelResourceModel​(String subKey)
        Generate a wrapped ResourceModel for the Chart component.
        Parameters:
        subKey - Subkey as suffix of getChartBaseResourceKey().
        Returns:
        ResourceModel for the complete key. There is no default defined, so missing properties can be easyly detected.
      • title

        IOptionBuilder title​(String title)
        Add a title of the chart direct from String. Convenient function to wrap String in a model.
        Parameters:
        title - Text of title.
        Returns:
        IOptionbuilder for fluent api.
      • title

        IOptionBuilder title​(IModel<String> titleModel)
        Give the model for the title of the chart.
        Parameters:
        titleModel - Model for title.
        Returns:
        IOptionbuilder for fluent api.
      • subTitle

        IOptionBuilder subTitle​(String subTitle)
        Add a subTitle of the chart direct from String. Convenient function to wrap String in a model.
        Parameters:
        subTitle - Text of subTitle.
        Returns:
        IOptionbuilder for fluent api.
      • subTitle

        IOptionBuilder subTitle​(IModel<String> subTitleModel)
        Give the model for the subTitle of the chart.
        Parameters:
        subTitleModel - Model for subTitle.
        Returns:
        IOptionbuilder for fluent api.
      • axis

        IOptionBuilder axis​(String name,
                            String title)
        Add a axis title direct from String. Convenient function to wrap String in a model.
        Parameters:
        name - Uniq name for the axis.
        title - Text of title.
        Returns:
        IOptionbuilder for fluent api.
      • axis

        IOptionBuilder axis​(String name,
                            IModel<String> titleModel)
        Add a axis, give the model for the title of the axis.
        Parameters:
        name - Uniq name for the axis.
        titleModel - Model for title.
        Returns:
        IOptionbuilder for fluent api.
      • modifyAxis

        IOptionBuilder modifyAxis​(String name,
                                  OptionModifier axisModifier)
        Add a modifier to configure options for the axis.
        Parameters:
        name - Name to refer to an axis.
        axisModifier - Modifier to handle axis options.
        Returns:
        IOptionbuilder for fluent api.
      • mapSeries

        IOptionBuilder mapSeries​(String axisName)
        Map a serie to an axis by the axisname.
        Parameters:
        axisName - Name of a previous defined axis.
        Returns:
        IOptionbuilder for fluent api.
      • mapSeries

        IOptionBuilder mapSeries​(String axisName,
                                 OptionModifier seriesModifier)
        Map a serie to an axis by the axisname. Aply a modifier to the options of this series.
        Parameters:
        axisName - Name of a previous defined axis.
        seriesModifier - Modifierer for the opts of this series.
        Returns:
        IOptionbuilder for fluent api.
      • build

        ChartOptions build()
        Return the ChartOptions defined by previous fluent calls.
        Returns:
        ChartOptions as defined.