Themes service#

Themes service manages themes for exporting charts.

OpenAPI file: ThemesService.json

Endpoints#

List chart themes#

GET /themes/v1/chart-themes

Get all chart themes saved to the requested workspaces.

Query parameters

workspaces array of string (RID)

If supplied, will return only results within the supplied workspaces. If empty will return all results within workspaces that the user is permitted to see.

Response

The body is an array of ChartTheme.

Fields of ChartTheme
rid string (RID)

Unique resource identifier for the theme.

name string

The name of the theme as defined by the user.

createdBy string (RID)

The rid of the user who first created the theme.

createdAt string (date-time)

The time the theme was created.

updatedBy string (RID)

The rid of the user who last updated the theme.

updatedAt string (date-time)

The rid of the user who last updated the theme.

content ChartThemeContent

Specifies the chart theme styling (e.g. font, legends, axes)

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean

Whether to show a title in the export.

titleAlignment TextAlignment

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer

Font size of the title.

titleFontColor string

Font color of the title.

captionEnabled boolean

Whether to show a caption in the export.

captionAlignment TextAlignment

How to align the text of the caption.

captionFontSize integer

Font size of the caption.

captionFontColor string

Font color of the caption.

backgroundEnabled boolean

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean

Whether to include a legend in the export.

legendPosition LegendPosition

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer

Font size of the legend.

legendFontColor string

Font color of the legend.

legendPlacement LegendPlacement

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer

The relative width of the chart export.

aspectRatioHeight integer

The relative height of the chart export.

chartTypeThemes ChartTypeThemes

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer

The font size of the x-axis ticks.

xAxisTickFontColor string

The font color of the x-axis ticks.

yAxisTitleFontSize integer

The font size of the y-axis labels.

yAxisTickFontSize integer

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Request

curl "https://api.gov.nominal.io/api/themes/v1/chart-themes" \
  -H "Authorization: Bearer <api key>"
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio

import aiohttp


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/themes/v1/chart-themes",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())


asyncio.run(main())

Response: 200

[
  {
    "rid": "<chart theme rid>",
    "name": "<name>",
    "createdBy": "<created by>",
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedBy": "<updated by>",
    "updatedAt": "2026-01-01T00:00:00Z",
    "content": {
      "type": "v1",
      "v1": {
        "titleEnabled": true,
        "titleAlignment": "START",
        "titleFontSize": 1,
        "titleFontColor": "<hex color>",
        "captionEnabled": true,
        "captionAlignment": "START",
        "captionFontSize": 1,
        "captionFontColor": "<hex color>",
        "backgroundEnabled": true,
        "legendEnabled": true,
        "legendPosition": "TOP",
        "legendFontSize": 1,
        "legendFontColor": "<hex color>",
        "legendPlacement": "OUTSIDE",
        "rowGapEnabled": true,
        "rowGapSize": 1,
        "aspectRatioWidth": 1,
        "aspectRatioHeight": 1,
        "chartTypeThemes": {
          "timeSeries": {
            "type": "v1",
            "v1": {
              "xAxisTickFontSize": 1,
              "xAxisTickFontColor": "<hex color>",
              "yAxisTitleFontSize": 1,
              "yAxisTickFontSize": 1,
              "thresholdLineWidth": 1
            }
          }
        }
      }
    }
  }
]

Create chart theme#

POST /themes/v1/chart-themes

Create a new chart theme.

Body

name string required

The name of the theme.

content ChartThemeContent required

The theme fields.

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean required

Whether to show a title in the export.

titleAlignment TextAlignment required

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer required

Font size of the title.

titleFontColor string required

Font color of the title.

captionEnabled boolean required

Whether to show a caption in the export.

captionAlignment TextAlignment required

How to align the text of the caption.

captionFontSize integer required

Font size of the caption.

captionFontColor string required

Font color of the caption.

backgroundEnabled boolean required

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean required

Whether to include a legend in the export.

legendPosition LegendPosition required

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer required

Font size of the legend.

