--- description: A reference for the JSON panel schema used with Observability as Code. keywords: - configuration - as code - as-code - dashboards - git integration - git sync - github - panels labels: products: - cloud - enterprise - oss menuTitle: PanelKind schema title: PanelKind weight: 200 --- # `PanelKind` The panel element contains all the information about the panel including the visualization type, panel and visualization configuration, queries, and transformations. There's a panel element for each panel contained in the dashboard. Following is the default panel element JSON: ```json "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": {...}, "description": "", "id": 0, "links": [], "title": "", "vizConfig": { "kind": "", "spec": {...}, } } ``` The `PanelKind` consists of: - kind: "Panel" - spec: [PanelSpec](#panelspec) ## `PanelSpec` The following table explains the usage of the panel element JSON fields: | Name | Usage | | ------------ | --------------------------------------------------------------------- | | data | `QueryGroupKind`, which includes queries and transformations. Consists of: | | description | The panel description. | | id | The panel ID. | | links | Links with references to other dashboards or external websites. | | title | The panel title. | | vizConfig | `VizConfigKind`. Includes visualization type, field configuration options, and all other visualization options. Consists of: | | transparent? | bool. Controls whether or not the panel background is transparent. | ### `QueryGroupSpec` | Name | Usage | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | queries | `PanelQueryKind`. Consists of: | | transformations | `TransformationKind`. Consists of: | | queryOptions | [`QueryOptionsSpec`](#queryoptionsspec) | #### `PanelQuerySpec` | Name | Usage | | ----------- | --------------------------------- | | query | [`DataQueryKind`](#dataquerykind) | | datasource? | [`DataSourceRef`](#datasourceref) | ##### `DataQueryKind` | Name | Type | | ---- | ------ | | kind | string | | spec | string | ##### `DataSourceRef` | Name | Usage | | ----- | ---------------------------------- | | type? | string. The plugin type-id. | | uid? | The specific data source instance. | #### `DataTransformerConfig` Transformations allow you to manipulate data returned by a query before the system applies a visualization. Using transformations you can: rename fields, join time series data, perform mathematical operations across queries, or use the output of one transformation as the input to another transformation. | Name | Usage | | --------- | ------------------------------------------- | | id | string. Unique identifier of transformer. | | disabled? | bool. Disabled transformations are skipped. | | filter? | [`MatcherConfig`](#matcherconfig). Optional frame matcher. When missing it will be applied to all results. | | topic? | `DataTopic`. Where to pull `DataFrames` from as input to transformation. Options are: `series`, `annotations`, and `alertStates`. | | options | Options to be passed to the transformer. Valid options depend on the transformer id. | ##### `MatcherConfig` Matcher is a predicate configuration. Based on the configuration a set of field or values, it's filtered to apply an override or transformation. It comes with in id (to resolve implementation from registry) and a configuration that’s specific to a particular matcher type. | Name | Usage | | -------- | -------------------------------------------------------------------------------------- | | id | string. The matcher id. This is used to find the matcher implementation from registry. | | options? | The matcher options. This is specific to the matcher implementation. | #### `QueryOptionsSpec` | Name | Type | | ----------------- | ------- | | timeFrom? | string | | maxDataPoints? | integer | | timeShift? | string | | queryCachingTTL? | integer | | interval? | string | | cacheTimeout? | string | | hideTimeOverride? | bool | ### `VizConfigSpec` | Name | Type/Definition | | ------------- | --------------------------------------- | | pluginVersion | string | | options | string | | fieldConfig | [FieldConfigSource](#fieldconfigsource) | #### `FieldConfigSource` The data model used in Grafana, namely the _data frame_, is a columnar-oriented table structure that unifies both time series and table query results. Each column within this structure is called a field. A field can represent a single time series or table column. Field options allow you to change how the data is displayed in your visualizations. | Name | Type/Definition | | ---------- | ------------------------------------- | | defaults | [`FieldConfig`](#fieldconfig). Defaults are the options applied to all fields. | | overrides | The options applied to specific fields overriding the defaults. | | matcher | [`MatcherConfig`](#matcherconfig). Optional frame matcher. When missing it will be applied to all results. | | properties | `DynamicConfigValue`. Consists of: | ##### `FieldConfig` | Name | Type/Definition | | ------------------ | --------------------------------------- | | displayName? | string. The display value for this field. This supports template variables where empty is auto. | | displayNameFromDS? | string. This can be used by data sources that return an explicit naming structure for values and labels. When this property is configured, this value is used rather than the default naming strategy. | | description? | string. Human readable field metadata. | | path? | string. An explicit path to the field in the data source. When the frame meta includes a path, this will default to `${frame.meta.path}/${field.name}`. When defined, this value can be used as an identifier within the data source scope, and may be used to update the results. | | writeable? | bool. True if the data source can write a value to the path. Auth/authz are supported separately. | | filterable? | bool. True if the data source field supports ad-hoc filters. | | unit? | string. Unit a field should use. The unit you select is applied to all fields except time. You can use the unit's ID available in Grafana or a custom unit. [Available units in Grafana](https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/valueFormats/categories.ts). As custom units, you can use the following formats: | | decimals? | number. Specify the number of decimals Grafana includes in the rendered value. If you leave this field blank, Grafana automatically truncates the number of decimals based on the value. For example 1.1234 will display as 1.12 and 100.456 will display as 100. To display all decimals, set the unit to `string`. | | min? | number. The minimum value used in percentage threshold calculations. Leave empty for auto calculation based on all series and fields. | | max? | number. The maximum value used in percentage threshold calculations. Leave empty for auto calculation based on all series and fields. | | mappings? | `[...ValueMapping]`. Convert input values into a display string. Options are: [`ValueMap`](#valuemap), [`RangeMap`](#rangemap), [`RegexMap`](#rangemap), [`SpecialValueMap`](#specialvaluemap). | | thresholds? | `ThresholdsConfig`. Map numeric values to states. Consists of: | | color? | [`FieldColor`](#fieldcolor). Panel color configuration. | | links? | `[...]`. The behavior when clicking a result. | | noValue? | string. Alternative to an empty string. | | custom? | `{...}`. Specified by the `FieldConfig` field in panel plugin schemas. | ###### `ValueMap` Maps text values to a color or different display text and color. For example, you can configure a value mapping so that all instances of the value 10 appear as Perfection! rather than the number. | Name | Usage | | ------- | -------- | | type | `MappingType` & "value". `MappingType` options are: `value`, `range`, `regex`, and `special`. | | options | string. [`ValueMappingResult`](#valuemappingresult). Map with ``: `ValueMappingResult`. For example: `{ "10": { text: "Perfection!", color: "green" } }`. | ###### `RangeMap` Maps numerical ranges to a display text and color. For example, if a value is within a certain range, you can configure a range value mapping to display Low or High rather than the number. | Name | Usage | | ------- | ---------------------------------------------------------------------------------------------------- | | type | `MappingType` & "range". `MappingType` options are: `value`, `range`, `regex`, and `special`. | | options | Range to match against and the result to apply when the value is within the range. Spec: