GraphSparklines Module
- class epyk.core.html.graph.GraphSparklines.Sparklines(page, data, title, width, height, options, profile)
- click(js_funcs, profile=False, source_event=None, on_ready=False)
When a user clicks on a sparkline, a sparklineClick event is generated.
The event object contains a property called “sparklines” that holds an array of the sparkline objects under the mouse at the time of the click. For non-composite sparklines, this array will have just one entry.
Related Pages:
- Parameters:
js_funcs – List | String. Required. Javascript functions.
profile – Boolean | Dictionary. Required. A flag to set the component performance storage.
source_event – String. Required. The source target for the event.
on_ready – Boolean. Required. Specify if the event needs to be trigger when the page is loaded.
- color(hex_value: str, background: Optional[str] = None)
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:
chart = page.ui.charts.sparkline("line", [1, 2, 3, 4, 5, 4, 3, 2, 1]) chart.color("#FFFF00")
- Parameters:
hex_value – hexadecimal color code
background –
- property dom: JsHtmlSparkline
Return all the Javascript functions defined for an HTML Component. Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- hover(js_funcs, profile=False, source_event=None)
When the mouse moves over a different value in a sparkline a sparklineRegionChange event is generated. This can be useful to hook in an alternate tooltip library.
Related Pages:
- Parameters:
js_funcs – List | String. Required. Javascript functions.
profile – Boolean | Dictionary. Required. A flag to set the component performance storage.
source_event – String. Required. The source target for the event.
- property options: OptionsSparkLine
Property to set all the possible object for a button.
- property style: ClassBSpartlines
Property to the sparkline style properties. This will group all the default CSS classes which are defined by default to a sparkline component.
- class epyk.core.html.graph.GraphSparklines.SparklinesBar(page, data, title, width, height, options, profile)
- class epyk.core.html.graph.GraphSparklines.SparklinesBoxPlot(page, data, title, width, height, options, profile)
- class epyk.core.html.graph.GraphSparklines.SparklinesBullet(page, data, title, width, height, options, profile)
- class epyk.core.html.graph.GraphSparklines.SparklinesDiscrete(page, data, title, width, height, options, profile)
- class epyk.core.html.graph.GraphSparklines.SparklinesPie(page, data, title, width, height, options, profile)
- class epyk.core.html.graph.GraphSparklines.SparklinesTristate(page, data, title, width, height, options, profile)