legendFontColor string required

Font color of the legend.

legendPlacement LegendPlacement required

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean required

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer required

The relative width of the chart export.

aspectRatioHeight integer required

The relative height of the chart export.

chartTypeThemes ChartTypeThemes required

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme required

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer required

The font size of the x-axis ticks.

xAxisTickFontColor string required

The font color of the x-axis ticks.

yAxisTitleFontSize integer required

The font size of the y-axis labels.

yAxisTickFontSize integer required

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

workspace string (RID)

The workspace in which to create the theme. If not provided, the theme will be created in the default workspace for the user’s organization, if the default workspace for the organization is configured.

Response

rid string (RID)

Unique resource identifier for the theme.

name string

The name of the theme as defined by the user.

createdBy string (RID)

The rid of the user who first created the theme.

createdAt string (date-time)

The time the theme was created.

updatedBy string (RID)

The rid of the user who last updated the theme.

updatedAt string (date-time)

The rid of the user who last updated the theme.

content ChartThemeContent

Specifies the chart theme styling (e.g. font, legends, axes)

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean

Whether to show a title in the export.

titleAlignment TextAlignment

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer

Font size of the title.

titleFontColor string

Font color of the title.

captionEnabled boolean

Whether to show a caption in the export.

captionAlignment TextAlignment

How to align the text of the caption.

captionFontSize integer

Font size of the caption.

captionFontColor string

Font color of the caption.

backgroundEnabled boolean

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean

Whether to include a legend in the export.

legendPosition LegendPosition

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer

Font size of the legend.

legendFontColor string

Font color of the legend.

legendPlacement LegendPlacement

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer

The relative width of the chart export.

aspectRatioHeight integer

The relative height of the chart export.

chartTypeThemes ChartTypeThemes

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer

The font size of the x-axis ticks.

xAxisTickFontColor string

The font color of the x-axis ticks.

yAxisTitleFontSize integer

The font size of the y-axis labels.

yAxisTickFontSize integer

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Request

curl -X POST "https://api.gov.nominal.io/api/themes/v1/chart-themes" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "<name>",
  "content": {
    "type": "v1",
    "v1": {
      "titleEnabled": true,
      "titleAlignment": "START",
      "titleFontSize": 1,
      "titleFontColor": "<hex color>",
      "captionEnabled": true,
      "captionAlignment": "START",
      "captionFontSize": 1,
      "captionFontColor": "<hex color>",
      "backgroundEnabled": true,
      "legendEnabled": true,
      "legendPosition": "TOP",
      "legendFontSize": 1,
      "legendFontColor": "<hex color>",
      "legendPlacement": "OUTSIDE",
      "rowGapEnabled": true,
      "aspectRatioWidth": 1,
      "aspectRatioHeight": 1,
      "chartTypeThemes": {
        "timeSeries": {
          "type": "v1",
          "v1": {
            "xAxisTickFontSize": 1,
            "xAxisTickFontColor": "<hex color>",
            "yAxisTitleFontSize": 1,
            "yAxisTickFontSize": 1
          }
        }
      }
    }
  }
}'
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "content": {
            "type": "v1",
            "v1": {
                "titleEnabled": True,
                "titleAlignment": "START",
                "titleFontSize": 1,
                "titleFontColor": "<hex color>",
                "captionEnabled": True,
                "captionAlignment": "START",
                "captionFontSize": 1,
                "captionFontColor": "<hex color>",
                "backgroundEnabled": True,
                "legendEnabled": True,
                "legendPosition": "TOP",
                "legendFontSize": 1,
                "legendFontColor": "<hex color>",
                "legendPlacement": "OUTSIDE",
                "rowGapEnabled": True,
                "aspectRatioWidth": 1,
                "aspectRatioHeight": 1,
                "chartTypeThemes": {
                    "timeSeries": {
                        "type": "v1",
                        "v1": {
                            "xAxisTickFontSize": 1,
                            "xAxisTickFontColor": "<hex color>",
                            "yAxisTitleFontSize": 1,
                            "yAxisTickFontSize": 1,
                        },
                    },
                },
            },
        },
    },
)
response.raise_for_status()
print(response.json())
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "content": {
            "type": "v1",
            "v1": {
                "titleEnabled": True,
                "titleAlignment": "START",
                "titleFontSize": 1,
                "titleFontColor": "<hex color>",
                "captionEnabled": True,
                "captionAlignment": "START",
                "captionFontSize": 1,
                "captionFontColor": "<hex color>",
                "backgroundEnabled": True,
                "legendEnabled": True,
                "legendPosition": "TOP",
                "legendFontSize": 1,
                "legendFontColor": "<hex color>",
                "legendPlacement": "OUTSIDE",
                "rowGapEnabled": True,
                "aspectRatioWidth": 1,
                "aspectRatioHeight": 1,
                "chartTypeThemes": {
                    "timeSeries": {
                        "type": "v1",
                        "v1": {
                            "xAxisTickFontSize": 1,
                            "xAxisTickFontColor": "<hex color>",
                            "yAxisTitleFontSize": 1,
                            "yAxisTickFontSize": 1,
                        },
                    },
                },
            },
        },
    },
)
response.raise_for_status()
print(response.json())
import asyncio

