https://framer.com/m/ChartX2-6x4oPh.js

Io / UI Basics / ChartX2

ChartX2

ChartX2 is the grouped-settings chart. Instead of a flat control list it exposes five objects — data, chart, colour, legend and format — and reads its series from props, a random generator, an API or pasted JSON. Every specimen below runs the component’s own demo series.

Visualdata-driven5 setting groups7 chart types

Examples

Live specimens for every control the component exposes.

Default

Straight out of the box: source Props, chartType bar, stacked on, legend at the top.

Chart types

chartSettings.chartType is the single switch. The three demo series stay exactly as they are.

bar

line

pie

doughnut

Stacking and direction

stacked decides whether series sit on top of each other; direction turns the bars on their side.

stacked off · direction x

stacked on · direction y

Legend

legendSettings moves, re-shapes or removes the legend without touching the plot.

position right · align center

show off

Grid and axes

chartSettings strips the chrome — grid lines, tick labels and axis borders are all independent booleans.

grid and labels on

gridX/gridY off · labelY off

Value formatting

formatSettings wraps every tick on an axis, so a currency mark never has to live in the data.

tickFormatterY off

tickFormatterY on · prefixY $

Data sources

Props takes typed labels and datasets, Random generates values between randomMin and randomMax, API polls apiUrl, and JSON parses a pasted body. Everything on this page uses Props with the component’s own demo series.

TODO:data-source — no production dataset is attached to this page. ChartX2’s built-in Props demo series is left untouched, per the migration rule on data-driven components.

Props

The controls exposed on the instance panel, grouped as ChartX2 groups them.

