D3 Interface
- class epyk.interfaces.graphs.CompChartsD3.D3(ui)
- bar(record=None, y_columns=None, x_axis=None, profile=None, width=(100, '%'), height=(330, 'px'), options=None, html_code=None)
TODO: Handle multiple series correctly.
Usage:
page.ui.charts.d3.bar(mocks.languages, y_columns=["rating"], x_axis="change")
Related Pages:
- Parameters:
record – Object. Optional. The chart input data to be serialised.
y_columns – List. Optional. The columns corresponding to keys in the dictionaries in the record.
x_axis – String. Optional. The column corresponding to a key in the dictionaries in the record.
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
options – Dictionary. Optional. Specific Python options available for this component.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
- cloud(data, width=(100, '%'), height=(330, 'px'), html_code=None, options=None, profile=None, excluded_words=None)
- Tags:
- Categories:
Usage:
Related Pages:
- Parameters:
data – Object. Optional. The chart input data to be serialised.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
options – Dictionary. Optional. Specific Python options available for this component.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
excluded_words – list of words to be excluded from the display.
- pie(record=None, y=None, x=None, profile=None, width=(100, '%'), height=(330, 'px'), options=None, html_code=None)
Related Pages:
TODO Add events
.on( “click”, function(d,i) { console.log(d) }).on( “mouseover”, function() {
d3.select(this).style(“fill”, “red”)
- }).on( “mouseout”, function() {
d3.select(this).style(“fill”, function(d,i) {options.colors[i]})
})
- Parameters:
record – Object. Optional. The chart input data to be serialised.
y – List. Optional. The columns corresponding to keys in the dictionaries in the record.
x – String. Optional. The column corresponding to a key in the dictionaries in the record.
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
options – Dictionary. Optional. Specific Python options available for this component.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
- scatter(record=None, y_columns=None, x_axis=None, profile=None, width=(100, '%'), height=(330, 'px'), options=None, html_code=None)
TODO: Handle multiple series correctly.
Usage:
page.ui.charts.d3.scatter(mocks.languages, y_columns=["rating"], x_axis="change")
Related Pages:
- Parameters:
record – Object. Optional. The chart input data to be serialised.
y_columns – List. Optional. The columns corresponding to keys in the dictionaries in the record.
x_axis – String. Optional. The column corresponding to a key in the dictionaries in the record.
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
options – Dictionary. Optional. Specific Python options available for this component.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
- script(name, scripts=None, data=None, d3_version=None, dependencies=None, profile=None, options=None, width=(400, 'px'), height=(330, 'px'), html_code=None)
- Tags:
- Categories:
Usage:
Related Pages:
Templates:
- Parameters:
name – String. The module name.
scripts – List. Optional. The list of scripts.
data – Object. Optional. The chart input data to be serialised.
d3_version – String. Optional. Required version for the underlying D3 package.
dependencies – List. Optional. The required dependency files.
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
options – Dictionary. Optional. Specific Python options available for this component.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).
- svg(profile=None, width=(100, '%'), height=(330, 'px'), options=None, html_code=None)
- Parameters:
profile – Boolean | Dictionary. Optional. A flag to set the component performance storage.
width – Tuple. Optional. A tuple with the integer for the component width and its unit.
height – Tuple. Optional. A tuple with the integer for the component height and its unit.
options – Dictionary. Optional. Specific Python options available for this component.
html_code – String. Optional. An identifier for this component (on both Python and Javascript side).