Skip to main content

system.kanoa.dashboard.addBreakpoint

This function is part of the kanoaCore module

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)
      - 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
      userId (int)
  • Returns
      breakpointId (int)
      msg (string): error message, None if successful
  • Code Examples

    # Example usage
    userId = 123
    breakpointId = system.kanoa.dashboard.addBreakpoint(breakpointInfo, userId)
    print(breakpointId) # Print the newly created breakpoint ID