system.kanoa.dashboard.addBreakpoint
Description
Adds a new breakpoint to a dashboard. Breakpoints provide a way of changing the layout of a dashboard based on screen resolution and aspect ratio.Syntax
addBreakpoint(breakpointInfo, userId)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
breakpointName | string | The name of the breakpoint | |
description | string | Some information about the breakpoint | |
dashboardId | int | The id of the dashboard this breakpoint is for | |
size | int | The max screen size for this breakpoint. Use None if for desktops | |
rowCount | int | The number of rows for this breakpoint | |
columnCount | int | The number of columns for this breakpoint | |
rowHeight | int | The height in px for each cell. Use None if the cells should stretch | |
rowGap | int | The gap between the rows | |
columnGap | int | The gap between the columns |
Code Examples
# Example usage
userId = 123
breakpointId = system.kanoa.dashboard.addBreakpoint(breakpointInfo, userId)
print(breakpointId) # Print the newly created breakpoint ID