GraphPlotly Module
- class epyk.core.html.graph.GraphPlotly.Bar(page, width, height, options, html_code, profile)
- add_trace(data, type='bar', mode=None)
- Parameters:
data –
type –
mode –
- property layout: LayoutBar
- class epyk.core.html.graph.GraphPlotly.Box(page, width, height, options, html_code, profile)
- add_trace(data, type='box', mode=None)
- Parameters:
data –
type –
mode –
- class epyk.core.html.graph.GraphPlotly.CandleStick(page, width, height, options, html_code, profile)
- add_trace(data, type='candlestick', mode=None)
- Parameters:
data –
type –
mode –
- class epyk.core.html.graph.GraphPlotly.Chart(page, width, height, options, html_code, profile)
- add_trace(data, type=None, mode=None)
- Parameters:
data –
type –
mode –
- build(data=None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None, component_id: Optional[str] = None, dataflows: Optional[List[dict]] = None)
- Parameters:
data –
options –
profile –
component_id –
dataflows – Chain of data transformations
- property chartId: str
Return the Javascript variable of the chart.
- click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
The onclick event occurs when the user clicks on an element.
Related Pages:
- Parameters:
js_funcs – A Javascript Python function
profile – Optional. Set to true to get the profile for the function on the Javascript console
source_event – Optional. The source target for the event
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- click_legend(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None)
Related Pages:
- Parameters:
js_funcs – Javascript functions
profile – Optional. A flag to set the component performance storage
- colors(hex_values: List[str])
Set the colors of the chart.
hex_values can be a list of string with the colors or a list of tuple to also set the bg colors. If the background colors are not specified they will be deduced from the colors list changing the opacity.
Usage:
:param hex_values: An array of hexadecimal color codes.
- property data: DataChart
- dblclick(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
The onDblclick event occurs when the user double clicks on an element.
Related Pages:
- Parameters:
js_funcs – A Javascript Python function
profile – Optional. Set to true to get the profile for the function on the Javascript console
source_event – Optional. The source target for the event
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- hover(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Related Pages:
- Parameters:
js_funcs – A Javascript Python function
profile – Optional. Set to true to get the profile for the function on the Javascript console
source_event – Optional. The source target for the event
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property js: JsPlotly
Javascript base function.
Return all the Javascript functions defined in the framework. This is an entry point to the full Javascript ecosystem.
- Returns:
A Javascript object
- property layout: Layout
- property options: OptionConfig
Property to the component options. Options can either impact the Python side or the Javascript builder.
Python can pass some options to the JavaScript layer.
All the common properties shared between all the charts. This will ensure a compatibility with the plot method.
Usage:
line = page.ui.charts.bb.bar() line.shared.x_label("x axis")
- unhover(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Related Pages:
- Parameters:
js_funcs – A Javascript Python function
profile – Optional. Set to true to get the profile for the function on the Javascript console
source_event – Optional. The source target for the event
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- class epyk.core.data.DataClass.DataClass(component: Optional[HtmlModel] = None, attrs: Optional[dict] = None, options: Optional[dict] = None, page: Optional[PageModel] = None)
- add(name: str, value: Any)
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.
- attr(name: str, value: Any)
Add an attribute to the Javascript underlying dictionary.
- Parameters:
name – The attribute name
value – The attribute value
- Returns:
“Self” to allow the chains on the Python side
- attrs()
- config_attrs(options: Optional[dict] = None) str
Get the attributes in a string.
- Parameters:
options – Dictionary with specific attributes to be set
- custom(name: str, value: Any)
Custom function to add a bespoke attribute to a class.
This entry point will not be able to display any documentation but it is a shortcut to test new features. If the value is a Javascript object, the PyJs object must be used.
- Parameters:
name – The key to be added to the attributes
value – The value of the defined attributes
- Returns:
The DataAttrs to allow the chains
- get(dfl: Optional[Union[str, bool, int, dict, list, float]] = None, name: Optional[str] = None)
Get the attribute to the underlying attributes dictionary.
- Parameters:
dfl – Optional. The default value of this attribute
name – Optional. The attribute name. default the name of the function
- has_attribute(cls_obj)
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
- set(value: Any, name: Optional[str] = None)
Add an attribute to the Javascript underlying dictionary.
- Parameters:
value – The attribute value
name – Optional. The attribute name. default the name of the functin.
- Returns:
“Self” to allow the chains on the Python side
- sub_data(name: str, cls_obj)
Add an extra sub layer to the data structure. The key in the object representation will be the function name.
Should use has_attribute is the name can be deduced from the parent function.
- Parameters:
name – The key to be added to the internal data dictionary
cls_obj – Class. Object. The object which will be added to the nested data structure
- sub_data_enum(name: str, cls_obj)
Add key to a sub dictionary. This will create an attribute object with a nested structure.
- Parameters:
name – The key to be added to the internal data dictionary
cls_obj – Class. Object. The object which will be added to the nested data structure
- update(vals: dict)
Update the object internal attributes.
- Parameters:
vals – All the attributes to be added to the component
- class epyk.core.html.graph.GraphPlotly.Indicator(page, width, height, options, html_code, profile)
- add_trace(data, type='indicator', mode=None)
- Parameters:
data –
type –
mode –
- class epyk.core.html.graph.GraphPlotly.Line(page, width, height, options, html_code, profile)
- add_trace(data: Union[str, JsDataModel, float, dict, list, bool], type: Optional[str] = None, mode: str = 'lines+markers')
- Parameters:
data –
type –
mode –
- trace(data: Union[str, JsDataModel, float, dict, list, bool], type: Optional[str] = None, mode: str = 'lines+markers')
- Parameters:
data –
type –
mode –
- class epyk.core.html.graph.GraphPlotly.Mesh3d(page, width, height, options, html_code, profile)
- add_trace(data, type='mesh3d', mode=None)
- Parameters:
data –
type –
mode –
- property data
- class epyk.core.html.graph.GraphPlotly.Pie(page, width, height, options, html_code, profile)
- add_trace(data, type='pie', mode=None)
- Parameters:
data –
type –
mode –
- property chart: Pie
JsPlotly.Pie
- Type:
rtype
- property data: DataPie
- class epyk.core.html.graph.GraphPlotly.Scatter3D(page, width, height, options, html_code, profile)
- add_trace(data, type='scatter3d', mode='lines')
- Parameters:
data –
type –
mode –
- property chart: Pie
JsPlotly.Pie
- Type:
rtype
- property data
- property layout: Layout3D