> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qall.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Chart



## OpenAPI

````yaml /openapi.json patch /api/analytics/charts/{chart_id}
openapi: 3.1.0
info:
  description: >-
    Build and run voice assistants: configure an assistant, give it tools,
    knowledge and playbooks, place and read calls, and manage contacts,
    campaigns and analytics.


    Authenticate every request with an API key as a bearer token. See the API
    introduction for the response envelope, pagination and error shapes.
  title: Qall API
  version: 0.1.0
servers:
  - description: Production
    url: https://qall.io
security: []
paths:
  /api/analytics/charts/{chart_id}:
    patch:
      tags:
        - analytics
      summary: Update Chart
      operationId: update_chart_api_analytics_charts__chart_id__patch
      parameters:
        - in: path
          name: chart_id
          required: true
          schema:
            title: Chart Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChartRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateChartRequest:
      properties:
        chart_type:
          anyOf:
            - enum:
                - column
                - bar
                - line
                - area
                - donut
                - number
                - table
              type: string
            - type: 'null'
          title: Chart Type
        config:
          anyOf:
            - $ref: '#/components/schemas/ChartConfig'
            - type: 'null'
        display:
          anyOf:
            - $ref: '#/components/schemas/ChartDisplay'
            - type: 'null'
        grid_h:
          anyOf:
            - type: integer
            - type: 'null'
          title: Grid H
        grid_w:
          anyOf:
            - type: integer
            - type: 'null'
          title: Grid W
        grid_x:
          anyOf:
            - type: integer
            - type: 'null'
          title: Grid X
        grid_y:
          anyOf:
            - type: integer
            - type: 'null'
          title: Grid Y
        name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Name
        size:
          anyOf:
            - enum:
                - small
                - medium
                - large
              type: string
            - type: 'null'
          title: Size
      title: UpdateChartRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ChartConfig:
      properties:
        compare_previous_period:
          default: false
          title: Compare Previous Period
          type: boolean
        date_range:
          anyOf:
            - enum:
                - 1h
                - 24h
                - 7d
                - 30d
                - 90d
                - 12m
                - all
              type: string
            - $ref: '#/components/schemas/CustomDateRange'
          default: 30d
          title: Date Range
        granularity:
          anyOf:
            - enum:
                - hour
                - day
                - week
                - month
              type: string
            - type: 'null'
          title: Granularity
        group_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Group By
        limit:
          default: 50
          maximum: 500
          minimum: 1
          title: Limit
          type: integer
        queries:
          items:
            $ref: '#/components/schemas/QueryDef'
          maxItems: 5
          minItems: 1
          title: Queries
          type: array
        sort:
          anyOf:
            - $ref: '#/components/schemas/SortConfig'
            - type: 'null'
      required:
        - queries
      title: ChartConfig
      type: object
    ChartDisplay:
      properties:
        colors:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Colors
        curve:
          default: smooth
          enum:
            - smooth
            - straight
            - stepline
          title: Curve
          type: string
        decimal_places:
          default: 2
          title: Decimal Places
          type: integer
        label_format:
          default: number
          enum:
            - number
            - currency
            - percent
            - duration
          title: Label Format
          type: string
        prefix:
          default: ''
          title: Prefix
          type: string
        show_grid:
          default: true
          title: Show Grid
          type: boolean
        show_legend:
          default: true
          title: Show Legend
          type: boolean
        stacked:
          default: false
          title: Stacked
          type: boolean
        suffix:
          default: ''
          title: Suffix
          type: string
        trend_sentence:
          anyOf:
            - type: string
            - type: 'null'
          title: Trend Sentence
      title: ChartDisplay
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    CustomDateRange:
      properties:
        from:
          title: From
          type: string
        to:
          title: To
          type: string
      required:
        - from
        - to
      title: CustomDateRange
      type: object
    QueryDef:
      properties:
        column:
          title: Column
          type: string
        filters:
          items:
            $ref: '#/components/schemas/QueryFilter'
          title: Filters
          type: array
        id:
          default: A
          maxLength: 5
          title: Id
          type: string
        operation:
          title: Operation
          type: string
        table:
          title: Table
          type: string
      required:
        - table
        - column
        - operation
      title: QueryDef
      type: object
    SortConfig:
      properties:
        by:
          default: value
          enum:
            - value
            - label
          title: By
          type: string
        direction:
          default: desc
          enum:
            - asc
            - desc
          title: Direction
          type: string
      title: SortConfig
      type: object
    QueryFilter:
      properties:
        column:
          title: Column
          type: string
        operator:
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - in
            - not_in
            - is_null
            - is_not_null
          title: Operator
          type: string
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
        values:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Values
      required:
        - column
        - operator
      title: QueryFilter
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.