import aiohttp


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/themes/v1/chart-themes",
            headers={"Authorization": "Bearer <api key>"},
            json={
                "name": "<name>",
                "content": {
                    "type": "v1",
                    "v1": {
                        "titleEnabled": True,
                        "titleAlignment": "START",
                        "titleFontSize": 1,
                        "titleFontColor": "<hex color>",
                        "captionEnabled": True,
                        "captionAlignment": "START",
                        "captionFontSize": 1,
                        "captionFontColor": "<hex color>",
                        "backgroundEnabled": True,
                        "legendEnabled": True,
                        "legendPosition": "TOP",
                        "legendFontSize": 1,
                        "legendFontColor": "<hex color>",
                        "legendPlacement": "OUTSIDE",
                        "rowGapEnabled": True,
                        "aspectRatioWidth": 1,
                        "aspectRatioHeight": 1,
                        "chartTypeThemes": {
                            "timeSeries": {
                                "type": "v1",
                                "v1": {
                                    "xAxisTickFontSize": 1,
                                    "xAxisTickFontColor": "<hex color>",
                                    "yAxisTitleFontSize": 1,
                                    "yAxisTickFontSize": 1,
                                },
                            },
                        },
                    },
                },
            },
        ) as response:
            response.raise_for_status()
            print(await response.json())


asyncio.run(main())

Response: 200

{
  "rid": "<chart theme rid>",
  "name": "<name>",
  "createdBy": "<created by>",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedBy": "<updated by>",
  "updatedAt": "2026-01-01T00:00:00Z",
  "content": {
    "type": "v1",
    "v1": {
      "titleEnabled": true,
      "titleAlignment": "START",
      "titleFontSize": 1,
      "titleFontColor": "<hex color>",
      "captionEnabled": true,
      "captionAlignment": "START",
      "captionFontSize": 1,
      "captionFontColor": "<hex color>",
      "backgroundEnabled": true,
      "legendEnabled": true,
      "legendPosition": "TOP",
      "legendFontSize": 1,
      "legendFontColor": "<hex color>",
      "legendPlacement": "OUTSIDE",
      "rowGapEnabled": true,
      "rowGapSize": 1,
      "aspectRatioWidth": 1,
      "aspectRatioHeight": 1,
      "chartTypeThemes": {
        "timeSeries": {
          "type": "v1",
          "v1": {
            "xAxisTickFontSize": 1,
            "xAxisTickFontColor": "<hex color>",
            "yAxisTitleFontSize": 1,
            "yAxisTickFontSize": 1,
            "thresholdLineWidth": 1
          }
        }
      }
    }
  }
}

Get chart theme#

GET /themes/v1/chart-themes/{chartThemeRid}

