The ParameterArray is used for the parameterisation of the figures, histograms, selection, weights and the graphic properties on the client.
The declarative programming used in bokehDrawSA is a type of coding where developers express the computational logic without having to programme the control flow of each process. This can help simplify coding, as developers only need to describe what they want the programme to achieve, rather than explicitly prescribing the steps or commands required to achieve the desired result.
bokehDrawSA.fromArray(df, None, figureArray, widgetParams, layout=figureLayoutDesc, tooltips=tooltips, parameterArray=parameterArray,
widgetLayout=widgetLayoutDesc, sizing_mode="scale_width", nPointRender=300,
aliasArray=aliasArray, histogramArray=histoArray,arrayCompression=arrayCompression)For example usage see also Jupyter notebook tutorial file:
Bokeh parameters are declared in parameterArray. The widgets that contain parameters must be added to the widget array and the widget layout. To simplify the creation and use of the parameter array, a dictionary of predefined parameters has been created.
[name,value,options]
- name - the name with which it is indexed in figureArray / aliasArray.
- value - the initial value - the option "default" must be specified, otherwise it will be initialised with the first value in the option list
- {options} - the options that the parameter can have as a value.
Options:
- range - special option if controlled by a slider, the range that the variable can occupy.
- options - options for select e.g list of variables to draw
- parameters of figure array
- varX, varY, varZ
- paramters for histograms:
- axis variables
- nBins
- ranges
- parametrizible functions in aliasArray
- Graphics parameters:
- marker size
- legend options - in this example we set the legend font size
- functions in aliasArray
-
Figure options could be parameterized on client. Following parameters to be provided:
- parameterArray, widgets, widgetLayout, figureOptions ...
-
The naming convention is following naming in the bokehDraw:
- parameterArray - array of parameters to be added to the parameterArray
- widgets - array of widgets controlling parameters to be added to wifgets
- widgetLayout - array of widgets ID to be added to the widget
- figureOptions - map of the options to be added to the figureArray
-
Example predefined parameters for the legend layout parameterization:
-
Example predefined parameters for statistic parameterization
-
Example predefined parameters for the markers
- Parameterisation of the graphic and user-parameterisable function, and user-defined Javascript function.
- Defining parameter array
- create custom user defined function
CustomFuncas text - define dynamic cut variable
C<C_cut - define mutliplicative factor for alias function
paramX
- create custom user defined function
- Adding control widgets for parameters into widget array
- Using parameters in the client functions/aliases
- Definition of histogram parameters in parameterArray
- Usage in the histogramArray
- Adding parameters to widgets: