GraphBillboard Module

class epyk.core.html.graph.GraphBillboard.Chart(page: PageModel, width, height, html_code, options, profile)
build(data: Union[str, JsDataModel, float, dict, list, bool] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None, component_id: str = None, stop_state: bool = True, dataflows: List[dict] = None) str

Build / Update the chart.

Parameters:
  • data – Optional. Dataset

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

  • component_id – Optional. The component reference (the htmlCode)

  • stop_state – Remove the top panel for the component state (error, loading…)

  • 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)

Add a click event on a chart.

Parameters:
  • js_funcs – A Javascript Python function

  • profile – 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.

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.

Parameters:

hex_values – An array of hexadecimal color codes.

property d3: D3Select

Property shortcut the D3 underlying base classes.

define(options: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None, dataflows: Optional[List[dict]] = None) str
Parameters:
  • options

  • dataflows – Chain of config transformations:

property dom: C3

Return all the Javascript functions defined for an HTML Component. Those functions will use plain javascript by default.

Returns:

A Javascript Dom object.

property js: Billboard

C3 reference API.

Related Pages:

Returns:

A Javascript object

property options: C3

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.

property shared: OptionsChartSharedC3

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")
class epyk.core.html.graph.GraphBillboard.ChartArea(page: PageModel, width, height, html_code, options, profile)
class epyk.core.html.graph.GraphBillboard.ChartBar(page: PageModel, width, height, html_code, options, profile)
class epyk.core.html.graph.GraphBillboard.ChartBubble(page: PageModel, width, height, html_code, options, profile)
class epyk.core.html.graph.GraphBillboard.ChartDonut(page: PageModel, width, height, html_code, options, profile)
class epyk.core.html.graph.GraphBillboard.ChartGauge(page: PageModel, width, height, html_code, options, profile)
add_dataset(value: list, name: str, kind: Optional[str] = None)
Parameters:
  • value – The series of numbers to be added to the chart

  • name – The series name

  • kind – Optional. The chart type

build(data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None, component_id: Optional[str] = None) str
Parameters:
  • data – Optional. The dataset to be added to the chart

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

  • component_id – Optional. The component reference (the htmlCode)

class epyk.core.html.graph.GraphBillboard.ChartLine(page: PageModel, width, height, html_code, options, profile)
add_dataset(data: list, name: str, kind: Optional[str] = None) OptionsData

Add a dataset to the chart.

Parameters:
  • data – The dataset to be added to the chart

  • name – The name (alias) of the dataset

  • kind – Optional. The type of chart

labels(labels: list, series_id: str = 'x')

Set the series labels.

Parameters:
  • labels – List of labels

  • series_id – The series key

class epyk.core.html.graph.GraphBillboard.ChartPie(page: PageModel, width, height, html_code, options, profile)
add_dataset(values: list, name: str, kind: Optional[str] = None)

Add a dataset to a pie chart. If multiple datasets are added the value will be summed up in the resulting pue chart.

Parameters:
  • values – The series of numbers to be added to the chart

  • name – The series name

  • kind – Optional. The chart type

labels(labels: list, series_id: str = 'x')
Parameters:
  • labels

  • series_id – Optional.

class epyk.core.html.graph.GraphBillboard.ChartRadar(page: PageModel, width, height, html_code, options, profile)
class epyk.core.html.graph.GraphBillboard.ChartScatter(page: PageModel, width, height, html_code, options, profile)
labels(labels: list, series_id: str = 'x')
Parameters:
  • labels

  • series_id – Optional. The series ID.

class epyk.core.html.graph.GraphBillboard.ChartSpline(page: PageModel, width, height, html_code, options, profile)