Get a specific chart theme by RID.

Path parameters

chartThemeRid string (RID) required

The RID of chart theme.

Response

rid string (RID)

Unique resource identifier for the theme.

name string

The name of the theme as defined by the user.

createdBy string (RID)

The rid of the user who first created the theme.

createdAt string (date-time)

The time the theme was created.

updatedBy string (RID)

The rid of the user who last updated the theme.

updatedAt string (date-time)

The rid of the user who last updated the theme.

content ChartThemeContent

Specifies the chart theme styling (e.g. font, legends, axes)

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean

Whether to show a title in the export.

titleAlignment TextAlignment

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer

Font size of the title.

titleFontColor string

Font color of the title.

captionEnabled boolean

Whether to show a caption in the export.

captionAlignment TextAlignment

How to align the text of the caption.

captionFontSize integer

Font size of the caption.

captionFontColor string

Font color of the caption.

backgroundEnabled boolean

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean

Whether to include a legend in the export.

legendPosition LegendPosition

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer

Font size of the legend.

legendFontColor string

Font color of the legend.

legendPlacement LegendPlacement

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer

The relative width of the chart export.

aspectRatioHeight integer

The relative height of the chart export.

chartTypeThemes ChartTypeThemes

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer

The font size of the x-axis ticks.

xAxisTickFontColor string

The font color of the x-axis ticks.

yAxisTitleFontSize integer

The font size of the y-axis labels.

yAxisTickFontSize integer

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Request

curl "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
  -H "Authorization: Bearer <api key>"
import requests

