Skip to main content

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:
  • breakpointInfo (dict)
  • userId (int)

  • Returns:
  • breakpointId (int)
  • msg (string): error message, None if successful
  • Dictionary

    ParameterTypeRequiredNotes
    breakpointNamestringThe name of the breakpoint
    descriptionstringSome information about the breakpoint
    dashboardIdintThe id of the dashboard this breakpoint is for
    sizeintThe max screen size for this breakpoint. Use None if for desktops
    rowCountintThe number of rows for this breakpoint
    columnCountintThe number of columns for this breakpoint
    rowHeightintThe height in px for each cell. Use None if the cells should stretch
    rowGapintThe gap between the rows
    columnGapintThe 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