GraphNVD3 Module

class epyk.core.html.graph.GraphNVD3.Chart(page: PageModel, width, height, options, html_code, profile)
add_dataset(data, label: str, colors: Optional[list] = None, opacity: Optional[float] = None, kind: Optional[str] = None)
Parameters:
  • data – The list of points (float)

  • label – Optional. The series label (visible in the legend)

  • colors – Optional. The color for this series. Default the global definition

  • opacity – Optional. The opacity factory from 0 to 1

  • kind – Optional. THe series type. Default to the chart type if not supplied

add_trace(data, name: str = '')
Parameters:
  • data

  • name

build(data: 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, stop_state: bool = True, dataflows: List[dict] = None)

Return the JavaScript fragment to refresh the component content.

Parameters:
  • data – Optional. Component data

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

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

  • component_id – Optional. The object reference ID

  • dataflows – Chain of data transformations

Param stop_state:

property chartId: str

Return the Javascript variable of the chart.

click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = False, source_event: Optional[str] = None, on_ready: bool = False)

This function is not implemented.

Parameters:
  • js_funcs – Required. Javascript functions

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

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

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 to the underlying D3 module.

property data

Property to the last dataset added to the NVD3 chart. Use the function traces to get a specific series from the chart object.

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

Override the chart settings on the JavaScript side. This will allow ot set specific styles for some series or also add commons properties.

Usage:

chart.onReady([chart.define({“commons”: {“backgroundColor”: [“pink”], “label”: “Other series”}})])

Parameters:
  • options – JavaScript of Python attributes

  • dataflows – Chain of config transformations

labels(values: list)
Parameters:

values – The different values for the x axis

property options: OptionsChart

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: OptionsChartSharedNVD3

All the common properties shared between all the charts.

This will ensure a compatibility with the plot method.

Usage:

line = page.ui.charts.nvd3.bar()
line.shared.x_label("x axis")
traces(i: Optional[int] = None)

Get a specific series from the datasets attributes in the NVD3 chart.

Parameters:

i – Optional. An Index number

class epyk.core.html.graph.GraphNVD3.ChartArea(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3Area

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartBar(page: PageModel, width, height, options, html_code, profile)
add_dataset(data, label, colors=None, opacity=None, kind=None)
Parameters:
  • data – The list of points (float)

  • label – Optional. The series label (visible in the legend)

  • colors – Optional. The color for this series. Default the global definition

  • opacity – Optional. The opacity factory from 0 to 1

  • kind – Optional. THe series type. Default to the chart type if not supplied

click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = False, source_event: Optional[str] = None, on_ready: bool = False)

Add click event to the points in the chart.

Parameters:
  • js_funcs – Required. Javascript functions

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

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

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 dom: JsNvd3Bar

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartBoxPlot(page: PageModel, width, height, options, html_code, profile)
add_box(q1, q3=None, outliers=None, maxRegularValue=None, mean=None, median=None, minRegularValue=None, minOutlier=None, maxOutlier=None, title=None)

https://github.com/nvd3-community/nvd3/blob/gh-pages/examples/boxPlotCustomModel.html

Parameters:
  • q1

  • q3

  • outliers

  • maxRegularValue

  • mean

  • median

  • minRegularValue

  • minOutlier

  • maxOutlier

add_trace(data, name: str = '')
Parameters:
  • data

  • name

property dom: JsNvd3BoxPlot

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartCandlestick(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3CandlestickBar

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartCumulativeLine(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3CumulativeLine

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartFocusLine(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3LineWithFocus

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartForceDirected(page: PageModel, width, height, options, html_code, profile)
add_trace(data: dict, name: str = '')
Parameters:
  • data

  • name

property dom: JsNvd3ForceDirectedGraph

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartHistoBar(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3HistoricalBar

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartHorizontalBar(page: PageModel, width, height, options, html_code, profile)
add_dataset(data, label, colors=None, opacity=None, kind=None)
Parameters:
  • data – The list of points (float)

  • label – Optional. The series label (visible in the legend)

  • colors – Optional. The color for this series. Default the global definition

  • opacity – Optional. The opacity factory from 0 to 1

  • kind – Optional. THe series type. Default to the chart type if not supplied

property dom: JsNvd3MultiBarHorizontal

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartLine(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3Line

Interface to the Dom element of a NVD3 line chart.

class epyk.core.html.graph.GraphNVD3.ChartMultiBar(page: PageModel, width, height, options, html_code, profile)
add_dataset(data, label, colors=None, opacity=None, kind=None)
Parameters:
  • data – The list of points (float)

  • label – Optional. The series label (visible in the legend)

  • colors – Optional. The color for this series. Default the global definition

  • opacity – Optional. The opacity factory from 0 to 1

  • kind – Optional. THe series type. Default to the chart type if not supplied

colors(hex_values: list)

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 dom: JsNvd3MultiBar

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartOhlcBar(page: PageModel, width, height, options, html_code, profile)
property dom: JsNvd3OhlcBar

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartParallelCoord(page: PageModel, width, height, options, html_code, profile)
add_trace(data, name: str = '')
Parameters:
  • data

  • name

property dom: JsNvd3ParallelCoordinates

Interface to the Dom element of a NVd3 Scatter chart.

set_dimension_names(dimensions)
Parameters:

dimensions

class epyk.core.html.graph.GraphNVD3.ChartPie(page: PageModel, width, height, options, html_code, profile)
add_trace(data, name: str = '')
Parameters:
  • data

  • name

click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = False, source_event: Optional[str] = None, on_ready: bool = False)

Add click event to the points in the chart.

Parameters:
  • js_funcs – Required. Javascript functions

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

  • 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 dom: JsNvd3Pie

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartScatter(page: PageModel, width, height, options, html_code, profile)
click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = False, source_event: Optional[str] = None, on_ready: bool = False)

Add click event to the points in the chart.

Parameters:
  • js_funcs – Required. Javascript functions

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

  • 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 dom: JsNvd3Scatter

Interface to the Dom element of a NVd3 Scatter chart.

class epyk.core.html.graph.GraphNVD3.ChartSunbrust(page: PageModel, width, height, options, html_code, profile)
add_trace(data, name: str = '')
Parameters:
  • data

  • name – Optional.

property dom: JsNvd3Sunburst

Interface to the Dom element of a NVd3 Scatter chart.

set_rcolors(color: str, data)
Parameters:
  • color

  • data