OptChartRoughViz Module
- class epyk.core.html.options.OptChartRoughViz.OptionData(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property labels
Id or class of container element.
Related Pages:
- property values
Id or class of container element.
Related Pages:
- class epyk.core.html.options.OptChartRoughViz.OptionDataXY(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- add(name, values)
Add the key and value to the final result object.
- Parameters:
name – The key in the final data dictionary.
value – The value in the final data dictionary.
- property labels
Id or class of container element.
Related Pages:
- property x
Id or class of container element.
Related Pages:
- property y
Id or class of container element.
Related Pages:
- property y1
Id or class of container element.
Related Pages:
- class epyk.core.html.options.Options(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property builder
Add a JavaScript Builder function to the options.
This will be used to automatically map the Python component to its corresponding JavaScript builder function used by the build method.
Usage:
but = page.ui.button() but.options.builder = "Button"
- Prop value:
The JavaScript builder function name.
- property config_default
The default value for the configuration in case of template.
Default value is an empty string.
Usage:
component.options.config_default = {"value": "test"}
- config_html()
Return the HTML options used by the python and passed to the HTML.
Those options will not be available in the JavaScript layer and they are only defined either to build the HTML from Python or to set some HTML properties.
The returned dictionary is a copy so it can be changed or used in other processes. To change the internal component property, the options property should be used.
- config_js(attrs: Optional[dict] = None)
Return the JavaScript options used by the builders functions.
Builder functions can be defined in the framework or external from the various packages.
The returned dictionary is a copy so it can be changed or used in other processes. To change the internal component property, the options property should be used.
- Parameters:
attrs – Optional. The extra or overridden options
- custom_config(name: str, value: Any, js_type: bool = False)
Add a custom JavaScript configuration.
Usage:
chart = page.ui.charts.apex.scatter() chart.options.chart.zoom.custom_config("test", False)
- Parameters:
name – The key to be added to the attributes
value – String or JString. The value of the defined attributes
js_type – Optional. Specify if the parameter is a JavaScript fragment
- details()
Retrieve the defined properties details.
This function will return a dictionary with all the component attributes (required and optional) ones. It will provide the full available description of those components.
Usage:
but = page.ui.button() pprint.pprint(but.options.details(), indent=4)
- from_json(vals: dict, schema: Optional[dict] = None)
Load the option schema for a component from a json string.
TODO: add more feature to handle functions and enumeration
- Parameters:
vals – The input schema
schema – The full object schema
- has_attribute(cls_obj, name: Optional[str] = None)
Add an extra sub layer to the data structure.
The key in the object representation will be the function name.
- Parameters:
cls_obj – Class. The sub data class used in the structure definition
name – The sub attribute name
- isJsContent(property_name: str)
Check if the content of a property is defined to always be a JavaScript fragment.
Thus the framework will not convert it to a Json content.
Usage:
div = page.ui.div() print(div.options.isJsContent("inline"))
- Parameters:
property_name – The property name
- property managed
Boolean flag to set if the component needs to be added to the page.
If set to False the component has to be managed manually in the page.
Usage:
but = page.ui.button() but.options.managed = False
- Prop bool:
Flag to specify if this component is automatically managed by the page
- optional()
Return all options not added to the HTML component by default.
Those are options which will impact either the Python or the JavaScript builders.
To get the full definition of options the details method should be used.
Usage:
but = page.ui.button() pprint.pprint(but.options.optional(), indent=4)
- property profile
Boolean flag to set if extra logs need to be displayed.
This could help in debugging, default is the page verbose flag (default is false).
Usage:
but = page.ui.button() but.options.verbose = True
- Prop flag:
Flag to display / hide warning logs generated by the framework.
- required()
Return all the mandatory / required options with the default values.
Those options are added by the framework to provide a default for the HTML components but they can be changed.
System options are also added to this category as they are always available in any HTML components.
To get the full definition of options the details method should be used.
Usage:
but = page.ui.button() pprint.pprint(but.options.required(), indent=4)
- set_attrs(vals: dict)
Set the object internal attributes.
- Parameters:
vals – All the attributes to be added to the component
- property style
Change some CSS attributes to the internal HTML component.
Related Pages:
- Prop values:
The CSS attributes.
- update_config(attrs: dict)
Update the option configuration.
- Parameters:
attrs – The attributes to set
- property verbose
Boolean flag to set if extra logs need to be displayed.
This could help in debugging, default is the page verbose flag (default is false).
Usage:
but = page.ui.button() but.options.verbose = True
- Prop flag:
Boolean. Flag to display / hide warning logs generated by the framework.
- Parameters:
js_funcs –
profile –
- Parameters:
symbol –
digit –
thousand_sep –
decimal_sep –
fmt –
factor –
alias –
- Parameters:
factor –
alias –
digits –
thousand_sep –
Set the label of the x axis.
Not yet available.
Related Pages:
- Parameters:
value – String. The axis label.
- Parameters:
num –
- Parameters:
js_funcs –
profile –
- Parameters:
symbol –
digit –
thousand_sep –
decimal_sep –
fmt –
factor –
alias –
- Parameters:
factor –
alias –
digits –
thousand_sep –
Set the label of the y axis.
Not yet available.
Related Pages:
- Parameters:
value – String. The axis label.
- Parameters:
num –
- class epyk.core.html.options.OptChartRoughViz.RoughVizBar(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property axisFontSize
‘1rem’.
Related Pages:
- Type:
Font-size for axes’ labels. Default
- property axisRoughness
0.5
Related Pages:
- Type:
Roughness for x & y axes. Default
- property color
Chart title. Optional.
Related Pages:
- property data
return:
- property element
Id or class of container element.
Related Pages:
- property fillWeight
0.5
Related Pages:
- Type:
Weight of inner paths’ color. Default
- property font
Font-family to use. You can use 0 or gaegu to use Gaegu, or 1 or indie flower to use Indie Flower.
Related Pages:
- property height
Chart title. Optional.
Related Pages:
- property highlight
‘coral’.
Related Pages:
- Type:
FColor for each bar on hover. Default
- property innerStrokeWidth
Related Pages:
- Type:
Stroke-width for paths inside bars. Default
- property interactive
true..
Related Pages:
- Type:
Whether or not chart is interactive. Default
- property labelFontSize
‘1rem’.
Related Pages:
- Type:
Font-size for axes’ labels. Default
- property margin
50, right: 20, bottom: 70, left: 100}.
Related Pages:
- Type:
Margin object. Default
- Type:
{top
- property padding
0.1.
Related Pages:
- Type:
Padding between bars. Default
- property roughness
Related Pages:
- Type:
Roughness level of chart. Default
- property simplification
Chart simplification. Default 0.2.
Related Pages:
- property stroke
Chart title. Optional.
Related Pages:
- property strokeWidth
Chart title. Optional.
Related Pages:
- property title
Chart title. Optional.
Related Pages:
- property titleFontSize
‘1rem’.
Related Pages:
- Type:
Font-size for chart title. Default
- property tooltipFontSize
‘0.95rem’.
Related Pages:
- Type:
Font-size for tooltip. Default
- property width
Chart title. Optional.
Related Pages:
- property xLabel
Label for x-axis.
Related Pages:
- property yLabel
Label for y-axis.
Related Pages:
- class epyk.core.html.options.OptChartRoughViz.RoughVizLine(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property circle
true.
Related Pages:
- Type:
Whether or not to add circles to chart. Default
- property circleRadius
Related Pages:
- Type:
Radius of circles. Default
- property circleRoughness
Related Pages:
- Type:
Roughness of circles. Default
- property colors
Array of colors for each arc.
Related Pages:
- property data
- class epyk.core.html.options.OptChartRoughViz.RoughVizPie(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property colors
Array of colors for each arc.
Related Pages:
- property fillStyle
Bar fill-style. Should be one of fillStyles shown above.
Related Pages:
- property legend
‘true.
Related Pages:
- Type:
Whether or not to add legend. Default
- class epyk.core.html.options.OptChartRoughViz.RoughVizScatter(component: HtmlModel, attrs: Optional[dict] = None, options: Optional[dict] = None, js_tree: Optional[dict] = None, page: Optional[PageModel] = None)
- property colorVar
Array of colors for each arc.
Related Pages:
- property colors
Array of colors for each arc.
Related Pages:
- property data
return:
- property highlightLabel
If input data is csv or tsv, this should be a column representing what value to display on hover. Otherwise, (x, y) values will be shown on hover.
Related Pages:
- property radius
.
Related Pages:
- Type:
Circle radius. Default