PropTypeBehaviour
dataOptions.sourceenumProps, Random, API or JSON — where the series come from.
dataOptions.labelsarrayCategory labels along the axis.
dataOptions.datasetsarrayEach series: a label plus its values.
dataOptions.scatterDataarrayScatter and bubble series, given as x / y pairs.
dataOptions.randomMinnumberLower bound used when source is Random.
dataOptions.randomMaxnumberUpper bound used when source is Random.
dataOptions.apiUrlstringEndpoint polled when source is API.
dataOptions.useTokenbooleanSends a bearer token with the API request.
dataOptions.keyTokenstringThe token itself.
dataOptions.transformbooleanMaps a flat API payload onto labels and series using the two keys below.
dataOptions.dataLabelsstringKey in the payload holding the labels.
dataOptions.datasetLabelsarrayKeys in the payload used as series.
dataOptions.jsonDatastringRaw JSON body used when source is JSON.
chartSettings.disableAnimationsbooleanTurns off the mount and update animation.
chartSettings.chartTypeenumbar, line, pie, doughnut, radar, scatter or bubble.
chartSettings.directionenumx for vertical bars, y for horizontal.
chartSettings.stackedbooleanStacks series instead of grouping them.
chartSettings.smoothbooleanCurves line segments.
chartSettings.radiusstringCorner radius on bars.
chartSettings.pieOuterRadiusnumberOuter radius for arc charts.
chartSettings.barPercentagenumberBar thickness as a share of the slot.
chartSettings.cutoutnumberInner hole size for doughnut charts.
chartSettings.arcSpacingnumberGap between arc segments.
chartSettings.rotationnumberStart angle for arc charts, in degrees.
chartSettings.circumferencenumberEnd angle for arc charts, 0 to 360 degrees.
chartSettings.axisFontfontType for the axis labels.
chartSettings.labelFontColorcolorAxis label colour. Empty uses the theme.
chartSettings.gridColorXcolorColour of the x grid. Empty uses the theme.
chartSettings.gridColorYcolorColour of the y grid. Empty uses the theme.
chartSettings.radialGridColorcolorColour of the radial grid on radar charts. Empty uses the theme.
chartSettings.angleLinesColorcolorColour of the angle lines on radar charts. Empty uses the theme.
chartSettings.gridXbooleanDraws the grid on the x axis.
chartSettings.gridYbooleanDraws the grid on the y axis.
chartSettings.labelXbooleanShows tick labels on the x axis.
chartSettings.labelYbooleanShows tick labels on the y axis.
chartSettings.drawTicksXbooleanDraws tick marks on the x axis.
chartSettings.drawTicksYbooleanDraws tick marks on the y axis.
chartSettings.borderXbooleanDraws the x axis line.
chartSettings.borderYbooleanDraws the y axis line.
chartSettings.borderWidthnumberStroke width on bars, lines and arcs.
chartSettings.pointRadiusnumberPoint size on line and scatter charts.
styleOptions.datasetColorsarrayPer-series colours; empty falls back to the theme.
styleOptions.bgOpacitynumberFill opacity for bars, arcs and areas.
styleOptions.borderColorsTogglebooleanLets series borders take their own colours.
styleOptions.borderColorsarrayPer-series border colours, used once Borders is on.
legendOptions.showbooleanShows or hides the legend.
legendOptions.positionenumtop, bottom, left or right.
legendOptions.alignenumstart, center or end along that edge.
legendOptions.fontfontType for the legend labels.
legendOptions.iconSizenumberLegend swatch size, 4 to 40.
legendOptions.formenumLegend swatch shape — circle, rect and so on.
legendOptions.iconGapnumberSpace between a swatch and its label, 0 to 50.
legendOptions.itemGapnumberSpace between legend items.
legendOptions.legendSpacingnumberSpace between the legend and the plot.
formatOptions.tickFormatterXbooleanTurns the prefix and suffix on for the x axis.
formatOptions.prefixXstringText placed before each x value, e.g. a currency mark.
formatOptions.suffixXstringText placed after each x value.
formatOptions.tickFormatterYbooleanTurns the prefix and suffix on for the y axis.
formatOptions.prefixYstringText placed before each y value, e.g. a currency mark.
formatOptions.suffixYstringText placed after each y value.
PropTypeBehaviour
dataOptions.sourceenumProps, Random, API or JSON — where the series come from.
dataOptions.labelsarrayCategory labels along the axis.
dataOptions.datasetsarrayEach series: a label plus its values.
dataOptions.scatterDataarrayScatter and bubble series, given as x / y pairs.
dataOptions.randomMinnumberLower bound used when source is Random.
dataOptions.randomMaxnumberUpper bound used when source is Random.
dataOptions.apiUrlstringEndpoint polled when source is API.
dataOptions.useTokenbooleanSends a bearer token with the API request.
dataOptions.keyTokenstringThe token itself.
dataOptions.transformbooleanMaps a flat API payload onto labels and series using the two keys below.
dataOptions.dataLabelsstringKey in the payload holding the labels.
dataOptions.datasetLabelsarrayKeys in the payload used as series.
dataOptions.jsonDatastringRaw JSON body used when source is JSON.
chartSettings.disableAnimationsbooleanTurns off the mount and update animation.
chartSettings.chartTypeenumbar, line, pie, doughnut, radar, scatter or bubble.
chartSettings.directionenumx for vertical bars, y for horizontal.
chartSettings.stackedbooleanStacks series instead of grouping them.
chartSettings.smoothbooleanCurves line segments.
chartSettings.radiusstringCorner radius on bars.
chartSettings.pieOuterRadiusnumberOuter radius for arc charts.
chartSettings.barPercentagenumberBar thickness as a share of the slot.
chartSettings.cutoutnumberInner hole size for doughnut charts.
chartSettings.arcSpacingnumberGap between arc segments.
chartSettings.rotationnumberStart angle for arc charts, in degrees.
chartSettings.circumferencenumberEnd angle for arc charts, 0 to 360 degrees.
chartSettings.axisFontfontType for the axis labels.
chartSettings.labelFontColorcolorAxis label colour. Empty uses the theme.
chartSettings.gridColorXcolorColour of the x grid. Empty uses the theme.
chartSettings.gridColorYcolorColour of the y grid. Empty uses the theme.
chartSettings.radialGridColorcolorColour of the radial grid on radar charts. Empty uses the theme.
chartSettings.angleLinesColorcolorColour of the angle lines on radar charts. Empty uses the theme.
chartSettings.gridXbooleanDraws the grid on the x axis.
chartSettings.gridYbooleanDraws the grid on the y axis.
chartSettings.labelXbooleanShows tick labels on the x axis.
chartSettings.labelYbooleanShows tick labels on the y axis.
chartSettings.drawTicksXbooleanDraws tick marks on the x axis.
chartSettings.drawTicksYbooleanDraws tick marks on the y axis.
chartSettings.borderXbooleanDraws the x axis line.
chartSettings.borderYbooleanDraws the y axis line.
chartSettings.borderWidthnumberStroke width on bars, lines and arcs.
chartSettings.pointRadiusnumberPoint size on line and scatter charts.
styleOptions.datasetColorsarrayPer-series colours; empty falls back to the theme.
styleOptions.bgOpacitynumberFill opacity for bars, arcs and areas.
styleOptions.borderColorsTogglebooleanLets series borders take their own colours.
styleOptions.borderColorsarrayPer-series border colours, used once Borders is on.
legendOptions.showbooleanShows or hides the legend.
legendOptions.positionenumtop, bottom, left or right.
legendOptions.alignenumstart, center or end along that edge.
legendOptions.fontfontType for the legend labels.
legendOptions.iconSizenumberLegend swatch size, 4 to 40.
legendOptions.formenumLegend swatch shape — circle, rect and so on.
legendOptions.iconGapnumberSpace between a swatch and its label, 0 to 50.
legendOptions.itemGapnumberSpace between legend items.
legendOptions.legendSpacingnumberSpace between the legend and the plot.
formatOptions.tickFormatterXbooleanTurns the prefix and suffix on for the x axis.
formatOptions.prefixXstringText placed before each x value, e.g. a currency mark.
formatOptions.suffixXstringText placed after each x value.
formatOptions.tickFormatterYbooleanTurns the prefix and suffix on for the y axis.
formatOptions.prefixYstringText placed before each y value, e.g. a currency mark.
formatOptions.suffixYstringText placed after each y value.

Usage

Guidance carried over from the component definition.

Reach for ChartX2

You want chart decisions grouped, not a flat list of controls.

Series come from props, a random generator, an API or JSON.

You need scatter or bubble, which ChartX does not draw.

Legend, grid, axes and tick formatting all need separate control.

Reach for something else

You need heatmap, tree map or candlestick.

Updates must stream in real time, beyond API polling.

A flat prop list is simpler for the job — that is ChartX.

Io — UI Basics

Every chart above is a live ChartX2 instance over the component’s own demo series. Colour, type and radius resolve from the project theme tokens.

io

An experiment in what a design system becomes when AI can consume it.

© 2026 io

Contact me

Create a free website with Framer, the website builder loved by startups, designers and agencies.