Guide, Axis, Grid, and Title Actions
These are direct immutable ChartProgram actions. Each accepts one option object and returns a new program.
createGuides
createGuides({ axes?, grid?, legend? })
Create applicable Cartesian or Polar axes and grids plus supported legends. Guides
createAxes
createAxes({ coordinate?, x?, y?, theta?, radius? })
Create Cartesian or Polar axes directly, including inferred titles and ticks. Axes
createThetaAxis
createThetaAxis({ scale?, coordinate?, line?, ticksAndLabels?, title? } = {})
Create the complete outer circular theta axis. Axes
createRadialAxis
createRadialAxis({ scale?, coordinate?, angle?, line?, ticksAndLabels?, title? } = {})
Create the complete center-to-edge radial axis; angle defaults to 90.
Axes
editThetaAxis
editThetaAxis({ line?, ticks?, labels?, ticksAndLabels?, title? })
Edit selected theta-axis components. Axes
editRadialAxis
editRadialAxis({ angle?, line?, ticks?, labels?, ticksAndLabels?, title? })
Edit selected radial components; angle moves the whole axis.
Axes
editThetaAxisLine
editThetaAxisLine({ color?, lineWidth? } = {})
Edit the outer baseline style. Axes
editRadialAxisLine
editRadialAxisLine({ color?, lineWidth? } = {})
Edit the radial baseline style. Axes
editThetaAxisTicks
editThetaAxisTicks({ count?, values?, length?, color?, lineWidth? } = {})
Edit theta tick geometry and style. Axes
editRadialAxisTicks
editRadialAxisTicks({ count?, values?, length?, color?, lineWidth? } = {})
Edit radial tick geometry and style. Axes
editThetaAxisLabels
editThetaAxisLabels({ count?, values?, offset?, format?, color?, fontSize?, fontFamily?, fontWeight? } = {})
Edit perimeter theta labels. Axes
editRadialAxisLabels
editRadialAxisLabels({ count?, values?, offset?, format?, color?, fontSize?, fontFamily?, fontWeight? } = {})
Edit radial value labels. Axes
editThetaAxisTitle
editThetaAxisTitle({ text?, offset?, color?, fontSize?, fontFamily?, fontWeight? } = {})
Edit the theta title. Axes
editRadialAxisTitle
editRadialAxisTitle({ text?, position?, offset?, color?, fontSize?, fontFamily?, fontWeight? } = {})
Edit the radial title. position accepts "inside" or "outside" and defaults
to the baseline midpoint inside the plot. Axes
removeThetaAxis
removeThetaAxis({ scale?, coordinate? } = {})
Remove the complete theta-axis resource. Axes
removeRadialAxis
removeRadialAxis({ scale?, coordinate? } = {})
Remove the complete radial-axis resource. Axes
createGrid
createGrid({ horizontal?, vertical?, theta?, radial? })
Create inferred horizontal and/or vertical Cartesian grid lines behind related marks, or infer the Polar grid families backed by stored theta/radius encodings. Grids
createThetaGrid
createThetaGrid({ scale?, coordinate?, count?, values?, color?, lineWidth?, strokeDash? } = {})
Create theta spokes behind related marks. Grids
createRadialGrid
createRadialGrid({ scale?, coordinate?, count?, values?, color?, lineWidth?, strokeDash? } = {})
Create concentric radial paths behind related marks. Grids
editThetaGrid
editThetaGrid({ count?, values?, color?, lineWidth?, strokeDash? })
Edit the existing theta grid. Grids
editRadialGrid
editRadialGrid({ count?, values?, color?, lineWidth?, strokeDash? })
Edit the existing radial grid. Grids
createLegend
createLegend({
target?, channels?, position?, align?, direction?, columns?, offset?,
titlePosition?, title?, symbol?, labels?, titleStyle?, itemGap?, border?, count?,
gradient?
})
Create categorical, point-size, continuous-color gradient, discretized-color interval, or field-opacity sample legends. Continuous legends support right, left, top, and bottom placement. Categorical legends also support left side placement; composite point and size blocks remain in deterministic vertical order. Legends
editLegend
editLegend({
target?, position?, align?, direction?, columns?, offset?, titlePosition?,
title?, symbol?, labels?, titleStyle?, itemGap?, border?, count?, gradient?
})
Partially edit one existing legend. title accepts a non-empty string,
"auto", or false; semantic channel bindings cannot be edited.
Legends
Focused legend edits
editLegendLayout({
target?, position?, align?, direction?, columns?, offset?,
titlePosition?, itemGap?
})
editLegendLabels({ target?, color?, fontSize?, fontFamily?, fontWeight? })
editLegendTitle({
target?, title?, color?, fontSize?, fontFamily?, fontWeight?
})
editLegendSymbols({ target?, symbol?, count?, gradient? })
editLegendBorder({ target?, border })
Edit one legend component without constructing the nested options accepted by
editLegend. Each action uses the same target inference, validation, and
rematerialization as editLegend. At least one component change is required.
Editing legends
removeLegend
removeLegend({ target? })
Remove every legend block owned by one mark while preserving mark encodings and scales. Legends
createTitle
createTitle({
text, subtitle?, position?, align?, offset?, gap?,
maxWidth?, wrap?, lineHeight?,
titleStyle?, subtitleStyle?
})
Create a chart title and optional subtitle. Titles
editTitle
editTitle({
text?, subtitle?, position?, align?, offset?, gap?,
maxWidth?, wrap?, lineHeight?,
titleStyle?, subtitleStyle?
})
Partially edit the existing title. subtitle: false removes the subtitle;
omitted properties remain unchanged. Titles
removeTitle
removeTitle()
Remove the complete chart title and subtitle resource. Titles