response = requests.get(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx

response = httpx.get(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio

import aiohttp


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.get(
            "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()
            print(await response.json())


asyncio.run(main())

Response: 200

{
  "rid": "<chart theme rid>",
  "name": "<name>",
  "createdBy": "<created by>",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedBy": "<updated by>",
  "updatedAt": "2026-01-01T00:00:00Z",
  "content": {
    "type": "v1",
    "v1": {
      "titleEnabled": true,
      "titleAlignment": "START",
      "titleFontSize": 1,
      "titleFontColor": "<hex color>",
      "captionEnabled": true,
      "captionAlignment": "START",
      "captionFontSize": 1,
      "captionFontColor": "<hex color>",
      "backgroundEnabled": true,
      "legendEnabled": true,
      "legendPosition": "TOP",
      "legendFontSize": 1,
      "legendFontColor": "<hex color>",
      "legendPlacement": "OUTSIDE",
      "rowGapEnabled": true,
      "rowGapSize": 1,
      "aspectRatioWidth": 1,
      "aspectRatioHeight": 1,
      "chartTypeThemes": {
        "timeSeries": {
          "type": "v1",
          "v1": {
            "xAxisTickFontSize": 1,
            "xAxisTickFontColor": "<hex color>",
            "yAxisTitleFontSize": 1,
            "yAxisTickFontSize": 1,
            "thresholdLineWidth": 1
          }
        }
      }
    }
  }
}

Update chart theme#

PUT /themes/v1/chart-themes/{chartThemeRid}

Update an existing chart theme.

Path parameters

chartThemeRid string (RID) required

The RID of chart theme to update.

Body

name string required

The name of the theme.

content ChartThemeContent required

The theme fields.

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean required

Whether to show a title in the export.

titleAlignment TextAlignment required

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer required

Font size of the title.

titleFontColor string required

Font color of the title.

captionEnabled boolean required

Whether to show a caption in the export.

captionAlignment TextAlignment required

How to align the text of the caption.

captionFontSize integer required

Font size of the caption.

captionFontColor string required

Font color of the caption.

backgroundEnabled boolean required

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean required

Whether to include a legend in the export.

legendPosition LegendPosition required

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer required

Font size of the legend.

legendFontColor string required

Font color of the legend.

legendPlacement LegendPlacement required

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean required

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer required

The relative width of the chart export.

aspectRatioHeight integer required

The relative height of the chart export.

chartTypeThemes ChartTypeThemes required

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme required

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer required

The font size of the x-axis ticks.

xAxisTickFontColor string required

The font color of the x-axis ticks.

yAxisTitleFontSize integer required

The font size of the y-axis labels.

yAxisTickFontSize integer required

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Response

rid string (RID)

Unique resource identifier for the theme.

name string

The name of the theme as defined by the user.

createdBy string (RID)

The rid of the user who first created the theme.

createdAt string (date-time)

The time the theme was created.

updatedBy string (RID)

The rid of the user who last updated the theme.

updatedAt string (date-time)

The rid of the user who last updated the theme.

content ChartThemeContent

Specifies the chart theme styling (e.g. font, legends, axes)

Set type to "v1".

v1 ChartThemeContentV1

​

Fields of ChartThemeContentV1
titleEnabled boolean

Whether to show a title in the export.

titleAlignment TextAlignment

How to align the text of the title.

Values of TextAlignment
START

​

END

​

CENTER

​

JUSTIFY

​

titleFontSize integer

Font size of the title.

titleFontColor string

Font color of the title.

captionEnabled boolean

Whether to show a caption in the export.

captionAlignment TextAlignment

How to align the text of the caption.

captionFontSize integer

Font size of the caption.

captionFontColor string

Font color of the caption.

backgroundEnabled boolean

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean

Whether to include a legend in the export.

legendPosition LegendPosition

Which side the legend should appear on.

Values of LegendPosition
TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

legendFontSize integer

Font size of the legend.

legendFontColor string

Font color of the legend.

legendPlacement LegendPlacement

Where on the chart the legend should be placed.

Values of LegendPlacement
OUTSIDE

​

INSIDE

​

rowGapEnabled boolean

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer

The relative width of the chart export.

aspectRatioHeight integer

The relative height of the chart export.

chartTypeThemes ChartTypeThemes

Theme parameters specific to chart types.

Fields of ChartTypeThemes
timeSeries TimeSeriesChartTheme

The theme specific to parameters of the time series chart.

Set type to "v1".

v1 TimeSeriesChartThemeV1

​

Fields of TimeSeriesChartThemeV1
xAxisTickFontSize integer

The font size of the x-axis ticks.

xAxisTickFontColor string

The font color of the x-axis ticks.

yAxisTitleFontSize integer

The font size of the y-axis labels.

yAxisTickFontSize integer

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Request

curl -X PUT "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "<name>",
  "content": {
    "type": "v1",
    "v1": {
      "titleEnabled": true,
      "titleAlignment": "START",
      "titleFontSize": 1,
      "titleFontColor": "<hex color>",
      "captionEnabled": true,
      "captionAlignment": "START",
      "captionFontSize": 1,
      "captionFontColor": "<hex color>",
      "backgroundEnabled": true,
      "legendEnabled": true,
      "legendPosition": "TOP",
      "legendFontSize": 1,
      "legendFontColor": "<hex color>",
      "legendPlacement": "OUTSIDE",
      "rowGapEnabled": true,
      "aspectRatioWidth": 1,
      "aspectRatioHeight": 1,
      "chartTypeThemes": {
        "timeSeries": {
          "type": "v1",
          "v1": {
            "xAxisTickFontSize": 1,
            "xAxisTickFontColor": "<hex color>",
            "yAxisTitleFontSize": 1,
            "yAxisTickFontSize": 1
          }
        }
      }
    }
  }
}'
import requests

response = requests.put(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "content": {
            "type": "v1",
            "v1": {
                "titleEnabled": True,
                "titleAlignment": "START",
                "titleFontSize": 1,
                "titleFontColor": "<hex color>",
                "captionEnabled": True,
                "captionAlignment": "START",
                "captionFontSize": 1,
                "captionFontColor": "<hex color>",
                "backgroundEnabled": True,
                "legendEnabled": True,
                "legendPosition": "TOP",
                "legendFontSize": 1,
                "legendFontColor": "<hex color>",
                "legendPlacement": "OUTSIDE",
                "rowGapEnabled": True,
                "aspectRatioWidth": 1,
                "aspectRatioHeight": 1,
                "chartTypeThemes": {
                    "timeSeries": {
                        "type": "v1",
                        "v1": {
                            "xAxisTickFontSize": 1,
                            "xAxisTickFontColor": "<hex color>",
                            "yAxisTitleFontSize": 1,
                            "yAxisTickFontSize": 1,
                        },
                    },
                },
            },
        },
    },
)
response.raise_for_status()
print(response.json())
import httpx

response = httpx.put(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
    json={
        "name": "<name>",
        "content": {
            "type": "v1",
            "v1": {
                "titleEnabled": True,
                "titleAlignment": "START",
                "titleFontSize": 1,
                "titleFontColor": "<hex color>",
                "captionEnabled": True,
                "captionAlignment": "START",
                "captionFontSize": 1,
                "captionFontColor": "<hex color>",
                "backgroundEnabled": True,
                "legendEnabled": True,
                "legendPosition": "TOP",
                "legendFontSize": 1,
                "legendFontColor": "<hex color>",
                "legendPlacement": "OUTSIDE",
                "rowGapEnabled": True,
                "aspectRatioWidth": 1,
                "aspectRatioHeight": 1,
                "chartTypeThemes": {
                    "timeSeries": {
                        "type": "v1",
                        "v1": {
                            "xAxisTickFontSize": 1,
                            "xAxisTickFontColor": "<hex color>",
                            "yAxisTitleFontSize": 1,
                            "yAxisTickFontSize": 1,
                        },
                    },
                },
            },
        },
    },
)
response.raise_for_status()
print(response.json())
import asyncio

import aiohttp


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.put(
            "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
            headers={"Authorization": "Bearer <api key>"},
            json={
                "name": "<name>",
                "content": {
                    "type": "v1",
                    "v1": {
                        "titleEnabled": True,
                        "titleAlignment": "START",
                        "titleFontSize": 1,
                        "titleFontColor": "<hex color>",
                        "captionEnabled": True,
                        "captionAlignment": "START",
                        "captionFontSize": 1,
                        "captionFontColor": "<hex color>",
                        "backgroundEnabled": True,
                        "legendEnabled": True,
                        "legendPosition": "TOP",
                        "legendFontSize": 1,
                        "legendFontColor": "<hex color>",
                        "legendPlacement": "OUTSIDE",
                        "rowGapEnabled": True,
                        "aspectRatioWidth": 1,
                        "aspectRatioHeight": 1,
                        "chartTypeThemes": {
                            "timeSeries": {
                                "type": "v1",
                                "v1": {
                                    "xAxisTickFontSize": 1,
                                    "xAxisTickFontColor": "<hex color>",
                                    "yAxisTitleFontSize": 1,
                                    "yAxisTickFontSize": 1,
                                },
                            },
                        },
                    },
                },
            },
        ) as response:
            response.raise_for_status()
            print(await response.json())


asyncio.run(main())

Response: 200

{
  "rid": "<chart theme rid>",
  "name": "<name>",
  "createdBy": "<created by>",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedBy": "<updated by>",
  "updatedAt": "2026-01-01T00:00:00Z",
  "content": {
    "type": "v1",
    "v1": {
      "titleEnabled": true,
      "titleAlignment": "START",
      "titleFontSize": 1,
      "titleFontColor": "<hex color>",
      "captionEnabled": true,
      "captionAlignment": "START",
      "captionFontSize": 1,
      "captionFontColor": "<hex color>",
      "backgroundEnabled": true,
      "legendEnabled": true,
      "legendPosition": "TOP",
      "legendFontSize": 1,
      "legendFontColor": "<hex color>",
      "legendPlacement": "OUTSIDE",
      "rowGapEnabled": true,
      "rowGapSize": 1,
      "aspectRatioWidth": 1,
      "aspectRatioHeight": 1,
      "chartTypeThemes": {
        "timeSeries": {
          "type": "v1",
          "v1": {
            "xAxisTickFontSize": 1,
            "xAxisTickFontColor": "<hex color>",
            "yAxisTitleFontSize": 1,
            "yAxisTickFontSize": 1,
            "thresholdLineWidth": 1
          }
        }
      }
    }
  }
}

Delete chart theme#

DELETE /themes/v1/chart-themes/{chartThemeRid}

Delete an existing comment.

Path parameters

chartThemeRid string (RID) required

The RID of chart theme to delete.

Response

No content (HTTP 204).

Request

curl -X DELETE "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>" \
  -H "Authorization: Bearer <api key>"
import requests

response = requests.delete(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
import httpx

response = httpx.delete(
    "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
    headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
import asyncio

import aiohttp


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.delete(
            "https://api.gov.nominal.io/api/themes/v1/chart-themes/<chart theme rid>",
            headers={"Authorization": "Bearer <api key>"},
        ) as response:
            response.raise_for_status()


asyncio.run(main())

Response: 204

No content.

Errors#

Errors shows how these errors are sent.

Each error’s errorName is Themes: followed by its name below.

Status

Name

Notes

400

InvalidChartTheme

404

ChartThemeNotFound

409

ChartThemeNameConflict

Types#

ChartTheme#

rid string (RID) required

Unique resource identifier for the theme.

name string required

The name of the theme as defined by the user.

createdBy string (RID) required

The rid of the user who first created the theme.

createdAt string (date-time) required

The time the theme was created.

updatedBy string (RID)

The rid of the user who last updated the theme.

updatedAt string (date-time)

The rid of the user who last updated the theme.

content ChartThemeContent required

Specifies the chart theme styling (e.g. font, legends, axes)

ChartThemeContent#

Set type to the name of one of the other fields, and set only that field.

v1 ChartThemeContentV1

​

ChartThemeContentV1#

titleEnabled boolean required

Whether to show a title in the export.

titleAlignment TextAlignment required

How to align the text of the title.

titleFontSize integer required

Font size of the title.

titleFontColor string required

Font color of the title.

captionEnabled boolean required

Whether to show a caption in the export.

captionAlignment TextAlignment required

How to align the text of the caption.

captionFontSize integer required

Font size of the caption.

captionFontColor string required

Font color of the caption.

backgroundEnabled boolean required

Whether to include a default background with the export. (false indicates that the background should be transparent)

legendEnabled boolean required

Whether to include a legend in the export.

legendPosition LegendPosition required

Which side the legend should appear on.

legendFontSize integer required

Font size of the legend.

legendFontColor string required

Font color of the legend.

legendPlacement LegendPlacement required

Where on the chart the legend should be placed.

rowGapEnabled boolean required

Whether rows will be separated.

rowGapSize integer

The size of the row gap.

aspectRatioWidth integer required

The relative width of the chart export.

aspectRatioHeight integer required

The relative height of the chart export.

chartTypeThemes ChartTypeThemes required

Theme parameters specific to chart types.

ChartTypeThemes#

Theme parameters specific to chart types.

timeSeries TimeSeriesChartTheme required

The theme specific to parameters of the time series chart.

LegendPlacement#

OUTSIDE

​

INSIDE

​

LegendPosition#

TOP

​

BOTTOM

​

LEFT

​

RIGHT

​

TextAlignment#

START

​

END

​

CENTER

​

JUSTIFY

​

TimeSeriesChartTheme#

Set type to the name of one of the other fields, and set only that field.

v1 TimeSeriesChartThemeV1

​

TimeSeriesChartThemeV1#

Theme parameters specific to the time series chart.

xAxisTickFontSize integer required

The font size of the x-axis ticks.

xAxisTickFontColor string required

The font color of the x-axis ticks.

yAxisTitleFontSize integer required

The font size of the y-axis labels.

yAxisTickFontSize integer required

The font size of the y-axis ticks.

thresholdLineWidth integer

The line thickness in px of the threshold line.

Page design based on Scalar, MIT License.