Renders a compact inline sparkline chart using the jQuery Sparklines library with live RPC polling.
SPARKLINE — set as ReportType in def_report.
def Render(self, Param1="", Param2="", Param3="") -> str:
Parameters are not used. Data is read from self.data_list on initial load and refreshed via RPC polling. Returns an HTML string containing a <span> mount point and a <script> block that calls RemoteProcedureCall on a timer and re-renders the sparkline on each response.
Options read from self._Options JSON:
| Key | Effect |
|---|---|
refresh |
Poll interval in milliseconds (default: 3000) |
width |
CSS width of the sparkline element |
height |
CSS height of the sparkline element |
line_color |
Stroke colour; supports palette tokens (default: $package_pallete_red$) |
fill_color |
Fill colour beneath the line (default: transparent) |
type |
Sparkline chart type passed to jQuery Sparklines (default: "line") |
Example:
{
"refresh": "1000",
"width": "80px",
"height": "80px",
"line_color": "$package_pallete_primary$",
"fill_color": "transparent"
}
jquery.min.js) and the jQuery Sparklines plugin (jquery.sparkline.min.js).RpcGetseries method executes self._Query (with patch_param token substitution) and returns a flat list of values via sql_get_list.document.visibilityState !== "visible".